aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmstat.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-02-05 01:29:19 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:18 -0500
commit3dfa5721f12c3d5a441448086bee156887daa961 (patch)
tree8ace8c3f842f8b626b762bb9d2a9b24d8e3bd130 /mm/vmstat.c
parent5dc331852848a38ca00a2817e5b98a1d0561b116 (diff)
Page allocator: get rid of the list of cold pages
We have repeatedly discussed if the cold pages still have a point. There is one way to join the two lists: Use a single list and put the cold pages at the end and the hot pages at the beginning. That way a single list can serve for both types of allocations. The discussion of the RFC for this and Mel's measurements indicate that there may not be too much of a point left to having separate lists for hot and cold pages (see http://marc.info/?t=119492914200001&r=1&w=2). Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Martin Bligh <mbligh@mbligh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r--mm/vmstat.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 9ffc573ceb6e..888668e0b7db 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -337,7 +337,7 @@ void refresh_cpu_vm_stats(int cpu)
337 * Check if there are pages remaining in this pageset 337 * Check if there are pages remaining in this pageset
338 * if not then there is nothing to expire. 338 * if not then there is nothing to expire.
339 */ 339 */
340 if (!p->expire || (!p->pcp[0].count && !p->pcp[1].count)) 340 if (!p->expire || !p->pcp.count)
341 continue; 341 continue;
342 342
343 /* 343 /*
@@ -352,11 +352,8 @@ void refresh_cpu_vm_stats(int cpu)
352 if (p->expire) 352 if (p->expire)
353 continue; 353 continue;
354 354
355 if (p->pcp[0].count) 355 if (p->pcp.count)
356 drain_zone_pages(zone, p->pcp + 0); 356 drain_zone_pages(zone, &p->pcp);
357
358 if (p->pcp[1].count)
359 drain_zone_pages(zone, p->pcp + 1);
360#endif 357#endif
361 } 358 }
362 359
@@ -693,20 +690,17 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
693 "\n pagesets"); 690 "\n pagesets");
694 for_each_online_cpu(i) { 691 for_each_online_cpu(i) {
695 struct per_cpu_pageset *pageset; 692 struct per_cpu_pageset *pageset;
696 int j;
697 693
698 pageset = zone_pcp(zone, i); 694 pageset = zone_pcp(zone, i);
699 for (j = 0; j < ARRAY_SIZE(pageset->pcp); j++) { 695 seq_printf(m,
700 seq_printf(m, 696 "\n cpu: %i"
701 "\n cpu: %i pcp: %i" 697 "\n count: %i"
702 "\n count: %i" 698 "\n high: %i"
703 "\n high: %i" 699 "\n batch: %i",
704 "\n batch: %i", 700 i,
705 i, j, 701 pageset->pcp.count,
706 pageset->pcp[j].count, 702 pageset->pcp.high,
707 pageset->pcp[j].high, 703 pageset->pcp.batch);
708 pageset->pcp[j].batch);
709 }
710#ifdef CONFIG_SMP 704#ifdef CONFIG_SMP
711 seq_printf(m, "\n vm stats threshold: %d", 705 seq_printf(m, "\n vm stats threshold: %d",
712 pageset->stat_threshold); 706 pageset->stat_threshold);