From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B313C25B75 for ; Wed, 15 May 2024 08:32:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0B8206B03EF; Wed, 15 May 2024 04:32:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 019D56B03F0; Wed, 15 May 2024 04:32:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DFD136B03F1; Wed, 15 May 2024 04:32:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C19C86B03EF for ; Wed, 15 May 2024 04:32:49 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 67307C039C for ; Wed, 15 May 2024 08:32:49 +0000 (UTC) X-FDA: 82119964458.16.B5CE56A Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf07.hostedemail.com (Postfix) with ESMTP id 3EBC440011 for ; Wed, 15 May 2024 08:32:46 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=n+m36Pp6; spf=none (imf07.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1715761967; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=QA0Z86REep+wCdmCQX+v/+bp3VyxCri5N4TpcnLcSGo=; b=eHPfzWpa9JHLVhztsoN6c9p8khs939BHdxmFr8AohoDtqqdQAdyR+0Ow7V43AOKT70DFI7 hDWMkW8rqCPVphBNSWhAgxdVPNojsVXUlmhQLUbrzch2jt+jsZppqiIFEyVJKBL6WVmIH8 9DFHEs9q173vKDuaqI5q9UrJYeUhBDI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1715761967; a=rsa-sha256; cv=none; b=t3lKOUbQed/XAsrm4TnEa14bIJoqW3uN3K4IudOqJkRLD5xJ2RMRkQbtSn50CBYkF8+bVc n4DJCVVMH3biBtZnUiKyFUNMSBcw4TFqWzJ3vuDiDnYjnItdwFkeM2IiJh2mn72LNvpYyH uRcBaE6nKwpuesNcIfX1xqwmuTSn/XU= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=n+m36Pp6; spf=none (imf07.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=QA0Z86REep+wCdmCQX+v/+bp3VyxCri5N4TpcnLcSGo=; b=n+m36Pp6kDfDmvRiAl/tSccNoX 9Cvz89UOpGuItPpAgrSs+t73IUNKLAfPMAyNwTImb2yOI6BpOgzHKoaq0ckUYG0kZbNOZJRTmaLta fY6Vu+x/4qre2xlDxCzeZtVBHzfWxifGgUrDl4nAEkFYbdTtyoGgtNUfAQaek79N+9TuZl+4YQ861 IcAQSoCCeiMwT3VsS8XuSB7JGrSTzZsf3LoFdNmqR/2vC1UYmvaA64LGywy83Xkxcs+vGzabh0il0 T92WagyiD6Ugu/sc5YTuj5rIVaJtqB0hJCWe63k7ptUJfELMepm80C0OsWyPJRwgrhGXco02lgtfA 1x5w5+DA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7A3y-0000000A7MR-2Lht; Wed, 15 May 2024 08:32:41 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 29FBF30068B; Wed, 15 May 2024 10:32:38 +0200 (CEST) Date: Wed, 15 May 2024 10:32:38 +0200 From: Peter Zijlstra To: Phil Auld Cc: Qais Yousef , Ingo Molnar , Juri Lelli , Steven Rostedt , Vincent Guittot , Daniel Bristot de Oliveira , Thomas Gleixner , Sebastian Andrzej Siewior , Alexander Viro , Christian Brauner , Andrew Morton , Jens Axboe , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] sched/rt: Clean up usage of rt_task() Message-ID: <20240515083238.GA40213@noisy.programming.kicks-ass.net> References: <20240514234112.792989-1-qyousef@layalina.io> <20240514235851.GA6845@lorien.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240514235851.GA6845@lorien.usersys.redhat.com> X-Rspam-User: X-Stat-Signature: n5xasdufdjqmew7f8t3f7pdia3dhe5y9 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 3EBC440011 X-HE-Tag: 1715761966-116839 X-HE-Meta: U2FsdGVkX19frEMYNcJDUlkFJ6zEJo8b2pLmqjp0B3Qui1d+xn1Ei4B3KDg49P69pO7UED/3R0QIylin8kk1J0UQzEe1cafrGc6/TpuL7ZrfvqelMyyn2dhNMafq2xR44DTvb9SQR6ek9LrEuKi9fd4ZacFQ98u8yGfiJb3kHA9lEUbv7deMO43P5mPFOc0J5cZA9pnbFysG9c5cnF9iqWnQvbY4wAkUGyQmoALDrHyS7g5PUkr/KTuVniDqAifx4tYgUWsjW2XIa02kXptxjww5sr7W+7eMp8iyld4hhRjlLbxFRjs9xj+uAoiRdpD5FOsICzwwCdBmk6zJoPb6OM8mZhFo6RmukM0zUQ1tcJPdPLD66m25iXNZ6IhIolFgAmZUdVrwnksFh0nxbBWeoIn+Qc7uvHXAAFBxSgDwBFIyThn7UUQve+IEa/wVEmnJH0XCxw9JU9z7AQtoHU8fwpmS8YPpuUifzn5y2H3/hNPv2a9N3b9xJXTHIl6/yyi7tRicSt0W6K79bO0EIkdFsqV6ClPp6fy+v764qL6vAWMNf+VksYqjVOYJaDPcsE05RYUhLFtRclQMK1EBAcSzk7zSUQPLa+MHqittPw5fK1UEOcvsrbDSYTiVYPkUNbVTn8a65eK6jP3uXnV0e9sr77HSREAezoNoCr+oEtrZ4uQI4DMcFZGJWIa/0hE7Aid2msc3vpgwXp/DL24VP1f5Ce6p8gwCzMbVx0IYF91JFzedVipV6EjjRlko1Vc2vws0PFnEi87Ao3THE8Z0nQc5VSDZ0GXHZHX43xPMaD6OqNGp3V9pScgJVgb1kkHOCgCGkURmJKLqE31bs2UQwAeaD7e7xiTB8C95oLs+y8VIfX4aIVUKt17c4+rJ40tkI5PrayKruc2H+TKR6o/rQ4MhkUubfLs0h15Uf0TnL7C7QrkLf+freO2IR7f/WcvQ1KS0wxn/TaagH8bnycNTRpS fPQd5jFm 5Nl1XLKuv/GfFicoMs1fjDKwf5PYpzjTX4hgCCN7VpWSoyok/SeV7nsP0c1x7JukyHW7LrfJl6VxYlCyazGHFMjLQEpSfuHsX5rJteNMHfkug/pKd7/bn6E4FurGSZvkvSBbhxxLMDF1dXy3E+NjYq/bmESc8FbJp5Ro+mIwh2NPdro62GJgGpcjClA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Tue, May 14, 2024 at 07:58:51PM -0400, Phil Auld wrote: > > Hi Qais, > > On Wed, May 15, 2024 at 12:41:12AM +0100 Qais Yousef wrote: > > rt_task() checks if a task has RT priority. But depends on your > > dictionary, this could mean it belongs to RT class, or is a 'realtime' > > task, which includes RT and DL classes. > > > > Since this has caused some confusion already on discussion [1], it > > seemed a clean up is due. > > > > I define the usage of rt_task() to be tasks that belong to RT class. > > Make sure that it returns true only for RT class and audit the users and > > replace them with the new realtime_task() which returns true for RT and > > DL classes - the old behavior. Introduce similar realtime_prio() to > > create similar distinction to rt_prio() and update the users. > > I think making the difference clear is good. However, I think rt_task() is > a better name. We have dl_task() still. And rt tasks are things managed > by rt.c, basically. Not realtime.c :) I know that doesn't work for deadline.c > and dl_ but this change would be the reverse of that pattern. It's going to be a mess either way around, but I think rt_task() and dl_task() being distinct is more sensible than the current overlap. > > Move MAX_DL_PRIO to prio.h so it can be used in the new definitions. > > > > Document the functions to make it more obvious what is the difference > > between them. PI-boosted tasks is a factor that must be taken into > > account when choosing which function to use. > > > > Rename task_is_realtime() to task_has_realtime_policy() as the old name > > is confusing against the new realtime_task(). realtime_task_policy() perhaps?