Adam 'WeirdArms' Wiggins writes:
> Besdies the initial booting of the kernel what is the
> swapper_pg_dir used for? Is it free'd after the kernel is up
> and running? Or is it allocated to a special process?
Its used for all kernel tasks. (kswapd, keventd, rpciod, swapper(pid 0) etc)
> If it is kept/used does it contain any mappings in the user region (lower
> 3 gig) of the address space?
No.
However, note that when the kernel switches: process1 -> swapper -> process1
no change of CPU page tables occurs, and therefore none of the expensive
cache flushing is incurred. This is because these tasks which don't access
user space are special - they are "Lazy TLB" tasks. This essentially means
that we don't change the pagetable mappings.
> I'm playing with some idea's of speeding up process context switch
> times. This involves using a single page directory as a kind of Software
> TLB which is loaded from user process page directories.
I'm not sure how this helps you. Firstly, to manage the first level page
table in this way, you're talking about taking the following penalties:
1. Touching all the user-space mappings on process switches (this is about 12K)
2. Making the user fault in the required mappings for this time slice
(each page fault is likely to be moderately expensive in itself)
3. on each fault, flushing at least part of the cache.
Once you've added up all this expense, its likely to be greater than
the 16K load.
BTW, why did you post this to linux-arm and not linux-arm-kernel where it
obviously should've been posted?
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King [EMAIL PROTECTED] --- ---
| | | | http://www.arm.linux.org.uk/ / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |
_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm