From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796404761; b=eir6B7icJFK/CynBWIFZ0qa5TDI0Jl2hGtE0wGzR+s34amKnVSDRRsVMKbbuFNXv6pY+ k5CzzcWIga5/FHnqPBxaLhXcpHJOem9MkdfJVo4UGVFlxvCeDdv/w52JBNXFaoBQmsDIk KhiEtx7rKl8oMX02XBtb2FqdJULR4UtfJZZWZq4F0LtHgOIUWl6XzlZM4a88P28ietpa4 smbvREphNtMwCDDdpfuvahW3Lffyr0uFChy6HqccNm4rM0SzuI1U6seNkjWm4dqf+QdzY DVjcA7fG9zX9DNgtVspXOhIP8qOuOtDXNTqz5tmlstd9tXMp2gp6aFvWyHvA0jpCtgQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796404761; h=Received:DKIM-Signature:Date:Message-ID:From:To:Cc:Subject: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=CtbxyLalDyRAb/OMM5koXZssJNcBYZjjMos9q6G4pPg=; b=LIFi+XjuTIahiDMgnnyl3XkSPikB8b9MHHSR076vRrvQiD9DKMwFtHwxY9VrkKMhwqrd 8JcP05y4gNf8T8btiS6119OJ9hHTOWiD6N/bLU0HP5Zebak1go/gHelGzoFAP46Es/XLm HYyKkD+ILsb9R2Cst927en4z7t4kS2LWbzf99K6WpUPF7zRalFQ1rdNGFWvJNBzPAp9oA 8OY1qeCGg/FEoBKNWNqgfze61sEMj1iV/YQFPtFfAOpSELrvqcVGrpALXyhf4vrP2Osgh hTAVUu+x/Bnsx0IzUS/YFxaiKo9/lwbBMdJq7QRwxHb5907g39CrJdLR4CyvlWtnKXQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="od7kBs/Q"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58653606A683; Fri, 4 Dec 2026 17:19:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=od7kBs/Q Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA3AD1F00A06; Fri, 4 Dec 2026 17:19:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796404760; bh=CtbxyLalDyRAb/OMM5koXZssJNcBYZjjMos9q6G4pPg=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=od7kBs/QsAwfYcCM7Gm1+xyAsRm90BHEN0+YJ50Es3yadiF1Sg5/a0Jj+D5pwuPzF 0Tinl1vh6kftvHKRKzLB+HnJoSnjcUJwwEt/mx/5gDZA7AthMm+JYtaUfdjEBpzt0f NBuXywEYLA/Vg/fJgu5GCaPvWqX0UijblVotOb+2w7r0duXJpTeovAD94KoA6Yc4bN ySb84nf+VAeQPMWCqPPbIkCtV3wGnbhJC5RYU5OPDEi5BnK58RU4clje2PHohO/Bw9 RiBzNG1NCn8fELOCXYtFd/RB/dXfHffmaDQwXyVTXdnD2RhwpLO0wnkU9fu0zTaLCV 5mcim2Uq2KM5w== Date: Fri, 04 Dec 2026 07:19:19 -1000 Message-ID: From: Tejun Heo To: Changwoo Min 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 Subject: Re: [PATCH v2 0/8] sched_ext: Add p->scx.bpf_priv for O(1) task context lookup In-Reply-To: <20261203045618.982539-1-changwoo@igalia.com> References: <20261203045618.982539-1-changwoo@igalia.com> 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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. - 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(). - 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. - 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. - 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. Only the 7/8 failure has been reproduced. The rest are from reading the code. Thanks. -- tejun