From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759038AbcB1QRW (ORCPT ); Sun, 28 Feb 2016 11:17:22 -0500 Received: from gum.cmpxchg.org ([85.214.110.215]:60974 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758666AbcB1QRV (ORCPT ); Sun, 28 Feb 2016 11:17:21 -0500 Date: Sun, 28 Feb 2016 11:17:13 -0500 From: Johannes Weiner To: Mel Gorman Cc: Linux-MM , Rik van Riel , Vlastimil Babka , LKML Subject: Re: [PATCH 15/27] mm, workingset: Make working set detection node-aware Message-ID: <20160228161713.GF25622@cmpxchg.org> References: <1456239890-20737-1-git-send-email-mgorman@techsingularity.net> <1456239890-20737-16-git-send-email-mgorman@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1456239890-20737-16-git-send-email-mgorman@techsingularity.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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