From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.71 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796059270; b=hABZZk3v5Zfp6Ho+P4FnK9bb4jHBDFrHtmgfgvTMtCgvbZkTmUK5arPg1pIaVHULNahj RytW4lhfJ2wYelLzHxjHvbKkiIVf4asz5yAKB5VIt1tvRBSaBm8To4nmIX1TvfqLPVGw9 U+MJ7DTGM+mRwB6e7+bv9uV76TQnS9NuGO7N0MYOGUqjo4BJqp3mlaWFXURUf75hIee0U /hSS6fg4pCbIql4tPvMo/Du2i25RUTwIaHtOY75qiQnFglo9JS9BpWelfYnojzk5MBsHt gU45pmUIfwEBqA5x7/zL/zvcOIvUcM4RZBhroFYTL+mzxzq2eNB7QDcUXlZo30XS35Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796059270; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=t9gJEED7WFF7mcnK+amt9xddiT3WinpcSfq21tc+AmE=; b=lkPdkHBF4l9fQ+5tttWAHXrovp5gueSW6oP+fHqNX+iLIgG2ebubaycs9oTAzJmfhFsc 6jDgjnMLQ0Hno2BmXC0xweDPH/DK4ZlYF+A4APpaV7zSfw9krEpCXdX93mvMW3VVui6CM bMylezMnP02v+ou6cCezUyw/MWekwmxpyoR05WKHRxSnPoM+UBiW1IJGHuKkzzoBglgAn 9tHVbJQCYIJ0cYOIor8uNvykvWfYzISVzTSFeLM5IFz5pzAS8AO0li3UIAjZ2z69Z5GmX KvQG0wlPdcxlnPvHfjBtBDZyFeXambfUMsumu21UaUfuEx9Sa0i/WIj9WBEWDKNNKng== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--jpiecuch.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=boZ04A00; arc=none smtp.remote-ip=209.85.221.71 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA2A6606A325 for ; Mon, 30 Nov 2026 17:21:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DA2A6606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jpiecuch.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=boZ04A00 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-4bbc86e1eb0so4271975f8f.0 for ; Mon, 30 Nov 2026 09:21:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796059268; x=1796664068; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=t9gJEED7WFF7mcnK+amt9xddiT3WinpcSfq21tc+AmE=; b=boZ04A00+B/D3iHRCeLfaAekw59zh8bkVeanKE8Ms/M3syCYj/GKCQ0sGpYTkrHYFl pucSm4wfp09dUabNAVyfbAXVvRZlrtETvkM65i8Jxxcaz/eI6JPsTVv2rxOwsNchiAhv fIOLxqUyTl+nzeigCCzDAlz2YXQZN8xCAKQlFVCiAUdolMOimxyoskRuc+7ymTSLsnhL W50P37o5q/KetzstYiqQ2OcyFgK0I/b5VfB3GphJyEUeLSaGqmZ3Ivgi6izewx9it6et FuR8q0Pv/ZPCxpjGjw4OtIKAbHy3f8v0QRg5Uf2bvWFE+g/qOVOlVrR2dagJnWfzSurL rYoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796059268; x=1796664068; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=t9gJEED7WFF7mcnK+amt9xddiT3WinpcSfq21tc+AmE=; b=Te6Xxga098iOR6csm4OQgx6MPibH2hbA+3SehpG9mLndYfnw5g33s4mLeyWZytHxP7 THA9/J2OtZ143yrvMYGe3I7cNWYoVUF+9md8zjQ0N+jBzxcZ9Nq2qlBeMJlQTYkkxKIi owLxTtROZMA9Bfm/LdEGTIo4HEH2Bx7blp1iGcPF74jJo67Y5xcy6W4RUcWWkr+yMjNA ZAeCIox4463KvdPyNaLKsj31W4JT6nCIikmI4QjUx9F5uCNOlegOVc5SXt4OlwM7cFHq /IlnJJfD3HJ9qPvhg0/2qmudqvEap6lkcbj5SMEvJ9pJfiITbai7ExdqIMDXxprMttf8 dQKQ== X-Forwarded-Encrypted: i=1; AL+hErFXqbp8LVSgV6XccFbacYeyANuBYkL2di7/VOLrjBmmzoOfAdhgTaT3oEceJhbVNdFzzfy4vNvFodW0GkE=@vger.kernel.org X-Gm-Message-State: APuU4Z+/Ed75shEtrZVgbaARQKPn1WCv3f9Q00l3cW5insPvgOKpCu0I bLkSLmAG1dMHrVC7Rddhp+5KfBIQq7IHhXBEaGtUnY0m3ox2CL2GJ2bDRiAx54KtlXjW8YxDJln cInfU21S6JlwWDw== X-Received: from wmdd24.prod.google.com ([2002:a05:600c:a218:b0:4a2:9cdb:2bfe]) (user=jpiecuch job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:8210:b0:4a2:1a:a116 with SMTP id 5b1f17b1804b1-4bb887865b5mr684772755e9.0.1796059268103; Mon, 30 Nov 2026 09:21:08 -0800 (PST) Date: Mon, 30 Nov 2026 17:21:07 +0000 In-Reply-To: <3ff50fc71138b619629bf83af9618cbe@kernel.org> 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 References: <20261130125422.3895514-1-jpiecuch@google.com> <3ff50fc71138b619629bf83af9618cbe@kernel.org> X-Mailer: git-send-email 2.56.1.839.g22a8290db9-goog Message-ID: <20261130172049.3953897-1-jpiecuch@google.com> Subject: Re: [PATCH sched_ext/for-7.4-fixes] sched_ext: Clarify ops.sub_caps_updated() context and intended use From: Kuba Piecuch To: Tejun Heo Cc: David Vernet , Andrea Righi , Changwoo Min , sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Hi Tejun, On Mon, 30 Nov 2026 15:26, Tejun Heo wrote: > AFAICS, this doesn't hold when a delivery for the shard is already in > flight. caps_updated_record() then only folds the change into the buffer > and the kfunc returns without delivering it. The caller which is already > delivering reports the change from its own context, possibly after the > kfunc that made the change has returned. This can only happen when updates > to the same shard race each other. Maybe we can figure out something > better in the future but, for now, can you document the condition? The > same goes for the struct scx_caps_updated comment and the two kfunc > comments. Good catch, thanks. > Also, scx_bpf_sub_revoke() walks the whole subtree, so the caller can be > any ancestor, not only the parent. Agreed, thanks. > Leaving the delivery to scx_sub_seed_caps() isn't specific to > ops.sub_attach(). It happens for any grant or revoke made before the > child's ops are ready. Makes sense -- will address all of the above in v2. Thanks, Kuba