Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93982
b: refs/heads/master
c: 18ea7e7
h: refs/heads/master
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed Apr 28, 2008
1 parent f0b2036 commit f0cb27f
Show file tree
Hide file tree
Showing 4 changed files with 10 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: 0e88460da6ab7bb6a7ef83675412ed5b6315d741
refs/heads/master: 18ea7e710d2452fa726814a406779188028cf1bf
2 changes: 1 addition & 1 deletion trunk/include/linux/vmstat.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static inline unsigned long node_page_state(int node,
zone_page_state(&zones[ZONE_MOVABLE], item);
}

extern void zone_statistics(struct zonelist *, struct zone *);
extern void zone_statistics(struct zone *, struct zone *);

#else

Expand Down
9 changes: 5 additions & 4 deletions trunk/mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ void split_page(struct page *page, unsigned int order)
* we cheat by calling it from here, in the order > 0 path. Saves a branch
* or two.
*/
static struct page *buffered_rmqueue(struct zonelist *zonelist,
static struct page *buffered_rmqueue(struct zone *preferred_zone,
struct zone *zone, int order, gfp_t gfp_flags)
{
unsigned long flags;
Expand Down Expand Up @@ -1102,7 +1102,7 @@ static struct page *buffered_rmqueue(struct zonelist *zonelist,
}

__count_zone_vm_events(PGALLOC, zone, 1 << order);
zone_statistics(zonelist, zone);
zone_statistics(preferred_zone, zone);
local_irq_restore(flags);
put_cpu();

Expand Down Expand Up @@ -1383,7 +1383,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order,
struct zone **z;
struct page *page = NULL;
int classzone_idx = zone_idx(zonelist->zones[0]);
struct zone *zone;
struct zone *zone, *preferred_zone;
nodemask_t *allowednodes = NULL;/* zonelist_cache approximation */
int zlc_active = 0; /* set if using zonelist_cache */
int did_zlc_setup = 0; /* just call zlc_setup() one time */
Expand All @@ -1395,6 +1395,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order,
* See also cpuset_zone_allowed() comment in kernel/cpuset.c.
*/
z = zonelist->zones;
preferred_zone = *z;

do {
/*
Expand Down Expand Up @@ -1433,7 +1434,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order,
}
}

page = buffered_rmqueue(zonelist, zone, order, gfp_mask);
page = buffered_rmqueue(preferred_zone, zone, order, gfp_mask);
if (page)
break;
this_zone_full:
Expand Down
6 changes: 3 additions & 3 deletions trunk/mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,13 @@ void refresh_cpu_vm_stats(int cpu)
*
* Must be called with interrupts disabled.
*/
void zone_statistics(struct zonelist *zonelist, struct zone *z)
void zone_statistics(struct zone *preferred_zone, struct zone *z)
{
if (z->zone_pgdat == zonelist->zones[0]->zone_pgdat) {
if (z->zone_pgdat == preferred_zone->zone_pgdat) {
__inc_zone_state(z, NUMA_HIT);
} else {
__inc_zone_state(z, NUMA_MISS);
__inc_zone_state(zonelist->zones[0], NUMA_FOREIGN);
__inc_zone_state(preferred_zone, NUMA_FOREIGN);
}
if (z->node == numa_node_id())
__inc_zone_state(z, NUMA_LOCAL);
Expand Down

0 comments on commit f0cb27f

Please sign in to comment.