Messages in this thread | | | Date | Wed, 20 Mar 2002 11:11:23 -0800 | From | Andrew Morton <> | Subject | Re: aa-110-zone_accounting |
| |
Rik van Riel wrote: > > On Tue, 19 Mar 2002, Andrew Morton wrote: > > > 1: page_cache_size is no longer an atomic type - it's now just an > > unsigned long. It's always altered under pagecache_lock. > > Is this change worth it ? This code will have to be changed > back in any patch trying to fine-grain the pagecache lock...
Yes, it's the right change. Changes to page_cache_size always occur at the same time as changes to the per-zone accounting. So the locking is shared and it all nestles nicely.
In the longer-term we don't want that atomic_t either. We need to avoid global and even per-zone atomic_t's and locks.
> Alternatively, maybe we should hide the page_cache_size behind > magic macros too, so it's easier to change the underlying data > structure(s).
I currently have:
+extern struct page_state { + unsigned long nr_dirty; + unsigned long nr_locked; + unsigned long nr_pagecache; +} ____cacheline_aligned page_states[NR_CPUS]; + +extern void get_page_state(struct page_state *ret);
- - 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/
| |