From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.97.179.56 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796535543; b=q2OJ7i8klyQAkEC6JMPLnSmFmtKqQliEPowWeFr74lnsXHzZY1pxbVj9mh8d9SGGY/7V G+c57sAs2/hBj1jTwt3QSQKe6VRn1s7uc2BRMSmxalCUmeVS7h2FpfruRud4QWxviq5pE 6Tjq8KgoSUwM/sHtdcOpV87US9l3AoUTgPLbh2KOH39YsBYNrpJ2rau//6amxE8sqTRAn ByTqYuw7wR3H7CngOf6VmHuHKofgizauaz6/UhRtLU3jf8hc6nt5QMPu+uJvPzk3n8UUT 0+3aA/X2lrYOZT6XTiWs8h9WHGX9N8DIzKcTX7RLpCwMOkpnZRFDlPcEvAzmn01IhmA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796535543; h=DMARC-Filter:DKIM-Signature:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:From:Content-Language:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=ccJLIFnvJeAmE3Sk57Hh9G8CMnN/g5x7D9OdEHcyQRk=; b=YsMwPtdX1mv93Nm+UnpeM7X8OuUw1I0IwujGtjh34QhpnQuo2pR0laqFDU6/Yi4LjcG8 vnp9zPdWLwlTmTGrmwNGB6xdZ4/BK0hyiPfs5mlDasIa0i/GlvaILXSkUaGTEQmw6qO7n HepLROHkiTYrcRsCQyFgntqDbYJzF5pSgoH/w7MJsBRD1n7tK3x1C9cKsIjuOcYyUyR+W oAmAOVVP1t9Y8Wq3grgb94wQ/7Q2JTtvuJheV1SvQQLgBCgdPa6pIK6tkeyYYpaMzFJqQ cqdija7mhXDUaao4azJpAdIZiMWFNhOc9Cxnz+Qz6jpr6ncX77O/5ig5jz1n7WzZE2w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass header.d=igalia.com header.i=@igalia.com header.a=rsa-sha256 header.s=20170329 header.b="RD8UB/dZ"; arc=none smtp.remote-ip=213.97.179.56 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53ACF606A31F for ; Sun, 6 Dec 2026 05:39:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 53ACF606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.a=rsa-sha256 header.s=20170329 header.b=RD8UB/dZ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:From:Cc:To:Subject: MIME-Version:Date:Message-ID:From:Reply-To; bh=ccJLIFnvJeAmE3Sk57Hh9G8CMnN/g5x7D9OdEHcyQRk=; t=1796535543; x=2111895543; b=RD8UB/dZZlEMLY6pk4N+vB6xG7YC8JPYQOGd6k4zXuB/0rU//7kOuFii99yq81EEqOgCihlyi7H Uunrh9gFbm0uZriJfPBrWWCiwFCIZvcyaX77x/ksUSQivsfI5AqKzFXfwpm+F8s0q64gCvFmKC+xr yp+Ntum7nlRUwfRFazbAsTykPqPKGs863oFnelEJb5JslYCcyAwmmq1kHxjfncozbbvWkWGCLFUp8 hGH0QuOx6Dv7a2o0JRXqwpT7oySWjvpw+1AtzG5jkc35KHuirhLdPBF95TFLa/v6/D1ymcAlNgSyw BdKZvUg9KAB6iXSCHks2nrRvvlOsfbA6ZJ2w==; Received: from [58.29.145.179] (helo=[192.168.8.237]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) (envelope-from ) id 1xa4xe-00000002dQP-3Vty; Sun, 06 Dec 2026 06:38:59 +0100 Message-ID: <2e52274d-a5cd-4bb9-847c-ca0236e592b6@igalia.com> Date: Sun, 6 Dec 2026 14:38:54 +0900 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/8] sched_ext: Add p->scx.bpf_priv for O(1) task context lookup To: Tejun Heo Cc: void@manifault.com, arighi@nvidia.com, david.dai@linux.dev, Gavin Guo , kernel-dev@igalia.com, sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org References: <20261203045618.982539-1-changwoo@igalia.com> From: Changwoo Min Content-Language: en-US, ko-KR, en-US-large, ko In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello Tejun, On 12/5/26 2:19 AM, Tejun Heo wrote: > Hello, Changwoo. > > The following is a Claude-generated review of the scx_qmap and selftest > patches. It's fully AI-generated and I haven't vetted the points. > > - 4/8: probe() is a syscall program which is never associated with the > struct_ops, so the test reaches both kfuncs only through the fallback > for unassociated programs. Also, every task is on the root scheduler > while it is loaded, so task_sched_id == sched_id holds whether or not > the task was switched to SCHED_EXT, and the test can't tell > scx_bpf_task_sched_id() from scx_bpf_sched_id(). Telling them apart > takes a sub-scheduler. v3 associates probe() with the scheduler. The sub-scheduler handoff test now records scx_task_sched_id() in the receiving scheduler's ops.init_task(), where the task is still on the other scheduler, and checks that it reports the other scheduler's id. > > - 6/8: The comment above task_ctx_key and the description say that the > tag matters e.g. in qmap_dump_task(), but qmap_dump_task() reads task > storage directly and never reads p->scx.bpf_priv. The lookup_task_ctx() > caller which can be handed another scheduler's task is > qmap_core_sched_before(). > qmap_dump_task() now uses lookup_task_ctx() too, so the dump example holds. qmap_core_sched_before() also reaches tasks of other schedulers, and the tag covers it the same way. > - 7/8: ops.enable() counts every task, so the test fails when an unrelated > SCHED_EXT task is alive at attach. With one such task running: > > Expected skel->bss->nr_enable == 3 (4 == 3) > > sub_handoff filters on the target's pid and passes in the same setup. > Fixed. The test counts only its own tasks. > - 8/8: The return values of scx_bpf_task_set_priv() in ops.enable() and of > scx_bpf_task_set_dsq_vtime() in ops.exit_task() are dropped. If either > write were refused, the matching stale value check would pass without > testing anything. Fixed. Both are checked and their failures counted. > > - 4/8, 7/8, 8/8: The tests compare getpid() or fork()'s return value > against p->pid, which doesn't hold in a non-initial pid namespace. > Fixed. The tests record their target from BPF and pass in a PID namespace. Thanks! Changwoo > Only the 7/8 failure has been reproduced. The rest are from reading the > code. > > Thanks. > > -- > tejun