Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1057902ybl; Tue, 3 Dec 2019 00:37:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwt6I13Lfll6KBN9kwlHLWqpIRcnnD0VdfAxP+73uX/+ZOJ07RyD+2I3gZkK/AbVpNqS/2w X-Received: by 2002:a05:6830:1e37:: with SMTP id t23mr2415215otr.16.1575362267641; Tue, 03 Dec 2019 00:37:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575362267; cv=none; d=google.com; s=arc-20160816; b=Pi1DyGG5JSz9KZqR7my7ynovEZmDxL/vUyGccivUob1ZKZSv5TNgpsf1tZ0VpOJNJG m/iNsYm2G9/I04rY/hObg+b01ja6lPkAPN8uaaalVKkvSNQBivmxSvtM4cxHcqbivFsP nRTXViA3EDfgREnL6yIxUCVpb2IHfO9fat/oZGr5qtcttdX6GzDD4FPG5z6iCF2AHx7+ TIeCgp8BC8Ke6Fla8ecaD3D5p8CrmXEbAMMvRzuKKIenJJX7QoC7KQHhgPeFPRDrZFes FwJUYx+7gDhlhOQSYTgBzCtbX2B1zRRZhdEQ23ZTyR5z48fSu7TXKEYKNmdNy8dDGafi h8IA== 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=SCR3pDTv+p1PG7D+lvRZkkyQHWHbQfnleBqEmeOLWzg=; b=M6TyKaZIXTG4ikdje6J1gk2Qczjg72etmEmOV8GC/B+0HxqN0vxhr++3E04N3tvG8X 7vuckjCuV0K0Cy552w9Wp1u/zrId4u9oR2YoPl8+3OYrXJr7VUly6BitYi54IjTzQwCs uH1aAMEE3sfS1KZPUqB1R/eEbyILf+63kn2PBVkyi+zOPjwV0+z7AUHhxeb9XTGE5KHO lTA/1RXcdKXSWUGE/+4OoxRhQl0LzQsCUxgB/f+OHBo9WztqbNS0mby78F5Z4XLGF6p7 fwusaVGyl6q06KIL3wOYDSD8pqeeYM+dpUtGWaexFNefpAPwLNyTsKbag1Kx7uWlVSOa OTLA== 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 v8si852291otq.295.2019.12.03.00.37.34; Tue, 03 Dec 2019 00:37:47 -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 S1726008AbfLCIhA (ORCPT + 99 others); Tue, 3 Dec 2019 03:37:00 -0500 Received: from foss.arm.com ([217.140.110.172]:38948 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725773AbfLCIhA (ORCPT ); Tue, 3 Dec 2019 03:37:00 -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 457F730E; Tue, 3 Dec 2019 00:36:59 -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 DAAAE3F68E; Tue, 3 Dec 2019 00:40:05 -0800 (PST) Date: Tue, 3 Dec 2019 08:36:54 +0000 From: Qais Yousef To: Parth Shah Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org, patrick.bellasi@matbug.net, valentin.schneider@arm.com, pavel@ucw.cz, dhaval.giani@oracle.com, qperret@qperret.net, David.Laight@ACULAB.COM, morten.rasmussen@arm.com, pjt@google.com, tj@kernel.org, dietmar.eggemann@arm.com, viresh.kumar@linaro.org, rafael.j.wysocki@intel.com, daniel.lezcano@linaro.org Subject: Re: [RFC 1/3] Introduce latency-tolerance as an per-task attribute Message-ID: <20191203083654.3ctttimdiujdt7tl@e107158-lin.cambridge.arm.com> References: <20191125094618.30298-1-parth@linux.ibm.com> <20191125094618.30298-2-parth@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191125094618.30298-2-parth@linux.ibm.com> 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 15:16, Parth Shah wrote: > Latency-tolerance indicates the latency requirements of a task with respect > to the other tasks in the system. The value of the attribute can be within > the range of [-20, 19] both inclusive to be in-line with the values just > like task nice values. > > latency_tolerance = -20 indicates the task to have the least latency as > compared to the tasks having latency_tolerance = +19. > > The latency_tolerance may affect only the CFS SCHED_CLASS by getting > latency requirements from the userspace. > > Signed-off-by: Parth Shah > --- > include/linux/sched.h | 3 +++ > include/linux/sched/latency_tolerance.h | 13 +++++++++++++ > 2 files changed, 16 insertions(+) > create mode 100644 include/linux/sched/latency_tolerance.h > > diff --git a/include/linux/sched.h b/include/linux/sched.h > index 2c2e56bd8913..bcc1c1d0856d 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -666,6 +667,8 @@ struct task_struct { > #endif > int on_rq; > > + int latency_tolerance; > + > int prio; > int static_prio; > int normal_prio; > diff --git a/include/linux/sched/latency_tolerance.h b/include/linux/sched/latency_tolerance.h > new file mode 100644 > index 000000000000..7a00abe05bc4 > --- /dev/null > +++ b/include/linux/sched/latency_tolerance.h > @@ -0,0 +1,13 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _LINUX_SCHED_LATENCY_TOLERANCE_H > +#define _LINUX_SCHED_LATENCY_TOLERANCE_H nit: Add some description here explaining what latency tolerance is please. You copy paste some text from your cover letter :) -- Qais Youesf > + > +#define MAX_LATENCY_TOLERANCE 19 > +#define MIN_LATENCY_TOLERANCE -20 > + > +#define LATENCY_TOLERANCE_WIDTH \ > + (MAX_LATENCY_TOLERANCE - MIN_LATENCY_TOLERANCE + 1) > + > +#define DEFAULT_LATENCY_TOLERANCE 0 > + > +#endif /* _LINUX_SCHED_LATENCY_TOLERANCE_H */ > -- > 2.17.2 >