Re: Any reason for passing "tlb" to "free_pgtables()" by address?

Zoltan Menyhart
2006-05-09T19:30:18Z

Hugh, Nick,

Thank you for the information.

> Nick uses the pagetables themselves as buffering, I allocate a
> temporary buffer: in each case we abandon the per-cpu arrays which
> need preemption disabled. But neither patch is good enough yet.

I'd like to note that the page table walking:

TLB = ... -> pgd[i] -> pud[j] -> pmd[k] -> pte[l]

is not safe on some of the architectures which load TLB entries
"by hand", i.e. by use of some low level assembly routines,
e.g. IA64, Power.
Please refer to the thread "RFC: RCU protected page table walking".

Only some "careful programming" in the PUD / PMD / PTE page removal
code can help.
I propose a way to make sure that the page table walkers will be
able to finish their walks in safety; we release a directory page
when no more walker can reference the page.

Therefore I'd appreciate much a solution that would not use the
directory pages themselves as buffering. I'll need to preserve them
until the RCU based reclaim side.