From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752155AbcF3K6L (ORCPT ); Thu, 30 Jun 2016 06:58:11 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:36527 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751601AbcF3K6J (ORCPT ); Thu, 30 Jun 2016 06:58:09 -0400 Date: Thu, 30 Jun 2016 12:58:05 +0200 From: Peter Zijlstra To: Jiri Olsa Cc: Ingo Molnar , lkml , James Hartsock , Rik van Riel , Srivatsa Vaddagiri , Kirill Tkhai Subject: Re: [PATCH 3/4] sched/fair: Add REBALANCE_AFFINITY rebalancing code Message-ID: <20160630105805.GC30154@twins.programming.kicks-ass.net> References: <1466424914-8981-1-git-send-email-jolsa@kernel.org> <1466424914-8981-4-git-send-email-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1466424914-8981-4-git-send-email-jolsa@kernel.org> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 20, 2016 at 02:15:13PM +0200, Jiri Olsa wrote: > Sched domains are defined at the start and can't be changed > during runtime. Not entirely true; you can change them using cpusets, although there are strict constraints on how and you can only make the 'problem' worse. > If user defines workload affinity settings > unevenly with sched domains, he could get unbalanced state > within his affinity group, like: > > Say we have following sched domains: > domain 0: (pairs) s/pairs/smt siblings/ > domain 1: 0-5,12-17 (group1) 6-11,18-23 (group2) this would typically be cache groups > domain 2: 0-23 level NUMA > > User runs workload with affinity setup that takes > one CPU from group1 (0) and the rest from group 2: > 0,6,7,8,9,10,11,18,19,20,21,22 But who would do something like that? I'm really missing a problem statement here. Who cares and why? sched_setaffinity() is an interface that says I know what I'm doing, and you seem to be solving a problem resulting from not actually knowing wth you're doing. I'm not saying we shouldn't look into it, but I really want more justification for this. > User will see idle CPUs within his affinity group, > because load balancer will balance tasks based on load > within group1 and group2, thus placing eqaul load > of tasks on CPU 0 and on the rest of CPUs. So afaict this thing only cares about idleness, and we should be able to fix that differently. The real problem is maintaining fairness in the overloaded case under such silly constraints. So why do you only care about this specific issue.