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 ABD18C25B75 for ; Wed, 15 May 2024 11:21:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2E8396B00B2; Wed, 15 May 2024 07:21:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 298526B00D9; Wed, 15 May 2024 07:21:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 160596B00DB; Wed, 15 May 2024 07:21:02 -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 F30F46B00B2 for ; Wed, 15 May 2024 07:21:01 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 034431C1750 for ; Wed, 15 May 2024 11:21:00 +0000 (UTC) X-FDA: 82120388322.21.D071EE9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf21.hostedemail.com (Postfix) with ESMTP id 9FA431C0015 for ; Wed, 15 May 2024 11:20:57 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=UllonT1Z; spf=pass (imf21.hostedemail.com: domain of pauld@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=pauld@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1715772059; 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=Xb1sVzNBfC6f+qv5BV5/1LiBTZinzT2pJiB886gVfWo=; b=FbNPa/JWUzVzb/R7BIejJnKV2xDm972xk6ypy7NSxCN8S0/JF49oLYPfaI93zBeiAPnZ78 2fVemqmDBDtBQsA4gOuc9s/SndKEIG/UdwXp2bns05OcK6AM+2NixDYN262v8OxvycMbd8 YZp7Snbiyhfp10ZOaRA1lPsUBdVUkyQ= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=UllonT1Z; spf=pass (imf21.hostedemail.com: domain of pauld@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=pauld@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1715772059; a=rsa-sha256; cv=none; b=ZUCWdnIK5XXrBcED9mBpEuXve5ou7KnzcGh067WINOzWckY7T24kqlnzbnLn6LpwktWakZ N6eVot+1uapZXUw2XahjNvofS2mtzJrKZaZVeJjva6YSF0tnoLkTEBhKqsceLdGlDYw/FT HHFp5/yeDES7/c/ciJey8m59mojTRB4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715772056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Xb1sVzNBfC6f+qv5BV5/1LiBTZinzT2pJiB886gVfWo=; b=UllonT1ZdnogBrh2Z+RzA88pBOAz38UtF50u1o8YFELEYJSOy644FnnGlEdyhYMkheirYx fbuHU1BZ8DgHfunSCy2bVisToxCyKfQ0fcqoogS7N3n7PN4Zmka54Iw5d/DIA9k7fgLovN 52TAkaNlGwXvfK4KZHRS+McDmbaVon8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-157-vuSAg_TpPFmNlYbMwCy-Yg-1; Wed, 15 May 2024 07:20:55 -0400 X-MC-Unique: vuSAg_TpPFmNlYbMwCy-Yg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C9E7801211; Wed, 15 May 2024 11:20:54 +0000 (UTC) Received: from lorien.usersys.redhat.com (unknown [10.22.8.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D8193C27; Wed, 15 May 2024 11:20:52 +0000 (UTC) Date: Wed, 15 May 2024 07:20:50 -0400 From: Phil Auld To: Peter Zijlstra 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: <20240515112050.GA25724@lorien.usersys.redhat.com> References: <20240514234112.792989-1-qyousef@layalina.io> <20240514235851.GA6845@lorien.usersys.redhat.com> <20240515083238.GA40213@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240515083238.GA40213@noisy.programming.kicks-ass.net> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Stat-Signature: a5tufwtoa6qaty6ezd7hhow4k8nme5ss X-Rspamd-Queue-Id: 9FA431C0015 X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1715772057-268237 X-HE-Meta: U2FsdGVkX18UQsET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NsNbXi+tyVqgOrfW/UP4F/cK8MAHwH6EuXphqolB2caCicoSK1BdH96Ti5V/blM5cqiz00kgs3IQXK9r3pEKEn8s9JeSdBYYVmAPbyH/xcaOjuEhITQLjA== 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 Wed, May 15, 2024 at 10:32:38AM +0200 Peter Zijlstra wrote: > 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. > Yes, indeed. My point was just to call it rt_task() still. Cheers, Phil > > > 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? > --