Re: [PATCH *] rmap VM, version 12

From: David S. Miller (davem@redhat.com)
Date: Wed Jan 23 2002 - 14:28:37 EST


   From: Rik van Riel <riel@conectiva.com.br>
   Date: Wed, 23 Jan 2002 17:22:30 -0200 (BRST)

   On Wed, 23 Jan 2002, David S. Miller wrote:
   
> Actually, this is just using the pte_free_fast() and
> {get,free}_pgd_fast() functions on non-pae machines.
>
> Rofl, you can't just do that. The page tables cache caches the kernel
> mappings and if you don't update them properly on SMP you die.
   
   Umm, this list just contains _freed_ page tables without
   any mappings, right ?
   
No.

   If there is some specific magic I'm missing, could you
   please point me to the code I'm overlooking ? ;)
   
Look at what get_pgd_slow() in pgalloc.h does, this is the
case where it isn't going to the cache and it is really allocating the
memory.

When the pgd comes fresh off the cache chain, it doesn't do any
of this stuff, it just gives you the cached PGD with all the PMD's
filled in already, including the kernel PMDs.

Hmmm... maybe the "we can fault on kernel mappings" thing takes
care of this because kernel PMDs can only appear, not go away.
-
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/



This archive was generated by hypermail 2b29 : Wed Jan 23 2002 - 21:01:06 EST