From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 F219043CEE1 for ; Thu, 26 Feb 2026 16:26:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772123176; cv=none; b=lCR7L0IWRDKp0nqAg65lf6qDoT4RmeLxvSFymjB9Bt24327xJXVjJob3Td00vQ83X2vEGlpwzRbrveVmSqUKj6hJ433/OTgt8P5IYeZ+nJcfNg15RtBigUYEto+YSWP+TSzL/okKPvvgDRr9wusHeUSnX/pcU8jloK7Oe2oQHCs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772123176; c=relaxed/simple; bh=iMz3JjCEEDgr+u+ZxWBQIDxqJrYAmRmu6TUKDJU0hKw=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=SYalCRUSAcYo9tUREJnGtLrgzbN36OoulF67ubrfyI7M5KQT1wtxwEtjOgO931FEJ/hF4WMhJfZ0jnPYEHK/NyrF9AzITUUlVNP7zpHX5TsfaIveQY6OfuEaJEGKNoN05geC5nUZBaMW9aKukaoeoO0NjD94Hv7jNWvl6bbDApM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=Ais0IB8/; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=gFKAFXEV; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ais0IB8/"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="gFKAFXEV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772123174; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iMz3JjCEEDgr+u+ZxWBQIDxqJrYAmRmu6TUKDJU0hKw=; b=Ais0IB8/AyOMRjY9Wrfdl2YirSw/qjiAol+1OLsdgguhdF3STnkubTbLvAZOJOQ6+zk/mr gh1ioG8q+8U3HyeZcS6Cf6q9rSsJGoE+FTeT9Dqrv+ummheUgiPIb5ArL7InPRdhMOUq7P v3H8cxtML0UMs8kOxLnFLKBwFs9v9qY= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-336-MbizVuXQMeewtG5Nwxwhcg-1; Thu, 26 Feb 2026 11:26:04 -0500 X-MC-Unique: MbizVuXQMeewtG5Nwxwhcg-1 X-Mimecast-MFC-AGG-ID: MbizVuXQMeewtG5Nwxwhcg_1772123163 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4836ff58111so12183895e9.1 for ; Thu, 26 Feb 2026 08:26:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1772123163; x=1772727963; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=iMz3JjCEEDgr+u+ZxWBQIDxqJrYAmRmu6TUKDJU0hKw=; b=gFKAFXEVye+RwnDgXz52GCZYXrl6mDKYdJPiezadtLPTX7uIOlImbZwkay0BozU06l +besGbFBeGVQdNq17bzD2uXz+G24JeCTSDgvXKe8gxa6qcomxtIxJRHDODKQuZfXV4nj y2NVF9CLOljS9K24rJkFA0HH47EZyWGvCTXr7j4hKvjT6hWdEA1aw2Mghc2V7ZRHGRrL Tg09ubV9DfliGlxpfq6V9/YTgrLvOoeHuYDABjE1qHwZDyK5X4oOEBR4Lp74zop3I8Wt UY0F3zmBUoVipHmqF0gOquwat9KnJvJ/QAwlwjtaWOl6UaXYLRmxv5BmsjLkZV9cI0O0 80Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772123163; x=1772727963; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iMz3JjCEEDgr+u+ZxWBQIDxqJrYAmRmu6TUKDJU0hKw=; b=iII7QWDU6ol+Wj8NikDciN7bdLGCrrTJCEoOlYKdVszVgEwJ6XX60cMZugPvFJTl5w h7GD+DEZY5WCjNM6D7PZuFHTgPMTkTOrF0oQ2UVoo/wYR2KTy6AL2QxET2I3AvMv5NX1 yJRZRHVVEdjOGgHtZ+lc58h1+PwwUBZOravEUCvISxoeNci4t0t5+JfYfkXQIG44Aep7 1HznXq7F00CF+OQQxhan4vYxZ3yz6ba7wamZ691IlarrDrbjugkp2LD8jXCpIHOjT/wS 7wCUUxlNYQW0S/P7xyENhwRlS4oupOSsAlo/1v6ezjgJYGB9sncP20OGm7IpNuiqb2Ie vQeg== X-Gm-Message-State: AOJu0YxZSi7j95x8sZWtQbeyF4thqT05Pth+IaF6J+VtMPBMcCzTOVqV vTUnE+NpSUeuY44zhDuh+P3rx/PVSB5RS53foxVcPSocllgKshVUQIenNvbe+vni8YKr6Hg2mxe t7Mr5UU/J+hZbdJIRqJy8EyWGi3zZdEsATKVv/D7EiXXi98JUZ+Tw721CdwZ6nMpZ5w== X-Gm-Gg: ATEYQzyPm6s6heEjuzOTuAGQbGQaek0GMAe+S4YjH1cYDSYJRlaZiGef20i2FwbdDVm rk8bJtphO6nirQpvuwjWbuCzT0cm/Bk54jgDmG7x5X7QDide3MjFkanoVoU2FEfJfOxUIU6VKpi 8kzlQWsjNqEjxbI71JTt3m1pi5feKJqJ1yTKCDPfqx27aAv3DK9Rpe29lWt1I90L5bFu7a2ExLa U80FmsY46L6mpcmD5KAZir4x1lYij0l7WVTfEeDSnjpLXGaBerbeq3AkanLfgFtznd20R2qOS9P MvXBeDBhTfwCpGet92I5gBtR/ClAurYmr3OEPf1m8UEX35nxqwOP2DDwP4Nalvw/RZdOTA81F2+ OPeRXJQ+1Y8drTG8wUg== X-Received: by 2002:a05:600c:4f11:b0:483:7903:c3b1 with SMTP id 5b1f17b1804b1-483c3de3911mr35389005e9.20.1772123163014; Thu, 26 Feb 2026 08:26:03 -0800 (PST) X-Received: by 2002:a05:600c:4f11:b0:483:7903:c3b1 with SMTP id 5b1f17b1804b1-483c3de3911mr35388675e9.20.1772123162585; Thu, 26 Feb 2026 08:26:02 -0800 (PST) Received: from [127.0.0.1] ([195.174.33.230]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483c3b3d24dsm44190465e9.5.2026.02.26.08.26.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Feb 2026 08:26:02 -0800 (PST) Date: Thu, 26 Feb 2026 16:25:59 +0000 From: Gabriele Monaco To: Tejun Heo Cc: linux-kernel@vger.kernel.org, Andrea Righi , Joel Fernandes , Steven Rostedt , Nam Cao , Juri Lelli , Ingo Molnar , Peter Zijlstra , sched-ext@lists.linux.dev, Tomas Glozar , Clark Williams , John Kacur , linux-trace-kernel@vger.kernel.org Message-ID: In-Reply-To: References: <20260225095122.80683-1-gmonaco@redhat.com> <20260225095122.80683-15-gmonaco@redhat.com> <8fbc3ced19fb0c2a2171708073fa51ae308755b5.camel@redhat.com> Subject: Re: [PATCH v6 14/16] sched_ext: Export task_is_scx_enabled() for verification 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=UTF-8 Content-Transfer-Encoding: 7bit X-Correlation-ID: 2026-02-26T15:48:11Z Tejun Heo : > On Thu, Feb 26, 2026 at 04:42:34PM +0100, Gabriele Monaco wrote: >> scx_enabled() might as well be exported (together with its static key), but I'm >> not sure exporting the sched_class is the right thing, since all those scheduler >> things are quite private. > > Don't you just need the sched_class pointer? Can't you get that from > kallsyms? Yes that pointer would do. Do you mean getting it in a task_on_scx() reimplementation I would just use in RV? I could do that but I was looking for a more standard solution. While very likely the pointer to the class and the class field are here to stay, having a function like task_on_scx() directly available in include/linux/sched/ext.h is less error prone and future observability tools might need it too. But let's rewind it a bit, if it is a big issue not to have it inlined (which probably isn't), we could just go on with something like _task_on_scx() (inlined, for the scheduler code) and task_on_scx() for other users. Wouldn't that be acceptable? Thanks, Gabriele