Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp988015ybe; Thu, 5 Sep 2019 08:44:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6fu7+WhXvCzRjxe5+CA5fg9Ta3OcbdmbLk5fLun6Ijf1GmvROzUtwFnjpUZMPSRDc9y57 X-Received: by 2002:a17:90a:f98e:: with SMTP id cq14mr4628017pjb.43.1567698284343; Thu, 05 Sep 2019 08:44:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567698284; cv=none; d=google.com; s=arc-20160816; b=CgojOcnp+AXq6KNXnwn3lbpTxrnBSjhyiVqeE6s3jc7AyNqB7WuzuAVt8ZHTB52vSS 7cU3XTDh5GHj1lTnmFFJf/AOy2u10v67O8gwijJQ8W++Xc+l0os/QV6w5pTi0LRtEzFQ 3fln3/tIS6urMVZM8Pt9UdhXIsT6Euds4a1j6yzLsZsqOakpHllrq0gv15JtV95WGou/ 7HdhcQc7EnORtkGcvhNPLUSftgYSDAc4EcPIvzbrjyzwNCm9kvPOsXL/pBIuIlPRJXEj g4xbZD7HtUAuz9i5Fa/3UyJkl0DxT5eZ3nMB8TnUgG5HOVcAsSeO3sbFsrAgGX0l4P1P 6Gqg== 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=/GCMw/eEaPCB+aQnlkEbRw1aCbTfAQklVoBoCdkGQgI=; b=u3QPqnyBngg/xyxvAm1lkZyTdnZdZNpGr6FwzGeyjOIm58CkpADsg7kQlZ0qYwnWzD skwohTGpr2Svn5Sela1QndZNJG9drfRWcdth6g/Mf2DZwN4jmZWxoGNsltq+Ja8jXlBt 7OcM9nAZLmZgLOwNlA8M5ree5bUXWHMxk0+MNzbZOsh5zgsO+26uAEugNUiXcs/JlFCV 4HcXoZadYRhvrdjc8ZIDoWAVEbdgL06V+IprHcP656rPhd5XXp3oZnqsb8vtGlXOgVsA K9JnzOiVbGKrtAMvkYBfNQgqZLN7Z1XWmXuX07M4Dh4v2gI9BTlOibehc42nfY17ylPp 9Slw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=1fcWC1li; 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 n14si2261101plp.304.2019.09.05.08.44.14; Thu, 05 Sep 2019 08:44:44 -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=merlin.20170209 header.b=1fcWC1li; 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 S2388638AbfIELku (ORCPT + 99 others); Thu, 5 Sep 2019 07:40:50 -0400 Received: from merlin.infradead.org ([205.233.59.134]:44324 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733010AbfIELku (ORCPT ); Thu, 5 Sep 2019 07:40:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=/GCMw/eEaPCB+aQnlkEbRw1aCbTfAQklVoBoCdkGQgI=; b=1fcWC1lirPTUsNfUnSlStbwHA myzMYuAcZBgdFdGEOmhPfU8V6h3hyOvitwkcSITI3lcPpUhHzlY/yNQaXB0CvtHaHkzJ9rh3w83HD MlhJzPl8JaJ6xaAt3VYONJbuArO4Q8rUPyWZ8NZ24hvvkCerFWxJvBk9+hczZKaSh2jdvF6yp23rc IqKYKNeoTWWhHlE4ZM2jclqY2ffjkLdEnRqJOBwC6g/aVPa59xF8ZJ6HPBnbwHwIpSBwIQ6LjdORy 5TgIL8KAbpeafke6aPPJHoe1zvle22IOfmUkOvuq2fXX+PDVXb+erm8RJ4qNDhfnbpSIaxTRbKMHk Mva9DSx4Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i5q7s-0006Z3-NR; Thu, 05 Sep 2019 11:40:32 +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 DB766306053; Thu, 5 Sep 2019 13:39:53 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D498F29CBE146; Thu, 5 Sep 2019 13:40:30 +0200 (CEST) Date: Thu, 5 Sep 2019 13:40:30 +0200 From: Peter Zijlstra To: Patrick Bellasi Cc: Subhra Mazumdar , linux-kernel@vger.kernel.org, mingo@redhat.com, tglx@linutronix.de, steven.sistare@oracle.com, dhaval.giani@oracle.com, daniel.lezcano@linaro.org, vincent.guittot@linaro.org, viresh.kumar@linaro.org, tim.c.chen@linux.intel.com, mgorman@techsingularity.net, parth@linux.ibm.com Subject: Re: [RFC PATCH 1/9] sched,cgroup: Add interface for latency-nice Message-ID: <20190905114030.GL2349@hirez.programming.kicks-ass.net> References: <20190830174944.21741-1-subhra.mazumdar@oracle.com> <20190830174944.21741-2-subhra.mazumdar@oracle.com> <20190905083127.GA2332@hirez.programming.kicks-ass.net> <87r24v2i14.fsf@arm.com> <20190905104616.GD2332@hirez.programming.kicks-ass.net> <87imq72dpc.fsf@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87imq72dpc.fsf@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 Thu, Sep 05, 2019 at 12:18:55PM +0100, Patrick Bellasi wrote: > Right, we have this dualism to deal with and current mainline behaviour > is somehow in the middle. > > BTW, the FB requirement is the same we have in Android. > We want some CFS tasks to have very small latency and a low chance > to be preempted by the wake-up of less-important "background" tasks. > > I'm not totally against the usage of a signed range, but I'm thinking > that since we are introducing a new (non POSIX) concept we can get the > chance to make it more human friendly. I'm arguing that signed _is_ more human friendly ;-) > Give the two extremes above, would not be much simpler and intuitive to > have 0 implementing the FB/Android (no latency) case and 1024 the > (max latency) Oracle case? See, I find the signed thing more natural, negative is a bias away from latency sensitive, positive is a bias towards latency sensitive. Also; 0 is a good default value ;-) > Moreover, we will never match completely the nice semantic, give that > a 1 nice unit has a proper math meaning, isn't something like 10% CPU > usage change for each step? Only because we were nice when implementing it. Posix leaves it unspecified and we could change it at any time. The only real semantics is a relative 'weight' (opengroup uses the term 'favourable'). > Could changing the name to "latency-tolerance" break the tie by marking > its difference wrt prior/nice levels? AFAIR, that was also the original > proposal [1] by PaulT during the OSPM discussion. latency torrerance could still be a signed entity, positive would signify we're more tolerant of latency (ie. less sensitive) while negative would be less tolerant (ie. more sensitive). > For latency-nice instead we will likely base our biasing strategies on > some predefined (maybe system-wide configurable) const thresholds. I'm not quite sure; yes, for some of these things, like the idle search on wakeup, certainly. But say for wakeup-preemption, we could definitely make it a task relative attribute.