Re: [Bugme-new] [Bug 2019] New: Bug from the mm subsystem involvingX (fwd)
From: Linus Torvalds
Date: Wed Feb 04 2004 - 20:33:18 EST
On Wed, 4 Feb 2004, Andrew Morton wrote:
>
> pfn_valid() could become quite expensive indeed, and it lies on super-duper
> hotpaths.
Yes. However, sometimes it is the only choice.
So it does need to be fixed, and if it ends up being a noticeable
perofmance problem, then we can look at the hot-paths one by one and see
if we can avoid using it. We probably can, most of the time.
> An alternative which is less conceptually clean but should work in this
> case is to mark all vma's which were created by /dev/mem mappings as VM_IO,
> and test that in remap_page_range().
Hmm.. Grepping for "pfn_valid()", I'm starting to suspect that yes, with a
VM_IO approach and a fixed virt_addr_valid(), there really aren't any
other uses.
(virt_addr_valid() is useful for debugging and for validation of untrusted
pointers, but pfn_valid() just isn't very good for it. Never really was:
it started out as an ugly hack, and it never got cleaned up. It should be
easily fixable with something _proper_).
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/