Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp295715lqe; Sat, 6 Apr 2024 01:17:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWM+q3UaYxnzUAZgAZ/nWoL7SY9jXX5ocpyRpZhOIm8DwcZu1pPhP0OVl/gl3tumteikBId1XPkvLTcIZp5dPsEZ+sELGlMilJh/F5yUw== X-Google-Smtp-Source: AGHT+IFUhH1OU+pc1iclmm85MSC+ZtZvFMU5jHrf64IMP2gat/6YUc5ETwypJ6E2Serzk8o7bhaC X-Received: by 2002:a05:6214:4109:b0:696:a0e8:8f2a with SMTP id kc9-20020a056214410900b00696a0e88f2amr4218880qvb.44.1712391447720; Sat, 06 Apr 2024 01:17:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712391447; cv=pass; d=google.com; s=arc-20160816; b=nvb4w3VF8GPSp6lYL/jMALUh19N4iWAMvzzm5/Rj9kya726NHpzz5DdYzpIjurY6na JNtG2Xsvt63+l2ghLDyVt2fXWuV3VK/sx0DF+i99YwaBKHZTZ8n9VYFckVrPJt740XBc qCqI0KqjU9dA3fSraw6UpPZ5RB6b+wwJPYbT1x/CHjUQ5v+VEsPXWiVXMt3xlYrSC401 AlSJWZv2G8V0P/zEHgv9YAb7iY5GbY6jqbBnNaT0n01xCCEf03djCu9R+h5CK3f4i5ky LA0SUzM4pZMBMoHjJGp/Q4zMyD8AS05b3oJbj/OctVXiqM0qW/zsz/i1V6E9YMPJ/3HU ME7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=NScASECSnBlNwXq5oRSlInEEJHgtuYgY4v4qBqyNSJw=; fh=4qMbl0GVQ31VlcBWHVmKs6ir551tNt43Kkari5brmAw=; b=wWkdE/MzteO+HZMoB9BimA8mfjmaW64tKVOygNZs7v7pl4zFiz+wHqyjYhbgrRLupE /JdX63fwsVeIMXQK5pGYQQ3ZN3yJrUNX5wbMEweyLr4XF+zX0K4e8PUruKYmjJ5ojm9A w2NaqGZ9ZapozDhneb1g0hzMSsWgga7vfHxbdp+Dz7lE67OPywg1VSMzWoJz5c30zRqu pBLsYGjh/I6V1va6jEHz1s7W6t9mMJeAbl8ZLkCfEaXMr19ATPuMRh4LAZHS8e4ZTZ1N faKdOJ8APa+dNW1CAzL9W7uGvahTW5IIxOo/iqkmQWqoFf6lCCln21uCI73Bci9E4s0p voCg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-133854-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133854-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 l16-20020ad44d10000000b006992d6229cbsi3602528qvl.435.2024.04.06.01.17.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Apr 2024 01:17:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133854-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; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-133854-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133854-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 6EB581C20FFE for ; Sat, 6 Apr 2024 08:17:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D0A9D24B4A; Sat, 6 Apr 2024 08:17:20 +0000 (UTC) Received: from mail78-36.sinamail.sina.com.cn (mail78-36.sinamail.sina.com.cn [219.142.78.36]) (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 35CF12901 for ; Sat, 6 Apr 2024 08:17:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=219.142.78.36 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712391440; cv=none; b=nZ+UgXDWfzrdY/UHX/Exo5e+sa7xVs1IETknTBnvGBVxqz/9e8+tDgP2xdXgLWmHsRrwKoQRZfjgHbFYG0X6BH87xSnXYeiaVOwICLPvdMpFjGLhKuINdG1AAEQe1519tr2PlwLhWFUe0lfA2nPjEzCSAa5+pkmEk9t1ziq+bfo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712391440; c=relaxed/simple; bh=6YpwSTpbEKpa39yjI0m0McxAjY382DGN5sUkcA55dpw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=slUxtJ0Y4H7TSOYlQSOi8lvRSfXwpFS1Ufe6+UK+2SewN9p/H2qqIsyoeO60tLy4l0mBDsN/fBRMvYuocpxFpSF9jGAUGd6yft/4nrLl0TKefY3YHAznwTr2x8+sl1DUK4K0uJ6w3AlG48TEwUhJAo7OAuHAKFQK4oshIxCYLZ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=219.142.78.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.88.50.84]) by sina.com (172.16.235.25) with ESMTP id 661104FE000051CE; Sat, 6 Apr 2024 16:17:05 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 31029034210484 X-SMAIL-UIID: 59407FAC1DCC41C5BE9E25175DACADC1-20240406-161705-1 From: Hillf Danton To: Peter Zijlstra Cc: vincent.guittot@linaro.org, bsegall@google.com, kprateek.nayak@amd.com, efault@gmx.de, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 10/10] sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion Date: Sat, 6 Apr 2024 16:16:53 +0800 Message-Id: <20240406081653.1161-1-hdanton@sina.com> In-Reply-To: <20240405110010.934104715@infradead.org> References: <20240405102754.435410987@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Fri, 05 Apr 2024 12:28:04 +0200 Peter Zijlstra > Allow applications to directly set a suggested request/slice length using > sched_attr::sched_runtime. > > The implementation clamps the value to: 0.1[ms] <= slice <= 100[ms] > which is 1/10 the size of HZ=1000 and 10 times the size of HZ=100. > Given HZ=100 for example, what is preventing applications of suggested slice=0.5ms from running 5ms a tick? If slice is 90ms otoh, is tick able to kick the curr that has been on cpu for 10ms off cpu, given cfs_rq->nr_running > 1? > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -984,7 +984,8 @@ static void update_deadline(struct cfs_r > * nice) while the request time r_i is determined by > * sysctl_sched_base_slice. > */ > - se->slice = sysctl_sched_base_slice; > + if (!se->custom_slice) > + se->slice = sysctl_sched_base_slice; > > /* > * EEVDF: vd_i = ve_i + r_i / w_i