From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754751AbdFLPgq (ORCPT ); Mon, 12 Jun 2017 11:36:46 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:38341 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754712AbdFLPgl (ORCPT ); Mon, 12 Jun 2017 11:36:41 -0400 Date: Mon, 12 Jun 2017 17:36:34 +0200 From: Peter Zijlstra To: Rohit Jain Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, vincent.guittot@linaro.org, morten.rasmussen@arm.com, dietmar.eggemann@arm.com, Dhaval Giani Subject: Re: [PATCH] sched: Introduce scaled capacity awareness in enqueue Message-ID: <20170612153634.eoj3khfbexbijcdp@hirez.programming.kicks-ass.net> References: <1495486094-9097-1-git-send-email-rohit.k.jain@oracle.com> <20170530122831.5fyywtplq4jawj3j@hirez.programming.kicks-ass.net> <63736e6f-37e6-e287-a920-56ab0d0586b7@oracle.com> <20170601122827.5ptc3n47vvk2y7k7@hirez.programming.kicks-ass.net> <20170601123745.llebc4ur23d7t4fw@hirez.programming.kicks-ass.net> <20170602182621.gnpjs4fpvwze2hfr@hirez.programming.kicks-ass.net> <6a613277-8e2c-4c05-1420-b288d15a036b@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a613277-8e2c-4c05-1420-b288d15a036b@oracle.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 05, 2017 at 11:08:38AM -0700, Rohit Jain wrote: > > Why does determining if a CPU's capacity is scaled down need to involve > > global data? AFAICT its a purely CPU local affair. > > The global array is used to determine the threshold capacity, so > that any CPU which lies below decides that a CPU is 'running low' on > available capacity. This threshold can also be statically defined to > be a fixed fraction, but having dynamic calculation to determine the > threshold works for all benchmarks. Firstly, you should have explained that. Secondly it still is very much an incomplete explanation. Again why does that matter? What scenario is important for what workload? Thirdly, did you consider heterogeneous setups, where CPUs can have different capacities? And clearly you did not consider the 4K CPUs case, 4K cpus poking at a global data structure will completely come apart. > Did you mean we should use a static cutoff and decide whether a CPU > should be treated low on capacity and skip it during idle CPU search? Yes. Why would that not suffice? You've not even begun to explain why you need all the additional complexity. And if the next patch doesn't explain things, I'll just ignore it entirely.