From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753931AbbERPKR (ORCPT ); Mon, 18 May 2015 11:10:17 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:53410 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752430AbbERPKK (ORCPT ); Mon, 18 May 2015 11:10:10 -0400 Date: Mon, 18 May 2015 17:09:47 +0200 From: Peter Zijlstra To: Srikar Dronamraju Cc: mingo@kernel.org, riel@redhat.com, dedekind1@gmail.com, linux-kernel@vger.kernel.org, mgorman@suse.de, rostedt@goodmis.org, juri.lelli@arm.com Subject: Re: [RFC][PATCH 4/4] sched, numa: Ignore pinned tasks Message-ID: <20150518150947.GA5404@twins.programming.kicks-ass.net> References: <20150515154333.712161952@infradead.org> <20150515154833.726258767@infradead.org> <20150518130050.GA2934@linux.vnet.ibm.com> <1431954418.3322.3.camel@twins> <20150518142940.GC2934@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150518142940.GC2934@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 18, 2015 at 07:59:40PM +0530, Srikar Dronamraju wrote: > > We should never get preferred_nid set when nr_cpus_allowed == 1, see the > > hunk that changes task_tick_numa. > > > > So we set preferred = -1 on pinning, do not partake in numa balancing > > while this is so, therefore it should still be so when we dequeue, > > right? > > lets say if a thread were to do a sched_setaffinity on itself ; > would it not call account_numa_dequeue before account_numa_enqueue? Yes, but it would call dequeue while nr_cpus_allowed was still the 'old' value. And it will call enqueue when its the 'new' value. > Also setting preferred = -1 in set_cpus_allowed avoids us from setting > it at account_numa_enqueue. account_numa_enqueue() would probably be > called more times than set_cpus_allowed. This is true; and that makes sense.