Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3295188lqo; Wed, 15 May 2024 05:51:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVmGQl2lg715OLvRXufe12vgGOfeCPU4Dkx/8zm6Ywf/aWrQCnIwqYMIjzRA3P8zXINgOdxm30jcZxGXkSnXwKQKLejdtu8m4Vu7IOOQ== X-Google-Smtp-Source: AGHT+IFJjJ17EyRKUXk/BTowYALiJq7S5MIzz6D7UNyaT/y92cmVVCuu9aYE8lJH3tx/GLsarZ8e X-Received: by 2002:a17:902:b70a:b0:1e2:8841:8d67 with SMTP id d9443c01a7336-1ef43d2da8cmr173774995ad.32.1715777475350; Wed, 15 May 2024 05:51:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715777475; cv=pass; d=google.com; s=arc-20160816; b=lAldcKwGxPe4GkeOHYMnslhpPOZRrG2twFou126iIWCIUv8WyW1D7aXixSZjz9gZG6 Xn5Akvz2yOaiXK+5m0oM+1JZmesTWUUhkOr+Y9MwrftwnmfdvvDV+rPO5aItbgl9TZJh wRk/SMaHcZET9QCQ2UL9UNhOO9PDK2MFnmcNS/Z0uh1JNnIuxTBWo/7qPy7+yGGRLVGu 3Nl4oiZWwJOft3egDfrG/+JKaB7od+L1CPBSQ3D3CKnuSMNE2bHOSamc2wNYEKGfUg+j IA/tbzS6TJPsUdmtjVwnKqkpnMdljDSyFPa3HNHFk6s4DLthJpXm5/500lmkQrgjsw0M VkUw== 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=0tRd5oikkwXvkBagrbVtw4/yuIwLwdR1d/3o6srHP1U=; fh=sV1nZp3gW/eODvcIHcO49c2pfl0kWx2MDurreQad6KI=; b=d+CEuXZ0GMM4J6cP+V7V3FURKmYbSTAgx1+5pmToyg90wB90G3zMbJwASNIKVz44xw NP+gwLScaHa/s5sj20LPziQL7sWA0bOmKxLup8nzIrWJ7Bktzup4V3UY6JBHQW/8t2Ha +55+5rgjoZw+HQG2xWRqSn/igcPHFg2oA79qRi3s6Ugf9wDyQKv6iybO7oZHF1TEmrvw wLuqZfpv1T0FEHnliT8qNfjJu0hL2kDQ1yoZ1b6hjoynrCnRx+/sJYPCZbBoF4vUe/zX pwUP4IF573bQCgMiBckuMhJYBnNJyIUBkppLaFfIKnLDZDcQ7/BVVBsWKSuKy5iW+CS5 Ni2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W5Z6ZnP5; 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-179853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179853-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bf32e3fsi138582675ad.210.2024.05.15.05.51.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 05:51:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=W5Z6ZnP5; 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-179853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179853-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id AF78A28330F for ; Wed, 15 May 2024 12:51:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B889A84D05; Wed, 15 May 2024 12:51:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="W5Z6ZnP5" 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 5964781736 for ; Wed, 15 May 2024 12:51:05 +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=1715777466; cv=none; b=GNZzxCwhqXPHiwMmEiqtS7wXr3fhfJq0a/YsnCf56lzmx1f2IdDEE8be+HdgxUZl4j2iKIu66FqumDOdFJl2QGxZwVzqe0U/n1lXUSLrzN4QjcHKJXn+H5NHyJkkTohCZH6ImDJ4eFhMO2h+0anG4hlETrbqvCD2B55+RJypni8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715777466; c=relaxed/simple; bh=YubN0gIftBgJpOTgJByjSOdEkhoFUK066HCDBKY3Hlc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KPmnQcrLKg9l86FakG253MxL64BylFOk8Rn8ly/X0aFNlQPf1v/KcfnfcS+Ip6JSlPSFt8WZb72XQl3COa862CMtA4Fn6JXxE3nZ2iSXH0xt0F1/vdhf1ezjXzwJSGuqkCx8mWxswiJaZQMxWJyATKNZa665rWD7cvA7yKv2LOs= 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=W5Z6ZnP5; 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=1715777464; 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=0tRd5oikkwXvkBagrbVtw4/yuIwLwdR1d/3o6srHP1U=; b=W5Z6ZnP5Wf3jX4TbCoV8AFBiLyiLHJam86SlZvPaZI1l6Rp95vCKakM1i36BMrAtsYGvpY vdtDPjc8+oWVlFONYLpaQODiXCjQ1Cox8CGkdzj8iqInxPoMhj9ugmZmvdklCMz6Smzujr cjyN+C8lPsTEulxKyzh7qNnujVNZkwY= 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-659-POCGVL3zNPmxVDYqGTjeCg-1; Wed, 15 May 2024 08:50:59 -0400 X-MC-Unique: POCGVL3zNPmxVDYqGTjeCg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 221AA101A52C; Wed, 15 May 2024 12:50:58 +0000 (UTC) Received: from lorien.usersys.redhat.com (unknown [10.39.194.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 806F2400059; Wed, 15 May 2024 12:50:52 +0000 (UTC) Date: Wed, 15 May 2024 08:50:49 -0400 From: Phil Auld To: Qais Yousef Cc: Peter Zijlstra , 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: <20240515125049.GA29065@lorien.usersys.redhat.com> References: <20240514234112.792989-1-qyousef@layalina.io> <20240514235851.GA6845@lorien.usersys.redhat.com> <20240515083238.GA40213@noisy.programming.kicks-ass.net> <20240515112050.GA25724@lorien.usersys.redhat.com> <20240515120613.m6ajyxyyxhat7eb5@airbuntu> 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: <20240515120613.m6ajyxyyxhat7eb5@airbuntu> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 On Wed, May 15, 2024 at 01:06:13PM +0100 Qais Yousef wrote: > On 05/15/24 07:20, Phil Auld wrote: > > 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. > > It is called rt_task() still. I just added a new realtime_task() to return true > for RT and DL. rt_task() will return true only for RT now. > > How do you see this should be done instead? I'm not seeing the problem. > Right, sorry. I misread your commit message completely and then all the places where you changed rt_task() to realtime_task() fit my misreading. rt_task() means rt class and realtime_task does what rt_task() used to do. That's how I would do it, too :) (Re) Reviewed-by: Phil Auld Cheers, Phil --