lkml.org 
[lkml]   [2002]   [Jan]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 16 Jan 2002 14:30:39 -0500
FromBenjamin LaHaise <>
SubjectRe: pte-highmem-5
On Wed, Jan 16, 2002 at 10:19:56AM -0800, Linus Torvalds wrote:
>  - please don't do that "pte_offset_atomic_irq()" have special support in
>    the header files: it is _not_ a generic operation, and it is only used
>    by the x86 page fault logic. For that reason, I would suggest moving
>    all that logic out of the header files, and into i386/mm/fault.c,
>    something along the lines of
> 
> 	pte = pte_offset_nokmap(..)
> 	addr = kmap_atomic(pte, KM_VMFAULT);
> 
>    instead of having special magic logic in the header files.

Ah, here's where I come in and say that kmap_atomic stinks and needs to be 
replaced. ;-)  If you take a look at code in various places making use of 
atomic kmaps, some of the more interesting cases (like bio) have to disable 
irqs during memory copies in order to avoid races on reuse of an atomic 
kmap.  I think that's a sign of an interface that needs redesign.  My 
proposal: make kmap_atomic more like kmap in that it allocates from a pool, 
but make the pool per cpu with ~4 entries reserved per context.  The only 
concern I have is that we might not be restricting the depth of irq entry 
currently, but I'm not familiar with that code.  Time to code up a patch...

> Other than that it looks fairly straightforward, I think.

Agreed.

		-ben
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:23    [from the cache]
©2003-2008