Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp953261ybe; Thu, 5 Sep 2019 08:16:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlOB2f/wRmMDwiBIEIMEyqxUZ5MAMIbuJq94CZtmPzhnwG0OF2OjAaBJHp+OwkieQBS/7+ X-Received: by 2002:a62:89:: with SMTP id 131mr4435588pfa.88.1567696592874; Thu, 05 Sep 2019 08:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567696592; cv=none; d=google.com; s=arc-20160816; b=WLn8wV0izgvmjB6z13UTrav5kOMTQdPzcwJhy2juaEbwUuyY31EIsoyvu/Dy6CoJNe 5CyIe1Ox8jJrYVZ9QMp/jq6s+QoobiLCbUHNR9DbhoPrpSCRClx+d0h96xYlv91iWEwW a1uC8QamxGo/QEyFGvvlVMwj6rTV7xJDvRuQ0928BVyy9Chv9rsBLZz2bY3u13QtL6TQ eNJsIucVs5DL9A73NJFAQdWDfGKeYy4DJGRqFeSgDdOfIXJ/jvehVRk3Haa+G/UqOiUz tXKrettBIxuv+Gs2OY5h2NgpZnhY+FcsMUCQwvZEEECW6xqMOlKO2VDvISs2i1RB8ycZ f9mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references; bh=q8NnXtNYMJrTeMRC9F37dSkKIiTTlB8WaVdhgjnSRBY=; b=eSERZy3765ZmoJlNppfHDaAriI+ocwd9U8WCpHNP/K2/kNoC1sOS5cLkCLShf2ssaq XCX0iLPuVPpmDNhr1u6piFKG6vtZA2Bqi3iXsuaAni23NN1+pNGAZXwjEyDPevI+YbXe ij5bu9xu/7aOVgWdtnvhjS0O3bYuCsx1YSstt/lYX05dKmqhljOnRA8LX5fMEryoC+B+ gd+oceeO5fVZ/01JcTlLsk5xlsAgdyp2omRkfTKNziEJLu/EjqWDK+eX8rEDGN8Kjfq6 vvq9bk9HV8TYInO7GY7KE8mBTzx8YppHvT99e5/GNzpYoVa3990kllkyU9YLq3K1bbyJ LYgw== 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 t24si2095808plr.420.2019.09.05.08.16.15; Thu, 05 Sep 2019 08:16:32 -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; 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 S1733116AbfIELrI (ORCPT + 99 others); Thu, 5 Sep 2019 07:47:08 -0400 Received: from foss.arm.com ([217.140.110.172]:43252 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730780AbfIELrI (ORCPT ); Thu, 5 Sep 2019 07:47:08 -0400 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 57BF8337; Thu, 5 Sep 2019 04:47:07 -0700 (PDT) Received: from e110439-lin (e110439-lin.cambridge.arm.com [10.1.194.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A4BB63F718; Thu, 5 Sep 2019 04:47:05 -0700 (PDT) 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> <20190905114030.GL2349@hirez.programming.kicks-ass.net> User-agent: mu4e 1.3.3; emacs 26.2 From: Patrick Bellasi To: Peter Zijlstra 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 In-reply-to: <20190905114030.GL2349@hirez.programming.kicks-ass.net> Date: Thu, 05 Sep 2019 12:46:57 +0100 Message-ID: <87ef0v2cem.fsf@arm.com> MIME-Version: 1.0 Content-Type: text/plain 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:40:30 +0100, Peter Zijlstra wrote... > 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 ;-) ... but you are not human. :) >> 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 ;-) Yes, that's appealing indeed. >> 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'). Good to know, I was considering it a POXIS requirement. >> 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). Right. >> 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. -- #include Patrick Bellasi