diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2009-01-07 21:08:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 11:31:07 -0500 |
commit | 6e9015716ae9b59e9635d692fddfcfb9582c146c (patch) | |
tree | e1876d3822c46a20e1c35b41580f5ef6b2f6e053 /include | |
parent | f89eb90e33fd4e4e0cc1a6d20afd63c5a561885a (diff) |
mm: introduce zone_reclaim struct
Add zone_reclam_stat struct for later enhancement.
A later patch uses this. This patch doesn't any behavior change (yet).
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmzone.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 35a7b5e19465..09c14e213b63 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -263,6 +263,19 @@ enum zone_type { | |||
263 | #error ZONES_SHIFT -- too many zones configured adjust calculation | 263 | #error ZONES_SHIFT -- too many zones configured adjust calculation |
264 | #endif | 264 | #endif |
265 | 265 | ||
266 | struct zone_reclaim_stat { | ||
267 | /* | ||
268 | * The pageout code in vmscan.c keeps track of how many of the | ||
269 | * mem/swap backed and file backed pages are refeferenced. | ||
270 | * The higher the rotated/scanned ratio, the more valuable | ||
271 | * that cache is. | ||
272 | * | ||
273 | * The anon LRU stats live in [0], file LRU stats in [1] | ||
274 | */ | ||
275 | unsigned long recent_rotated[2]; | ||
276 | unsigned long recent_scanned[2]; | ||
277 | }; | ||
278 | |||
266 | struct zone { | 279 | struct zone { |
267 | /* Fields commonly accessed by the page allocator */ | 280 | /* Fields commonly accessed by the page allocator */ |
268 | unsigned long pages_min, pages_low, pages_high; | 281 | unsigned long pages_min, pages_low, pages_high; |
@@ -315,16 +328,7 @@ struct zone { | |||
315 | unsigned long nr_scan; | 328 | unsigned long nr_scan; |
316 | } lru[NR_LRU_LISTS]; | 329 | } lru[NR_LRU_LISTS]; |
317 | 330 | ||
318 | /* | 331 | struct zone_reclaim_stat reclaim_stat; |
319 | * The pageout code in vmscan.c keeps track of how many of the | ||
320 | * mem/swap backed and file backed pages are refeferenced. | ||
321 | * The higher the rotated/scanned ratio, the more valuable | ||
322 | * that cache is. | ||
323 | * | ||
324 | * The anon LRU stats live in [0], file LRU stats in [1] | ||
325 | */ | ||
326 | unsigned long recent_rotated[2]; | ||
327 | unsigned long recent_scanned[2]; | ||
328 | 332 | ||
329 | unsigned long pages_scanned; /* since last reclaim */ | 333 | unsigned long pages_scanned; /* since last reclaim */ |
330 | unsigned long flags; /* zone flags, see below */ | 334 | unsigned long flags; /* zone flags, see below */ |