lkml.org 
[lkml]   [2016]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 15/27] mm, workingset: Make working set detection node-aware
On Tue, Feb 23, 2016 at 03:04:38PM +0000, Mel Gorman wrote:
> @@ -167,33 +167,30 @@
> */
> static unsigned int bucket_order __read_mostly;
>
> -static void *pack_shadow(int memcgid, struct zone *zone, unsigned long eviction)
> +static void *pack_shadow(int memcgid, pg_data_t *pgdat, unsigned long eviction)
> {
> eviction >>= bucket_order;
> eviction = (eviction << MEM_CGROUP_ID_SHIFT) | memcgid;
> - eviction = (eviction << NODES_SHIFT) | zone_to_nid(zone);
> - eviction = (eviction << ZONES_SHIFT) | zone_idx(zone);
> + eviction = (eviction << NODES_SHIFT) | pgdat->node_id;
> eviction = (eviction << RADIX_TREE_EXCEPTIONAL_SHIFT);

You need to remove ZONES_SHIFT from the EVICTION_SHIFT as well.

Other than that it looks good to me.

Acked-by: Johannes Weiner <hannes@cmpxchg.org>

\
 
 \ /
  Last update: 2016-02-28 17:41    [W:1.524 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site