Messages in this thread | | | Date | Fri, 16 Jul 2010 13:21:11 +0200 | From | Frederic Weisbecker <> | Subject | Re: [patch 1/2] x86_64 page fault NMI-safe |
| |
On Thu, Jul 15, 2010 at 04:35:18PM +0200, Andi Kleen wrote: > > But then how did the previous tasks get this new mapping? You said > > we don't walk through every process page tables for vmalloc. > > No because those are always shared for the kernel and have been > filled in for init_mm. > > Also most updates only update the lower tables anyways, top level > updates are extremly rare. In fact on PAE36 they should only happen > at most once, if at all, and most likely at early boot anyways > where you only have a single task. > > On x86-64 they will only happen once every 512GB of vmalloc. > So for most systems also at most once at early boot. > > > > I would understand this race if we were to walk on every processes page > > tables and add the new mapping on them, but we missed one new task that > > forked or so, because we didn't lock (or just rcu). > > The new task will always get a copy of the reference init_mm, which > was already updated. > > -Andi
Ok, got it.
But then, in the example here with perf, I'm allocating 8192 bytes per cpu and my total memory amount is of 2 GB.
And it always fault at least once on access, after the allocation. I really doubt it's because we are adding a new top level page table, considering the amount of memory I have.
It seems to me that the mapping of a newly allocated vmalloc area is always inserted through the lazy way (update on fault). Or there is something I'm missing.
Thanks.
| |