Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp905781ybl; Fri, 6 Dec 2019 08:07:33 -0800 (PST) X-Google-Smtp-Source: APXvYqxKguCZgg+OhUPm9sVT2qsDV4M6Lt3zL39Xx5V2xMjbndzEI8+5BpSSzT5QVqcAhUWhLAxg X-Received: by 2002:a9d:5902:: with SMTP id t2mr12184077oth.151.1575648453552; Fri, 06 Dec 2019 08:07:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575648453; cv=none; d=google.com; s=arc-20160816; b=CcNHqbNDphzTyTokbTHfnOJmoYUpr2mtQW+CMjeYHme80tAb/inhJGzzhxvMmgyNeO +ofZ9e8eJESqTyUWpVwOBIjLd0MTE3wkttVYvVszUQ/Z68JPr0aQZWPx3lSh+83WLm1t dr3ythddpso2sp2G2kLVcpiZXkdEMSjAmi3F5tx4lmFc1RBeowEApft9QsQouCGgg8lW pRofj2MnOjroyu43WdALUzuzI0zrWUa5Bs5UTDEPdHjXjT3umLwsgdTQYj012OmkZx5D sTVAgyDq08cJv6zlGPFF0zpsoPNxx2490Rdcya3esMPDPewRP4/jshd4LlOkNMbGr1Vq PVgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=rNDlKrrL2/hV3iIlTUrJSGnKEoDkzr0HteCeZ4MjGJc=; b=nMTslwRh8GdwX/1e9iyT9FsZBeTRHH5t3v8XADvLiNtnwTTE0cpPXwRNwBeSur3AiD T1yUMoqXxfZO/GPvrpgBBFbeh8FQS2TfgsDqP2mCpzC6/7ZuefuU8jfZvpsyXz4vTIdi qw5k3lcCeKj/9Bw6/t84Nn2MwsOYdCK6yCx1Pc5m1lEwoFwYwExQU4HCLyZ84crcKlBn t+oJX1STuUqVbgomMGMAxafEfAAWyl2DVCL91Vh/KKBg3sJz/OYzXibSADRHS3mDxDEm DPqLjMOOPYLXfjXe6nwx+Sj0hSUkquZ5ah5AZ6D77p91/0zxZq73dYW9AQNJn7MBbbv3 UopQ== 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 w17si5128180otp.185.2019.12.06.08.07.16; Fri, 06 Dec 2019 08:07:33 -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 S1726312AbfLFQFC (ORCPT + 99 others); Fri, 6 Dec 2019 11:05:02 -0500 Received: from foss.arm.com ([217.140.110.172]:48996 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbfLFQFC (ORCPT ); Fri, 6 Dec 2019 11:05:02 -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 7B60E31B; Fri, 6 Dec 2019 08:05:01 -0800 (PST) Received: from [192.168.1.13] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 418ED3F718; Fri, 6 Dec 2019 08:04:58 -0800 (PST) Subject: Re: [RFC 3/3] Allow sched_{get,set}attr to change latency_tolerance of the task From: Dietmar Eggemann To: Parth Shah , Qais Yousef 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, viresh.kumar@linaro.org, rafael.j.wysocki@intel.com, daniel.lezcano@linaro.org References: <20191125094618.30298-1-parth@linux.ibm.com> <20191125094618.30298-4-parth@linux.ibm.com> <20191203083915.yahl2qd3wnnkqxxs@e107158-lin.cambridge.arm.com> Message-ID: <09e9a3e1-9c43-a541-01e6-e1b429a63a6f@arm.com> Date: Fri, 6 Dec 2019 17:04:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05.12.19 10:24, Dietmar Eggemann wrote: > On 03/12/2019 16:51, Parth Shah wrote: >> >> On 12/3/19 2:09 PM, Qais Yousef wrote: >>> On 11/25/19 15:16, Parth Shah wrote: > > [...] > >>>> diff --git a/kernel/sched/core.c b/kernel/sched/core.c >>>> index ea7abbf5c1bb..dfd36ec14404 100644 >>>> --- a/kernel/sched/core.c >>>> +++ b/kernel/sched/core.c >>>> @@ -4695,6 +4695,9 @@ static void __setscheduler_params(struct task_struct *p, >>>> p->rt_priority = attr->sched_priority; >>>> p->normal_prio = normal_prio(p); >>>> set_load_weight(p, true); >>>> + >>>> + /* Change latency tolerance of the task if !SCHED_FLAG_KEEP_PARAMS */ > > IMHO, this comment seems to be gratuitous. > >>>> + p->latency_tolerance = attr->sched_latency_tolerance; >>>> } > > [...] > This also would require some changes to UAPI (include/uapi/linux/sched.h, include/uapi/linux/sched/types.h), see commit a509a7cd7974 ("sched/uclamp: Extend sched_setattr() to support utilization clamping") and tools headers UAPI (tools/include/uapi/linux/sched.h), see commit c093de6bd3c5 ("tools headers UAPI: Sync sched.h with the kernel").