From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754871AbbEPJcM (ORCPT ); Sat, 16 May 2015 05:32:12 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:35494 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752912AbbEPJcI (ORCPT ); Sat, 16 May 2015 05:32:08 -0400 Date: Sat, 16 May 2015 11:31:48 +0200 From: Peter Zijlstra To: mingo@kernel.org, riel@redhat.com Cc: 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: <20150516093148.GZ21418@twins.programming.kicks-ass.net> References: <20150515154333.712161952@infradead.org> <20150515154833.726258767@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150515154833.726258767@infradead.org> 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 Fri, May 15, 2015 at 05:43:37PM +0200, Peter Zijlstra wrote: > static void account_numa_enqueue(struct rq *rq, struct task_struct *p) > { > + if (p->nr_cpus_allowed == 1) { > + p->numa_preferred_nid = -1; > + rq->nr_pinned_running++; > + } > rq->nr_numa_running += (p->numa_preferred_nid != -1); > rq->nr_preferred_running += (p->numa_preferred_nid == task_node(p)); > } > static inline enum fbq_type fbq_classify_rq(struct rq *rq) > { > + unsigned int nr_migratable = rq->cfs.h_nr_running - rq->nr_pinned_running; > + FWIW, there's a problem there with CFS bandwidth muck. When we throttle groups we update cfs.h_nr_running properly, but we do not hierarchically account the pinned, preferred and numa counts. So that above subtraction can end up negative. I've not yet decided what to do about this; ideally we'd do the hierarchical accounting of the numa stats -- but that's a little bit more expensive than I'd like. A well. for monday that.