From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932068AbaAUQP0 (ORCPT ); Tue, 21 Jan 2014 11:15:26 -0500 Received: from cantor2.suse.de ([195.135.220.15]:47688 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755027AbaAUQPW (ORCPT ); Tue, 21 Jan 2014 11:15:22 -0500 Date: Tue, 21 Jan 2014 16:15:18 +0000 From: Mel Gorman To: riel@redhat.com Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, peterz@infradead.org, mingo@redhat.com, chegu_vinod@hp.com Subject: Re: [PATCH 6/6] numa,sched: do statistics calculation using local variables only Message-ID: <20140121161518.GM4963@suse.de> References: <1390245667-24193-1-git-send-email-riel@redhat.com> <1390245667-24193-7-git-send-email-riel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1390245667-24193-7-git-send-email-riel@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 20, 2014 at 02:21:07PM -0500, riel@redhat.com wrote: > From: Rik van Riel > > The current code in task_numa_placement calculates the difference > between the old and the new value, but also temporarily stores half > of the old value in the per-process variables. > > The NUMA balancing code looks at those per-process variables, and > having other tasks temporarily see halved statistics could lead to > unwanted numa migrations. This can be avoided by doing all the math > in local variables. > > This change also simplifies the code a little. > > Cc: Peter Zijlstra > Cc: Mel Gorman > Cc: Ingo Molnar > Cc: Chegu Vinod > Signed-off-by: Rik van Riel Acked-by: Mel Gorman -- Mel Gorman SUSE Labs