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/