Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3246396lqo; Wed, 15 May 2024 04:21:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3OUjTiRHevKarbkc7IO10JSOqpvDhfPltFBJl3Vw7jR9ys3+Lh5vha5UFZqekLuqAH6QnubwdTGIVZf5R95OjE3H2LQHH7uvvasHLrw== X-Google-Smtp-Source: AGHT+IEMSoeQYVuG+flM1KgKHLgihvyP3kpZeIqSpFmGJCyweAppGFNGlRF+mEWyMZ6HfiqlwfW9 X-Received: by 2002:a17:906:7c59:b0:a59:c62c:344d with SMTP id a640c23a62f3a-a5a115e7606mr1591707666b.9.1715772099459; Wed, 15 May 2024 04:21:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715772099; cv=pass; d=google.com; s=arc-20160816; b=F9+OFoDUHEpirslUng1WMpHYP0geRLX7AwdxE/agPC+nt6gOWkBDrB8L1txI7QpmXz 9FU84/vM123HSMjhOd7XtOL41NG1zIjqJnYknK+Daqn8OdSb0TI7Cb3NFvu3aVeUFBq0 5836meKDMz1K89jlLAUNNrXCv7JSShXiNyLI3yFhYIPHf+DxPsWfA+cMImw544TOloae byatSCpDrS+Yl0n0ZxlJeNDIixqSrq0uGJquWoupb6eQk9ePIVzaJMU+8USeazZAq7hz o1bc5/NzELpCIQzghiaMacb3vVv/w6TJW+ojU+RSBt7qr/Kl6H200iPW5bDiYKrqKaRV LgZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Xb1sVzNBfC6f+qv5BV5/1LiBTZinzT2pJiB886gVfWo=; fh=9NuA80ITORcBmFOW31naMBY9Wqc5KbPdWIB379/0lFk=; b=xHMDmv/CWFZm4e4Vv/aN3dhtopT20iMOHR+/Ajktzr1A6ewOWxBdd1DS3utOYR3yqY 4CcuSecRISft4DrYuybpehFzmXFjTMWB6bGaAUcDPtN8DYNI5FY8STeHg6ILttYHNjfg 0HEYe7zR8Y6FyN7cSFFkZpl8NmhTDOWaxWvvGC8IYIisr7VukSMOK19Nyslr3cn2p5gf 3kpLhPXu6XhAdjw5Cb7B6wMnN9aQiGS5iO2c1qlN7u7czq0MrQUPlBgfnpDgKoAWKZz8 oQuh0P7iFJTgP49cixj3WEVZmw9gkhsk+1fwaAWEYOgBOkqC26fBJF1bdBYQuXhFuCKm WPUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="NGM/LyzI"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-179798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17be6925si741250166b.774.2024.05.15.04.21.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 04:21:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179798-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=@redhat.com header.s=mimecast20190719 header.b="NGM/LyzI"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-179798-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 381321F235BF for ; Wed, 15 May 2024 11:21:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2537C71B30; Wed, 15 May 2024 11:21:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NGM/LyzI" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 AABED6F076 for ; Wed, 15 May 2024 11:21:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715772063; cv=none; b=RGKDdjuUiRCcv/ekKdyos7SoBAFQ3z6qDCvOXbYQZT88lHVllwvMYGSEaYTYDd0e0tjQHpmaNgyHcnLfY1YVakPWmEkIGyNmUPz4VinP+RkcZxvjcDf9savW9Cp7Fupqls+HZ0ByleYeLm2x1dSyXWqHLRDAeJ81m5dT+eUmk28= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715772063; c=relaxed/simple; bh=zr1CnaLoqVSMzk7K+1heCWhXCxQ9Rz2pG86DBXmZlGo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hJ7+S+KJr2YTaIeGRpSw8J/bh+ATOQLVXC76XMBjYTn6PSXoNrThUErA29ryvFvDxDTCneJIEtUjuzRPSXXoVECEFOoQQZLW/cuWWwyabJux0L6EB3Bx0swbs8V7lT/8Gm0r7JPoIRMu+TQniRJMXxlK/NPqLsG/M1WagtYwi7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NGM/LyzI; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715772060; 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=NGM/LyzInveBBOSlt1gSKZ7PAlUEo0xtlhgWqLJ653Y8G3EcJa2f2vbE7o2s4ipN7UvRW8 tO2WVFMiv8UlBt59eDCQQbvEtnzQxlX6oH0/3Wil4fmqM8cshCwIz5KAdvY24/Y+q/ofmh 1H99smrtdk9eZ20tZ2F1uVvv9fjOh5Y= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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? > --