Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp10762lqj; Thu, 11 Apr 2024 08:33:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZzNPofbGWToJH6ydLs7rlxFPmSRYy+9586/u3+k/lpysksffo0OcY8Cfd0HgbDW2kF1phKA5OmnMrLRuW4fukjoi6Ly86cTfaAuw2uA== X-Google-Smtp-Source: AGHT+IGu4Q/X6EOAeDKkjdmxDe5KD5mqcven704tCNkirADw65pazz/f2bVgpeIufXOm6jR+N3BG X-Received: by 2002:a05:6300:808b:b0:1a9:499c:5778 with SMTP id ap11-20020a056300808b00b001a9499c5778mr123893pzc.35.1712849635887; Thu, 11 Apr 2024 08:33:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712849635; cv=pass; d=google.com; s=arc-20160816; b=aiozkgKpNTSiVRY2ph0Z0mZFu9qV55fm18tHwYYvGy/kVRlARVxTYLa+CP7txS+d2z Rk0uZsSaqWzxg1WkGdLIltTVRJ2HwjCSAcFCX4fhU8tgXMRIycUN8+DsRJ7a36T4X1Jb kvvpS/ziFjnRolbCAS7PWou7ywv3S0pzon6TQPJ6VvcQyOmb9EojfpRl9njsKv7CX3fI znbVpru93S2tVeMKENYwwYl9KSid83JKZOTGtxc2c31sCRBSdUsSJxGKvb1drs9UqHOd d7JYucwpLwrvvJQddTUcuZvCTF45/mnHIB0Fmbc898Y8CKBpjgKxq8Xeo3uXXknbPdlV Iwtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=m3/+xNlu88A35pIcbHp01/OML7ZE5wdMTCkMJyxlsaQ=; fh=m7whq3C3stqxJj+zLlwNNK/zhpCxlUbhhovnABFRI/o=; b=jJcP72Na7qC+xEK0Z3ihsCN+PbrKF2fV1xn2eFHAaUKCpFeqS8xOxCErP7e7XC1S/9 Pvk5wGdh2e6xGsFOG5WRpju1+JQg2ad93kkU9+XLhDD60KFXoAXA+Q1BxS6JxYpnM+ch 36rXK2tup1oTmarCRzm3Qk3Dhk0L8Ygxwpvvsx7x7WF5f4AhL+DK7LbrqHfnpxa45WYK 006oMwtYXU/5D9lL6Rt1Oipmgdte97/7Hwwe5u7mqUACyK0rNYYXCi3XsitMlF2HXwQm ViPUem74bmnRqc2RCyBTobxWjYEZGsQSRgep8tRKaE0NSfauboRTIJmwypqJJdTBVhWw MlwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TTxrHtRE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-140711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140711-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k5-20020a634b45000000b005dc8b2148ccsi1415642pgl.836.2024.04.11.08.33.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 08:33:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TTxrHtRE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-140711-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140711-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D6FA7B25489 for ; Thu, 11 Apr 2024 15:03:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6F7815E85; Thu, 11 Apr 2024 15:02:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TTxrHtRE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 F287A14A9F for ; Thu, 11 Apr 2024 15:02:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712847768; cv=none; b=qt6Lj7NL3A3FxW4roqEexk9eh5knmI1b9vQsdI8RVfm7u4BuE5LDi6COxGE09fJnKJhjEULXE/w2eiSSjL4pv0x4PV/FDBrU2pZNGgHSKbjeogoK3xvQ4imSlBvH859/6zC+fVDaugfe8DjoobqpEUC2dLZnkOYXh7aVS3mtPuY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712847768; c=relaxed/simple; bh=rEqyOsi38ZbTsIvKfbdUj7clGJ1K6n+BfTMVaIMXqwc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VtUN6FHr3IMDu4a6dftMbxhCyOc0K04p1Bd8tF3vc2MKPfucw2Sw2fLofK+r54V9Co1GdIPTx0l+hmdSNhUgWRaffBPqg8DKKd35nh6XTHC277YOK6jkQE8A99Dam5ilEKhI2EPnzSwCmHuIl6/lZYiQUKPIAn2o/ouTsnB2Smg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TTxrHtRE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DAA6C072AA; Thu, 11 Apr 2024 15:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712847767; bh=rEqyOsi38ZbTsIvKfbdUj7clGJ1K6n+BfTMVaIMXqwc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=TTxrHtREVrJ+CiC8o3ydO+Vdetun9o+h3F18TmR78n6nRMhrt8ipN+08hXY8w5U1V fO0YZES+pu46m7RwRJLMrSxfzFztIQMnU26ESW5jYaR2GdSgcOft+AG185s+jugrL6 8mAePzB+bNMce7ZsKzmd5/qVruj+YocUJJ73QnQoQqjX/OcB5p77rWPQOGaBaZTdBn 3iXLxbgcjaE5IfGnhrsyEzAdZjNs6y5GigGgmmrSlXUolZZ4wmDXMIRCu8BZ10UQQ5 TGLJgg2Zlpg0Hdxb0MZECgEWLIECeHwOIY3ZbMyNGjwKtl7tg+WPHpUq/a/yo5qyp1 NCNPj/SUQ80Dw== Message-ID: Date: Thu, 11 Apr 2024 17:02:41 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V6 3/6] sched/fair: Fair server interface To: Peter Zijlstra , Daniel Bristot de Oliveira Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , linux-kernel@vger.kernel.org, Luca Abeni , Tommaso Cucinotta , Thomas Gleixner , Joel Fernandes , Vineeth Pillai , Shuah Khan , Phil Auld , Suleiman Souhlal , Youssef Esmat References: <1abba9e7f47ad4a5dfd8b2dfb59aa607983cdce4.1712337227.git.bristot@kernel.org> <20240411144327.GB40213@noisy.programming.kicks-ass.net> Content-Language: en-US, pt-BR, it-IT From: Daniel Bristot de Oliveira In-Reply-To: <20240411144327.GB40213@noisy.programming.kicks-ass.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/11/24 16:43, Peter Zijlstra wrote: > On Fri, Apr 05, 2024 at 07:28:02PM +0200, Daniel Bristot de Oliveira wrote: >> Add an interface for fair server setup on debugfs. >> >> Each CPU has three files under /debug/sched/fair_server/cpu{ID}: >> >> - runtime: set runtime in ns >> - period: set period in ns >> - defer: on/off for the defer mechanism >> >> This then leaves /proc/sys/kernel/sched_rt_{period,runtime}_us to set >> bounds on admission control. >> >> The interface also add the server to the dl bandwidth accounting. > > I suppose most people will want to use it like: > > for i in /debug/sched/fair_server/cpu* > do > echo $PERIOD > ${i}/period > ecoh $RUNTIME > ${i}/runtime > done > > And I think we agreed to keep this loop in userspace, but memory is > vague. correct, we agreed to keep loop in user-space. It is important to have per-cpu for large systems, like we have at red hat customers (kubernets): each container can have a different setup... and they do. Like, DPDK people would like to keep some few us runtime, while other CPUs it is better to keep the default. > The 'defer' thing is dubious though, I don't suppose anybody would ever > want to actually change that, other than you while poking around at this > code, right? In a setup where all real-time tasks are DL (without fixed-priority tasks (FIFO/RR)) the defer = 0 makes more sense because the bandwidth is reserved anyways, and the DL server would have a relatively low prio (long period). Believe it or not, we are getting there in some cases with automation systems :-) If it does not hurt, I would like keep it... Otherwise, we can think about it in the future. -- Daniel