Re: Linux-2.5.17

Roman Zippel (zippel@linux-m68k.org)
Wed, 22 May 2002 15:45:22 +0200 (CEST)


Hi,

On Tue, 21 May 2002, Linus Torvalds wrote:

> > > x86, to be exact ;(
> >
> > IMO that's not really problem, the pmd tables are created and destroyed
> > with the pgd table.
>
> unmap()?

We already don't let the general vm touch the pgd entries for the same
reason, so I don't think that's really a big problem.
Using the present bit has another consequence. unmap() had to be done in
two phases:
1. Disable the table entries at the highest possible level. Using the
previous and following vma avoids scanning the tables (something like
free_pgtables already does, only more accurate).
2. Scan the tables and free all the disabled entries. At this point we
don't have worry about any tlb issues anymore.

I can see a few advantages doing it this way. The first phase could be
quite fast even for large unmaps and so reducing the time holding the
page_table_lock. It avoids the race mentioned by Paul (although a
ptep_clear_present() would still be needed). It would also free up more
unused tables. The tlb shootdown stuff would be simpler as well.
On the other hand it's a rather rough idea and I don't know how feasible
it really is, but without the exit case it should become easier and IMO
worth a try.

bye, Roman

-
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/