Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3212127lqo; Wed, 15 May 2024 03:13:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX4HxvRn5nX5suxFEH/gW94EYEuL/F1x4bckGZeb+xcB+BpTplh2fmDCwkox0SPOZWHnhKX/5rk4YKw7XSfqt5VtErUB0sbdaGqLZJ77w== X-Google-Smtp-Source: AGHT+IF9AXtetT3UoodalVwpQWXnsZ0JZhjJaK8SFZI6KOe9Tk6+d0P+QkfnYyXvy49/my1u1eyu X-Received: by 2002:a9d:4e88:0:b0:6f0:e332:8c2f with SMTP id 46e09a7af769-6f0e911582bmr16734129a34.9.1715768018567; Wed, 15 May 2024 03:13:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715768018; cv=pass; d=google.com; s=arc-20160816; b=HRLRA7AL8RFNY/mPYttq/fMuHCJYln0AC7iNhTWoL97lTlaxAT9of3bQXWuCD+ysYp +Tv+Wu+yTsStij+oe+bFJ4bmkQELbGfLydZZEv9Oe+MFn4lSCTnjUAuBxm82BFc77Qwa pODca+GBSCV42nnZz6J7wuOcSmGICvHJYxHrKErczSv8SiSjjO3NcSKF5+f01YgEpuXZ doRipfogf8Lh4lHEdpi+CgKk0g0aNyNQE5SRqqyTpIkaX9IkAz+mgyl/eHiwlcUuXdbT GKIe7/4NIu8alVXsuidXqCt96H3LCS4J2qwCPhNAp2JH+yto2pXwyHbmN91KWpdcCLVU dVVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yn9PlzEiI+jV2QEzgMElYky/iSJE+k1yDY6cuWJfOs4=; fh=moOnpLknaqQXb5q3awvrxSNxT8/VxmCYlvGn+1+uBhQ=; b=mtksqMg9Yuxs9rWaMnO+/ojMvqqza7tinR8H+TgLfKTsAXA9TqxpZ5WO3ctLRSvPRg ikSl5N4RyF8CtWFomsyW/VXsnda/IoDaOHpRi0848U3aBxzt08zSh4VW8j6zaXpwdQdG /Xm/EuESYAGvgOuDqFyRDy6w4Aa8FAgHBRNYo0bbremxWPJ0NuuDBZ6vvfgxy1MotcI0 Utu4iuUCTYxe/n2AwCwrWXXpIbUoxySdg5GMKY0zFCHuOKW7NaDfX+2KRlLlEnQmZwB1 1J5gcl9qiiKsNGLJ9kZm4oqaMTpg+HSdnePy9kIdKrXRxz4WzwjdHIRSjbTlZKdyigTn YSXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=bBwWGOTa; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-179753-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179753-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf33ac75si1358534785a.447.2024.05.15.03.13.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 03:13:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179753-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=bBwWGOTa; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-179753-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179753-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EE0791C2339C for ; Wed, 15 May 2024 10:13:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A61A5B5D6; Wed, 15 May 2024 10:13:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="bBwWGOTa" Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91FF55E060 for ; Wed, 15 May 2024 10:13:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715768013; cv=none; b=piYcsU2oNFsudGVd2x6SMGMNjlnwRNiCBwcixrEd9h1BSga3S/gxs8iJ/zD6ifwflyhhb/ATJmoFum9nl1iDoSN7B5D5kWvIwj4L042YvqIUKUt2uh+1JPZLToDsae4Td5gjLV+Nqp9P7huu6+dMcIUi0H6Vztaenq/zrZ48OoA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715768013; c=relaxed/simple; bh=R6J+n8cvzciTSGKGyfNyOmGXlBPHb1xLPxZyrsPKKGI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fsG22Qyw2DttIK7Zn7kwA6SoHMCj0zb7oBEjssXPDZ82Elp++7AOAUkvJMijWKoDK7XawPz1nex3rSHKO15LWB6jOlgZE79Ip1mVq1IF02dP/hN9LQLjOjrfZQF/Zh7N8asrjo7qkaQYBlivqofmij4BpRtpfo9OsWWmH13gV8o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=bBwWGOTa; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=yn9PlzEiI+jV2QEzgMElYky/iSJE+k1yDY6cuWJfOs4=; b=bBwWGOTal7ohbcYX6S0ZTRpfjn Vs1kwtXl5DQxomNJruot7h/WB0xz0G8hX9LNt49xlJ5NAYYkTj5tCzLDEZH/qKZwv6tNfHyS0hycU i2UR7sg5WUMxxsZP3u4VpYn4svMno+yfC9DVGXAPl040gKoB+83oGmQIFmbudvfal8Q+eOGIsKnCs 0bXICyZw5c0ZNWzqV4evWdHe3m/5IBN9+ARZVfj62+ezYJLWW3rkJ++6MGGkteWgwLkmKPTjdCifb rNm10OKs7etrvF2qCNisr8W4jazXuCXdfI3kPGEnXOty6Dtik9CiGfViE5pScLOmdny+umRd1ygp3 jQ3LpAng==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7BdE-000000053lQ-3b0U; Wed, 15 May 2024 10:13:12 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id DDD583005E3; Wed, 15 May 2024 12:13:05 +0200 (CEST) Date: Wed, 15 May 2024 12:13:05 +0200 From: Peter Zijlstra To: Mike Galbraith Cc: mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org, kprateek.nayak@amd.com, wuyun.abel@bytedance.com, tglx@linutronix.de Subject: Re: [RFC][PATCH 10/10] sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion Message-ID: <20240515101305.GG40213@noisy.programming.kicks-ass.net> References: <20240405102754.435410987@infradead.org> <20240405110010.934104715@infradead.org> <22b6408d96ce3913121a4a1b80f343657d1f66ae.camel@gmx.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <22b6408d96ce3913121a4a1b80f343657d1f66ae.camel@gmx.de> On Tue, May 07, 2024 at 07:34:54AM +0200, Mike Galbraith wrote: > On Fri, 2024-04-05 at 12:28 +0200, Peter Zijlstra wrote: > > > > --- a/kernel/sched/core.c > > +++ b/kernel/sched/core.c > > @@ -7812,7 +7823,9 @@ static int __sched_setscheduler(struct t > > ???????? * but store a possible modification of reset_on_fork. > > ???????? */ > > ????????if (unlikely(policy == p->policy)) { > > -???????????????if (fair_policy(policy) && attr->sched_nice != task_nice(p)) > > +???????????????if (fair_policy(policy) && > > +?????????????????? (attr->sched_nice != task_nice(p) || > > +??????????????????? (attr->sched_runtime && attr->sched_runtime != p->se.slice))) > > ????????????????????????goto change; > > Can we make that only look at attr->sched_runtime != p->se.slice? > Doing so lets you clear a custom slice by.. clearing it.. rather than > making tools rummage about for the proper value to overwrite. Duh yes. Seems I already did the right thing in __setscheduler_params() for that. Done.