[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Crazy idea #1: uvm_fpageqlock
On Sat, Apr 02, 2011 at 01:10:02PM +0000, Andrew Doran wrote:
> What I propose is to maintain the global list of pages pretty much as is,
> but to split off the per-CPU lists so that they would have their own locks.
> With the exception of uvm_pglistalloc() they would only be accessed by the
> local CPU, effectively functioning as a local cache of free pages.
There will be workloads that 'pump' pages from one cpu to another.
So whatever system used needs to allow for that.
The folowing might help:
1) On page free, if there are a lot of pages on the local list, move
a load of them to the global list.
2a) On page alloc, if the local list is empty, get a a load of pages from
the global list.
2b) On page alloc, if both the local and global lists are free, steal
some from another cpu (either acquring its lock, or by xcall).
I've no idea how you decide how many pages (n) to move each time!
It might be worth linking free pages together in lists of (n) pages to
make such movements easier (to save counting through linked lists).
This is much the same as should be being done for per-cpu free lists
Using arrays of pointers is better for the cache than linked lists,
not sure whether this would be significant.
David Laight: david%l8s.co.uk@localhost
Main Index |
Thread Index |