From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755367Ab2IRVDQ (ORCPT ); Tue, 18 Sep 2012 17:03:16 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38028 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755186Ab2IRVDO (ORCPT ); Tue, 18 Sep 2012 17:03:14 -0400 Date: Tue, 18 Sep 2012 14:03:13 -0700 From: Andrew Morton To: David Rientjes Cc: Mel Gorman , Minchan Kim , KAMEZAWA Hiroyuki , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch] mm, numa: reclaim from all nodes within reclaim distance Message-Id: <20120918140313.236f7a66.akpm@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Sep 2012 00:03:57 -0700 (PDT) David Rientjes wrote: > RECLAIM_DISTANCE represents the distance between nodes at which it is > deemed too costly to allocate from; it's preferred to try to reclaim from > a local zone before falling back to allocating on a remote node with such > a distance. > > To do this, zone_reclaim_mode is set if the distance between any two > nodes on the system is greather than this distance. This, however, ends > up causing the page allocator to reclaim from every zone regardless of > its affinity. > > What we really want is to reclaim only from zones that are closer than > RECLAIM_DISTANCE. This patch adds a nodemask to each node that > represents the set of nodes that are within this distance. During the > zone iteration, if the bit for a zone's node is set for the local node, > then reclaim is attempted; otherwise, the zone is skipped. Is this a theoretical thing, or does the patch have real observable effects? This change makes it more important that the arch code implements node_distance() accurately (wrt RECLAIM_DISTANCE), yes? I wonder how much code screwed that up, and what the effects of such a screwup would be, and how arch maintainers would go about detecting then fixing such an error?