From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755643AbaAFQtI (ORCPT ); Mon, 6 Jan 2014 11:49:08 -0500 Received: from merlin.infradead.org ([205.233.59.134]:35765 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753411AbaAFQtF (ORCPT ); Mon, 6 Jan 2014 11:49:05 -0500 Date: Mon, 6 Jan 2014 17:48:38 +0100 From: Peter Zijlstra To: Arjan van de Ven Cc: Preeti U Murthy , Vincent Guittot , linux-kernel@vger.kernel.org, mingo@kernel.org, pjt@google.com, Morten.Rasmussen@arm.com, cmetcalf@tilera.com, tony.luck@intel.com, alex.shi@linaro.org, linaro-kernel@lists.linaro.org, rjw@sisk.pl, paulmck@linux.vnet.ibm.com, corbet@lwn.net, tglx@linutronix.de, len.brown@intel.com, amit.kucheria@linaro.org, james.hogan@imgtec.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, Dietmar.Eggemann@arm.com Subject: Re: [RFC] sched: CPU topology try Message-ID: <20140106164838.GR31570@twins.programming.kicks-ass.net> References: <20131105222752.GD16117@laptop.programming.kicks-ass.net> <1387372431-2644-1-git-send-email-vincent.guittot@linaro.org> <52C3A0F1.3040803@linux.vnet.ibm.com> <20140106163341.GO31570@twins.programming.kicks-ass.net> <52CADBB9.1010704@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52CADBB9.1010704@linux.intel.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, Jan 06, 2014 at 08:37:13AM -0800, Arjan van de Ven wrote: > On 1/6/2014 8:33 AM, Peter Zijlstra wrote: > >On Wed, Jan 01, 2014 at 10:30:33AM +0530, Preeti U Murthy wrote: > >>The design looks good to me. In my opinion information like P-states and > >>C-states dependency can be kept separate from the topology levels, it > >>might get too complicated unless the information is tightly coupled to > >>the topology. > > > >I'm not entirely convinced we can keep them separated, the moment we > >have multiple CPUs sharing a P or C state we need somewhere to manage > >the shared state and the domain tree seems like the most natural place > >for this. > > > >Now it might well be both P and C states operate at 'natural' domains > >which we already have so it might be 'easy'. > > more than that though.. P and C state sharing is mostly hidden from the OS > (because the OS does not have the ability to do this; e.g. there are things > that do "if THIS cpu goes idle, the OTHER cpu P state changes automatic". > > that's not just on x86, the ARM guys (iirc at least the latest snapdragon) are going in that > direction as well..... > > for those systems, the OS really should just make local decisions and let the hardware > cope with hardware grouping. AFAICT this is a chicken-egg problem, the OS never did anything useful with it so the hardware guys are now trying to do something with it, but this also means that if we cannot predict what the hardware will do under certain circumstances the OS really cannot do anything smart anymore. So yes, for certain hardware we'll just have to give up and not do anything. That said, some hardware still does allow us to do something and for those we do need some of this. Maybe if the OS becomes smart enough the hardware guys will give us some control again, who knows. So yes, I'm entirely fine saying that some chips are fucked and we can't do anything sane with them.. Fine they get to sort things themselves.