Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16319
b: refs/heads/master
c: 2d92c5c
h: refs/heads/master
i:
  16317: 3e2e2d6
  16315: 9c4abde
  16311: 2ae512c
  16303: 0d51423
  16287: 97a6b7e
  16255: b69fd24
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Jan 6, 2006
1 parent 7edeba7 commit bd25bb0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13e7444b0ec59f96d81a4e8c379d5f38fc5f2cc1
refs/heads/master: 2d92c5c9150a2a9ca3dc25da58d5042e17a96b6a
1 change: 0 additions & 1 deletion trunk/include/linux/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ struct zone_padding {

struct per_cpu_pages {
int count; /* number of pages in the list */
int low; /* low watermark, refill needed */
int high; /* high watermark, emptying needed */
int batch; /* chunk size for buddy add/remove */
struct list_head list; /* the list of pages */
Expand Down
9 changes: 2 additions & 7 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ buffered_rmqueue(struct zone *zone, int order, gfp_t gfp_flags)
page = NULL;
pcp = &zone_pcp(zone, get_cpu())->pcp[cold];
local_irq_save(flags);
if (pcp->count <= pcp->low)
if (!pcp->count)
pcp->count += rmqueue_bulk(zone, 0,
pcp->batch, &pcp->list);
if (likely(pcp->count)) {
Expand Down Expand Up @@ -1345,10 +1345,9 @@ void show_free_areas(void)
pageset = zone_pcp(zone, cpu);

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,
temperature ? "cold" : "hot",
pageset->pcp[temperature].low,
pageset->pcp[temperature].high,
pageset->pcp[temperature].batch,
pageset->pcp[temperature].count);
Expand Down Expand Up @@ -1790,14 +1789,12 @@ inline void setup_pageset(struct per_cpu_pageset *p, unsigned long batch)

pcp = &p->pcp[0]; /* hot */
pcp->count = 0;
pcp->low = 0;
pcp->high = 6 * batch;
pcp->batch = max(1UL, 1 * batch);
INIT_LIST_HEAD(&pcp->list);

pcp = &p->pcp[1]; /* cold*/
pcp->count = 0;
pcp->low = 0;
pcp->high = 2 * batch;
pcp->batch = max(1UL, batch/2);
INIT_LIST_HEAD(&pcp->list);
Expand Down Expand Up @@ -2193,12 +2190,10 @@ static int zoneinfo_show(struct seq_file *m, void *arg)
seq_printf(m,
"\n cpu: %i pcp: %i"
"\n count: %i"
"\n low: %i"
"\n high: %i"
"\n batch: %i",
i, j,
pageset->pcp[j].count,
pageset->pcp[j].low,
pageset->pcp[j].high,
pageset->pcp[j].batch);
}
Expand Down

0 comments on commit bd25bb0

Please sign in to comment.