Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3510344ybg; Mon, 28 Oct 2019 14:06:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAPC4RuDtv2clESnjvRZqRWQ4bYtRcovdGyIvertHF4QV4DkD+FJ3ZKWJabMM3o43zC54B X-Received: by 2002:a17:907:4336:: with SMTP id ni6mr8436575ejb.288.1572296766749; Mon, 28 Oct 2019 14:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572296766; cv=none; d=google.com; s=arc-20160816; b=uI7a2C6/vka4wqEDTdlXBP0p8W7udokYewYmat5UCqebkzBtJzHAbzpnVQnCqBDEa6 +gg96fUYsph43ZnLTE5dAHzeY+jgZdfmYex8MCKEAR5g5MsdZRDj7WWhLdQE6A/dX1se Z5uQ5AngMq3iOcUZntm2uOWd4K5XkQ0nwi0vkbANAA/Sw7/y8g0j6a+rfq4Zii0Y/ecy x5C+euVHwcSDtTJibKC1qLbn/u7H3hrZqS5LkXd5BALHmg0bpvca48aPeaCfSTgkW2Nk lCDX5rQH+2GXhXsYNLw0M4TVpUE8e+//qYN8SdIIrLOwuj9+sV6sf6OBuwSSj4pt84nk 4nXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xgAOnlp7ZBAWh5vP0sbEuG/b7xjQLYHGCchMpQ5Bwys=; b=FFBO/YGi/xV2ErobPYggGOFJJl6qp9HiWUP1F1j++DatQ6LzJXKwo/0Tz6yrpE2DUx ns67fpbiTxOzgylavaRbxmmTA2BSQ0vEZXtQ5YEGtkpCLev9wEnOyXsr00zz3JiRT7Tj gEm0Uo1RW/7Dvp9lRkjSpyLD9cAslHHLXjpma4kMUgz0c8nC6sn353eKvGHh3pritOg7 +JXdJ/USxc352ocU/SDFprNwXgGf7452T7gZuvp89y5W1Ia/lzKGZb2zCV1DEgUPE5Ga t78ssZPSY3CPqOXGJ27BhBaj6T9tfuRkVDhZgjwGTUGfEJMa1NeFL/s3VWIl+peb5qnT gJUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="u+/vQ5rH"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c24si9088375edb.328.2019.10.28.14.05.43; Mon, 28 Oct 2019 14:06:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="u+/vQ5rH"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390210AbfJ1OiA (ORCPT + 99 others); Mon, 28 Oct 2019 10:38:00 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49892 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730441AbfJ1OiA (ORCPT ); Mon, 28 Oct 2019 10:38:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xgAOnlp7ZBAWh5vP0sbEuG/b7xjQLYHGCchMpQ5Bwys=; b=u+/vQ5rHWiyiR7BvUFgcsmDHN OInbaBhoUtmHdkfA8zfC/FFemUsniSgG/dWVOepfOH3g7BrAVbVKi6LDopAktdnIdTOsd++/b6F4G nU8pxCvqjk9BEqpCMOZx8hJpBc8A20xxVPqAtquAak+uesymbr6UVLlBFkf9jY6D2TH/3tIwJW9pG yITKfu6lakCSjlFom1DNv61pwEWor8kum2Nu3loZ1M3lsw6gwE35J0KgtrAryY+gUW99l6XnJ5puf o/QNBxpjzoCL7Aedp56R8m1yhfjZkNTqQPgwhVNiJTYuFLte13cZ5pk8m99cO7qJ/jKcmTLAu1AhY eTbcmh9xA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iP69X-0001zs-J4; Mon, 28 Oct 2019 14:37:51 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id BC0013002B0; Mon, 28 Oct 2019 15:36:48 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 171D62100B87C; Mon, 28 Oct 2019 15:37:49 +0100 (CET) Date: Mon, 28 Oct 2019 15:37:49 +0100 From: Peter Zijlstra To: Qais Yousef Cc: Ingo Molnar , Steven Rostedt , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] sched: rt: Make RT capacity aware Message-ID: <20191028143749.GE4114@hirez.programming.kicks-ass.net> References: <20191009104611.15363-1-qais.yousef@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191009104611.15363-1-qais.yousef@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 09, 2019 at 11:46:11AM +0100, Qais Yousef wrote: > Capacity Awareness refers to the fact that on heterogeneous systems > (like Arm big.LITTLE), the capacity of the CPUs is not uniform, hence > when placing tasks we need to be aware of this difference of CPU > capacities. > > In such scenarios we want to ensure that the selected CPU has enough > capacity to meet the requirement of the running task. Enough capacity > means here that capacity_orig_of(cpu) >= task.requirement. > > The definition of task.requirement is dependent on the scheduling class. > > For CFS, utilization is used to select a CPU that has >= capacity value > than the cfs_task.util. > > capacity_orig_of(cpu) >= cfs_task.util > > DL isn't capacity aware at the moment but can make use of the bandwidth > reservation to implement that in a similar manner CFS uses utilization. > The following patchset implements that: > > https://lore.kernel.org/lkml/20190506044836.2914-1-luca.abeni@santannapisa.it/ > > capacity_orig_of(cpu)/SCHED_CAPACITY >= dl_deadline/dl_runtime > > For RT we don't have a per task utilization signal and we lack any > information in general about what performance requirement the RT task > needs. But with the introduction of uclamp, RT tasks can now control > that by setting uclamp_min to guarantee a minimum performance point. > > ATM the uclamp value are only used for frequency selection; but on > heterogeneous systems this is not enough and we need to ensure that the > capacity of the CPU is >= uclamp_min. Which is what implemented here. > > capacity_orig_of(cpu) >= rt_task.uclamp_min > > Note that by default uclamp.min is 1024, which means that RT tasks will > always be biased towards the big CPUs, which make for a better more > predictable behavior for the default case. > > Must stress that the bias acts as a hint rather than a definite > placement strategy. For example, if all big cores are busy executing > other RT tasks we can't guarantee that a new RT task will be placed > there. > > On non-heterogeneous systems the original behavior of RT should be > retained. Similarly if uclamp is not selected in the config. > > Signed-off-by: Qais Yousef Works for me; Steve you OK with this?