From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.69 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796059270; b=uE4uHda2m/8k8rFPQ794s+wdWYAnPd3Ndb3V3qUm5re3oaqnsZ9CGjjSbYaOC0AZbyMF UJQ10MVszJyUd2SzQB+01xFnWrR67xBFbO2yPIDW5shUYacRoL6JWFbbIh0xHlQd3JiRJ JvCcWtwNNi7z+n5nqtyvKrMeK50fZQ8GEkelMBuiskp3jehJ/wxarxfv0Py3pWbvQCvwA AENMb2kUD/xxQnSXmtpx7o3wwbOWJXtDIw+B2vRfnUmvKhhpc9D3srVxiUZFqRP6rBw9v cCy9xjeFABvZoi6hLnedhtZsftoyWFZ1HWlwKSaV3SkMEcahocyr7nNvumU5ysfb3EQ== 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=mTgGY3KywWrZAklscjdXo36+77JCKidO6qqrTQE+wR2M9xGJzhVog8yxus11P7l6hD4D eyj4SLj7c2oXGCux83tOy7NeskTF162uau5PxDA4xAbRTw2F/E+6xdcCY2VFXXXIX2F+N r/r/rcRb+ppPVYGeJ4G2iI31f3scu2AaLLb5pchL2fUUBwtll8AQ5DPLAhrdd7zN1yfow sYl9zCJV+4K/fTvu7HPqwkxPlopajdrN+FaP8+T3w1eLdvy4/nwtgWWTEC104m7uIL5Vs JGg+A/RDfLy1KPlt9QTZEY1It+4aLtv6b4BwZ9HZi2WE5jSGywymxLgLq9DZSrK/ZKA== 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=pEYVA5V3; arc=none smtp.remote-ip=209.85.128.69 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (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 D1941606A320 for ; Mon, 30 Nov 2026 17:21:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D1941606A320 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=pEYVA5V3 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4a16dc2323cso67648005e9.3 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=lists.linux.dev; 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=pEYVA5V3QQ5NYfSwSO/QyIvdIb+yhfLD/XeZ/OXx7z28asueVKX1NGfoa7WNT/vwue /4nsMCJRCkZrMFrS5AlYfO/K1NyNIm0Z/0D6bDJqbMiP1XwTji3Z6hJNxBVH3L1OBznp keDIOPsgKYDsVqRFBoPpMEs+S+3NgRhxzJ8Y8sT4ZWO2WUsZEbSpnpWozMWwPqQCwfis GwQajoZsbkk5AtOLGZiECrqMNzOPobdrKQIXbBLEvdiNeZVfDqAUFNxXyv9iw+G5quYg eW/Fhs42Zyt+ZmDG9xKQ+5IFdf3qkiW9cXHxmgTw0TowYOU3O23+JW+kDCQ+hn86hUgE o9mA== 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=0mE/JewO51Ge0s3kdIozvwLpGj3X1KtH05o/d0RnCU3Dc2jlpQ/1usOfcdPnIdxoxL y8JI6/eQKsltmK6mWPfXJm+0BhwdKCft/oP6QvjRJhIxpPzQmhAUkyJxn/f/gEtQi3O5 LYkqe1dCfdV2g+QHa2/vBz1coMmrtZQeoU20rysX81q5xoZIglZjIS6gJlCbP/2Mw39b 6+t05ZsyqaToMO/DWs+MgKgPAANvTfi7CoEIwoNXsLYPWAOuxGPm7h27VKgJISwmZqXW 3KOYQHu/xuUO0kNg49u5mu7Bg3HzGGIMphsL6SIhXHs6lSV5Ag4YQhRPrstv7poFKUgT riPA== X-Forwarded-Encrypted: i=1; AL+hErF5ay1h/a74s7K027CFaJxFlWbQlqZT9AvORFEzbRk6EUB2nNeZ38v+ajGMBLUOoPaZkjxpkBuSKRk=@lists.linux.dev X-Gm-Message-State: APuU4Z/M44nTHpa4NjUo2MkXvKkvJNoqD7K/algFd14e/i23dVPtl1yX vFAz0VfhdXXnxd913Fr34a2Vdu3SxZyrcjxhGijnwujCCSVAR+IZ5voh85XKzDL8F8Sl+crKjdT RY7KxLWbVypbsgw== 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: sched-ext@lists.linux.dev 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