Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3982393ybc; Tue, 26 Nov 2019 01:44:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwyhufGDhkOxgBnWepNsKTKvcIj2QXvjlxNRo0j66iRdIxuZl21XS/SbDLqmUEvfStWllET X-Received: by 2002:a17:906:6bd8:: with SMTP id t24mr16074486ejs.169.1574761484591; Tue, 26 Nov 2019 01:44:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574761484; cv=none; d=google.com; s=arc-20160816; b=JFTaEgd+DM9H0wwz1gBa/GkAjPHy0/ChzVAoxiiYy8SVfsNtHNEjSviefPm8+E6kOW qAanndn7ZGBzecYfhcU5fmoh4GmhpSWXGqPhCcQcVIEz6NoWMvJJQcNx0PcBVVgQnZFX 9xu0P+nnuvfx1BHzIcEk5FytphiDSE3S+gmZRUrIEF7UjMnuSR6m7tm21xQSFBdGrGDb fPgd7fYVXqEccNBJLcaK9M0293Ktvh6qjuxTIngDB/eYDIkthnC43zI3k38MnV1HDuGo sYks6lXC7GMNZaRElK/E3MyHKpkNtFlWLpTp+c+SbRaPIqC/ueryQx8YjxiK8vP2CFnc dapg== 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; bh=d5J9BW+pvND7T/kznap0xnt0m9dq25SG9iNgmXFJRM4=; b=a8xIfhdAaMxG8mwGCbAU9biTvLVsRVgazNF1KUQCG51lsR2JJB635DHD2HqlnxEgqe 9jl2DI5NETi6B4ynZdVwNETTWNaq1as9sGGaUKHwNYnQzQS9b9P6PzRX7p0HI/z/IX5R A7S7lh1CcZCuVdL/CpCHTuFcrWyODlTAHQ0ULMtAZidj7URPbSXFZZcO0j3/AXDjiZMm Q438omXdUph4ozaJLgx6whF/cBRVzz+RiILeb6/YXoC5LGkCVtJBwliabnepwopUo12M LlosMLLx9NjUdCOUqd6tOhChnrTsBgcoFnBD5DwGgFYOeh2tHZ1TSY3/XYhQxFcP3L92 iWQw== ARC-Authentication-Results: i=1; mx.google.com; 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 a30si7453709eda.259.2019.11.26.01.44.21; Tue, 26 Nov 2019 01:44:44 -0800 (PST) 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; 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 S1727630AbfKZJj0 (ORCPT + 99 others); Tue, 26 Nov 2019 04:39:26 -0500 Received: from foss.arm.com ([217.140.110.172]:60304 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727482AbfKZJj0 (ORCPT ); Tue, 26 Nov 2019 04:39:26 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 70E6855D; Tue, 26 Nov 2019 01:39:25 -0800 (PST) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 39FEF3F52E; Tue, 26 Nov 2019 01:39:24 -0800 (PST) Date: Tue, 26 Nov 2019 09:39:21 +0000 From: Qais Yousef To: Steven Rostedt Cc: Ingo Molnar , Peter Zijlstra , 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: <20191126093921.7tjsxiliyfgea76o@e107158-lin.cambridge.arm.com> References: <20191009104611.15363-1-qais.yousef@arm.com> <20191125163650.6a624fee@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191125163650.6a624fee@gandalf.local.home> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/25/19 16:36, Steven Rostedt wrote: > Sorry for the very late response... No worries and thanks for taking the time to look at this! > > On Wed, 9 Oct 2019 11:46:11 +0100 > Qais Yousef wrote: > > > 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. > > Is it possible that the capacity can be fixed, where the process can > just have a cpu mask of CPUs that has the capacity for it? It is possible and I did consider it. But it didn't feel right because: 1. The same can be achieved with regular affinities. 2. On some systems, especially medium and lower end devices the number of big cores might be small (2 bigs and 6 littles is common). I couldn't justify that pinning to bigs is always better than letting the system try to balance itself in case it gets overloaded. The thing with RT is that generally we offer little guarantees if the system is not designed properly and the user can easily shoot themselves in the foot. This implementation offered the simplest best effort while still not being too restrictive. But the idea is valid and worth looking at in the future. > > Not that this will affect this patch now, but just something for the > future. > > > > > 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 > > Reviewed-by: Steven Rostedt (VMware) Thanks for your time :-) -- Qais Yousef