[PATCH] mm: remove pcp low
struct per_cpu_pages.low is useless. Remove it. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
13e7444b0e
commit
2d92c5c915
@@ -46,7 +46,6 @@ struct zone_padding {
|
|||||||
|
|
||||||
struct per_cpu_pages {
|
struct per_cpu_pages {
|
||||||
int count; /* number of pages in the list */
|
int count; /* number of pages in the list */
|
||||||
int low; /* low watermark, refill needed */
|
|
||||||
int high; /* high watermark, emptying needed */
|
int high; /* high watermark, emptying needed */
|
||||||
int batch; /* chunk size for buddy add/remove */
|
int batch; /* chunk size for buddy add/remove */
|
||||||
struct list_head list; /* the list of pages */
|
struct list_head list; /* the list of pages */
|
||||||
|
@@ -740,7 +740,7 @@ again:
|
|||||||
page = NULL;
|
page = NULL;
|
||||||
pcp = &zone_pcp(zone, get_cpu())->pcp[cold];
|
pcp = &zone_pcp(zone, get_cpu())->pcp[cold];
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
if (pcp->count <= pcp->low)
|
if (!pcp->count)
|
||||||
pcp->count += rmqueue_bulk(zone, 0,
|
pcp->count += rmqueue_bulk(zone, 0,
|
||||||
pcp->batch, &pcp->list);
|
pcp->batch, &pcp->list);
|
||||||
if (likely(pcp->count)) {
|
if (likely(pcp->count)) {
|
||||||
@@ -1345,10 +1345,9 @@ void show_free_areas(void)
|
|||||||
pageset = zone_pcp(zone, cpu);
|
pageset = zone_pcp(zone, cpu);
|
||||||
|
|
||||||
for (temperature = 0; temperature < 2; temperature++)
|
for (temperature = 0; temperature < 2; temperature++)
|
||||||
printk("cpu %d %s: low %d, high %d, batch %d used:%d\n",
|
printk("cpu %d %s: high %d, batch %d used:%d\n",
|
||||||
cpu,
|
cpu,
|
||||||
temperature ? "cold" : "hot",
|
temperature ? "cold" : "hot",
|
||||||
pageset->pcp[temperature].low,
|
|
||||||
pageset->pcp[temperature].high,
|
pageset->pcp[temperature].high,
|
||||||
pageset->pcp[temperature].batch,
|
pageset->pcp[temperature].batch,
|
||||||
pageset->pcp[temperature].count);
|
pageset->pcp[temperature].count);
|
||||||
@@ -1790,14 +1789,12 @@ inline void setup_pageset(struct per_cpu_pageset *p, unsigned long batch)
|
|||||||
|
|
||||||
pcp = &p->pcp[0]; /* hot */
|
pcp = &p->pcp[0]; /* hot */
|
||||||
pcp->count = 0;
|
pcp->count = 0;
|
||||||
pcp->low = 0;
|
|
||||||
pcp->high = 6 * batch;
|
pcp->high = 6 * batch;
|
||||||
pcp->batch = max(1UL, 1 * batch);
|
pcp->batch = max(1UL, 1 * batch);
|
||||||
INIT_LIST_HEAD(&pcp->list);
|
INIT_LIST_HEAD(&pcp->list);
|
||||||
|
|
||||||
pcp = &p->pcp[1]; /* cold*/
|
pcp = &p->pcp[1]; /* cold*/
|
||||||
pcp->count = 0;
|
pcp->count = 0;
|
||||||
pcp->low = 0;
|
|
||||||
pcp->high = 2 * batch;
|
pcp->high = 2 * batch;
|
||||||
pcp->batch = max(1UL, batch/2);
|
pcp->batch = max(1UL, batch/2);
|
||||||
INIT_LIST_HEAD(&pcp->list);
|
INIT_LIST_HEAD(&pcp->list);
|
||||||
@@ -2193,12 +2190,10 @@ static int zoneinfo_show(struct seq_file *m, void *arg)
|
|||||||
seq_printf(m,
|
seq_printf(m,
|
||||||
"\n cpu: %i pcp: %i"
|
"\n cpu: %i pcp: %i"
|
||||||
"\n count: %i"
|
"\n count: %i"
|
||||||
"\n low: %i"
|
|
||||||
"\n high: %i"
|
"\n high: %i"
|
||||||
"\n batch: %i",
|
"\n batch: %i",
|
||||||
i, j,
|
i, j,
|
||||||
pageset->pcp[j].count,
|
pageset->pcp[j].count,
|
||||||
pageset->pcp[j].low,
|
|
||||||
pageset->pcp[j].high,
|
pageset->pcp[j].high,
|
||||||
pageset->pcp[j].batch);
|
pageset->pcp[j].batch);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user