Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp512812lqo; Wed, 8 May 2024 06:54:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXKdHb7yo3zOiJjN265lw7GTqCrAxti9j3soqNBoItXyJdjOtbEOAO5VE5Kb7OrSnI+ETEaDvVRxaIXGi4xZ7iy+wNdje8a3N7VGWCq0w== X-Google-Smtp-Source: AGHT+IGMl2jssbYaU5PsVdGAaPKfn/3/+2Tne319+ErliW4Siqn9J9WA9AXkUBzx2FfUCr6whmrZ X-Received: by 2002:a17:906:1394:b0:a59:b784:ced5 with SMTP id a640c23a62f3a-a59fb9f33c8mr161324566b.67.1715176452381; Wed, 08 May 2024 06:54:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715176452; cv=pass; d=google.com; s=arc-20160816; b=QaDaEHZQ9K5/LKPbTJx3SjK8wkW4YdqDEgNH6IMTy3e8+pog8e4s2kG3sPSNgqLmaM V/YKvPLFXmjm2+G09/d7IvKH6jSW9w9Pgp3QWwvYPeHY5O1tGdkRjPIvFOHq5ESWw+5+ iFFJNB6ete8O2uP/hRrn8FgDjNz1rNg/jboNx6wJHbRqN62Cr01Sdv01VazJP31kGdQh Iw7Ub+oKmlzivhhvBqNoiNMcPFbT5a23PfZvijTJqfKjHJN/1KQ3811xIoKypG5UYDYN Wq1FdMW291lXjyxXwKzhblg2gDSnAYd2Wk2Sc4JBecMloBB0Rr+QfuhsbGbF30K9HxSX zg7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=xvqbbAqfc9EOFpvqcHsYsOBw5lY+DntkMAAWorfeO9k=; fh=QRn4+SlQRDqAnfjPY/NXhWjirgvciM/x5efsQTNjjo4=; b=PUw0HQXfKs9IfOb4nFIpwhvZco2HGcJ0N8tLrl3WB8PoaMvSy5OhM0kJXARRJAkeQ0 HQNGM5f0mv8jFxZgYPbXxG5o5li+3ZLsUpXZ9pMYc2rphQyrN0/aYfqJ5XzYc1jNYXbS Fpoh9wQMqzI9t+I54g3b3ajndPFaeWqRappKqJTcFasq6hI0MQ+WiXWCaxoHwHlDaiUk gAgMLNqkMJkegQ8F2ZRmeAwPntVlv3tVQEKyBfB6YeKF5uJ/PT4CQOlnPXnVOWGTLsCz bBRrj7FN8ZlTGT9MHI0py26YGW48MKctqSaTxobuBa+Nan7LfJMsHtUDbGi2oUzWwn18 MPbA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=i6WjQrfV; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-173370-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173370-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id qa9-20020a170907868900b00a59da450fe7si3241289ejc.915.2024.05.08.06.54.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 06:54:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173370-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=i6WjQrfV; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-173370-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173370-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 24E701F23F33 for ; Wed, 8 May 2024 13:53:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF0F279DD4; Wed, 8 May 2024 13:53:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=efault@gmx.de header.b="i6WjQrfV" Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 357841A2C11 for ; Wed, 8 May 2024 13:53:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715176406; cv=none; b=lUydPIKVlXg3enP3ezO8CUXdVFU0VDSqfETIgxqXIEO7aIFWRPbOSoSCcALA0YhYketyjW4WwmMHihio//JUV51YqxKkQlSiSuyFOAyHJzlrzvFHT1hZ4NyJKbH8w/q/bnjxVXSy9uGMjzOxfYq+7NRV9+v9FL22LtQBYwT3YFc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715176406; c=relaxed/simple; bh=rnyl7Xp77+0HYhwPE1QmPfKmC2U78gvaTg519sdiZps=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=G3LLQFzbxmmGSNK0Af3AcKCoKSfo60w59RkH3Kp7A+9Cu1Fbd6Plzn6y18Ox2IWoPmk8hJhbb+qtgCIzD2dfeEevMDMbP2K3SyZLB+SMBGoBJNxs5WAmVaXjardkCa8GMChMRjWBemnHC33Hbzte3zZHIL6W9vffPHxXMiYzlUo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=efault@gmx.de header.b=i6WjQrfV; arc=none smtp.client-ip=212.227.17.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1715176354; x=1715781154; i=efault@gmx.de; bh=xvqbbAqfc9EOFpvqcHsYsOBw5lY+DntkMAAWorfeO9k=; h=X-UI-Sender-Class:Message-ID:Subject:From:To:Cc:Date:In-Reply-To: References:Content-Type:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=i6WjQrfV8G+HPtES47TSJrYXpXqh39+3re9yMZEbLp5+jbDrYsQfI9IMRCdtvseL /2wehND6/dQRZuJlc96UjAjzZOvvoo7ZNFa3LrzzQdbMb3KgRHAGZttn+1CtfUReD GG06Vu89g847q5CGRi4rbLVdJTzvqNiYXCz4XWokw5KFdkXumymKaBRXNz6fGLHn/ 4jrGZPYAPJk08+ebm8LeRCHX7F1bGUmb/zautqM59j6CG8AmLw5ibfaHKe+njzinD ZlubZm6O6p4pfLG6dL6KliUjt5pBdWV9y9aIXhHGqqedrqugc8SahpFdXh/c9QuM3 0dLwpoU/S4pbPQcqnA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from homer.fritz.box ([185.221.151.210]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MbRjt-1sbIS30yVN-00aTHr; Wed, 08 May 2024 15:52:34 +0200 Message-ID: <9c360c0d337b124c71095f06889d1c69279a7c06.camel@gmx.de> Subject: Re: [RFC][PATCH 10/10] sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion From: Mike Galbraith To: Chen Yu , Peter Zijlstra 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, tim.c.chen@intel.com, yu.c.chen.y@gmail.com Date: Wed, 08 May 2024 15:52:32 +0200 In-Reply-To: References: <20240405102754.435410987@infradead.org> <20240405110010.934104715@infradead.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:QOMj/JfgW6fn2tFkYIe4JeP8d426H3XoSY9KW474SzmxWwbOFw3 RiUmwVfp+uMryE8sSrJErI71zbU9UCiFJ10U+hd3HTTzSr0OSPRonuHNaL2KleuiBN+3b0X 5AqW41ZXh9tSa2HdiATI05QR+EC1s8Rtdi50UbyWryQtiHQsMUvp1G2mmW+58rGbu0P3/5i gJ3jloKo37Ufk116+uw6Q== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:Gw5PYY1ZB6A=;glpYNK6WATXwgcaY+mtwtEf9zcF dbiCPUTF4MqtFS5zKu+feso2oXsKh4BAdc74sv8kN4qsRgK0OLWOusV1KCqONK5LnLRfJY2gX LdAsYXHfW2V3RkCBAPZ1wcW+m+XkODqWR1VVhYYWelIy9+PA+W9sxfmg7XdntzP/4T35NRUln IGg2t0bQIewyMEbB2QgbjcLAgz30+1alN+UNw3yr/JPgBLb6h3XVJhjO+7+9kPYY+LUB5CJZH NnwNF0eLY1kglS27cAxaR/y8CuWzh0BHZGnGta3PaSykI8AmOCBapswR9Rea86i4sMwNCqUtO lK03uX2P8jmXl/c6vNfAJCDcGGI2IJMINn95JSvSDk8p0LmZq75dwjNFOVU6ut266BQ2YYTdF gkcD+qv+iubZyt8FZCK8Gn2O2X7CKpuG2L/fAjAulAdnnTf0YiBL6puQMbWi5gMZYWhVNoY3Z XJSrTp4R80edO/od2tIkhKi8CxxXnopUu4eu1GPtv39Yzz8FLaeGNaPdNjJlPLKn/yZ8Wnvyf kU/Wwys87H9pzNxVoCKBrRk8nACoWdrE8VtNmANPhUPqpyilVZVQnc+LwaC8XQDwJptIua3uL YdtNt9r64WtujyxXOzFnmhQOm7awXnGyqBAw4wv+eEpaX1g4hI+S6ztd8HEs42ayCbNZqqfTQ kViMcEYnkq2BnOwEBbgUQThiR8fWAS5xptpfw4iFzTqDXpUq+JFGY0kfjgaDMSUv+kxusz8Ii AMCGVOy/E6aUnFvavYMzfwxOnZmLWe/iCxAHIbK2uyRyMYyCiFRrnH4hHyZBQGYHkDN7UMeH5 NM/ToSEBjm4//SYx8V2EBJuXk21JMLKNW8/G/8zI5MdLI= On Tue, 2024-05-07 at 23:15 +0800, Chen Yu wrote: > On 2024-04-05 at 12:28:04 +0200, Peter Zijlstra wrote: > > Allow applications to directly set a suggested request/slice length us= ing > > sched_attr::sched_runtime. > > > > The implementation clamps the value to: 0.1[ms] <=3D slice <=3D 100[ms= ] > > which is 1/10 the size of HZ=3D1000 and 10 times the size of HZ=3D100. > > > > Applications should strive to use their periodic runtime at a high > > confidence interval (95%+) as the target slice. Using a smaller slice > > will introduce undue preemptions, while using a larger value will > > increase latency. > > > > Signed-off-by: Peter Zijlstra (Intel) > > > > Is it possible to leverage this task slice to do better task wakeup plac= ement? Slice being unrelated to placement makes its use in a placement related knob look wrong. Even the smallest possible slice is orders of magnitude larger than the cycle time of TCP_RR, making slice nearly irrelevant to the issue being demonstrating via TCP_RR. Even for that huge socket box, it won't take long as cycle time increases toward that smallest possible slice for the cost of needless wait to bury placement decision costs. > The idea is that, the smaller the slice the wakee has, the less idle CPU= it > should scan. This can reduce wake latency and inhibit costly task migrat= ion, > especially on large systems. Sure, this is an age old issue that's scaled up to size extra ugly in that huge socket box. Any solution needs to scale as well methinks, a simple fixed yardstick won't work, as the costs being mitigated vary wildly with platform size/shape. -Mike