Re: mprotect() api overhead.

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 23 Mar 2002 01:03:00 +0000 (GMT)


> For x86 system, is there way to specify 4MB page table entry
> instead of 4K page table entry when use the mmap() api.
> With 4MB mmap() page table entry, mprotected should take only
> 8 iterations to change the access bits for 32 MB of share
> memory as compare to 8k iterations for 4k page table entries.
> Am I corrected on this?

The mainstream kernel has no real support for 4Mb pages - some experimental
work has been done but little else. Even then the TLB flush has a non
trivial overhead. On SMP the effect will be more significant since it
must ensure the other threads on other processors also see updated page
tables.

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