From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.69 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796241878; b=CLwjEiXw+Icyka3R/wMFsyAh3/nPJFqP/bPkT+A5/IHOHvvLpxtJykFLGr/679bUpolw lP4Bu4N5OtBS4SjFEh7D9LvoUsCUhSQkarM1pf6e5ULqa+w9ShUJVraf+l9B8WAd+ds4F wPoK88s7+IVCqzs/q7Bw0wIKvqQbrcYyAAOZAoeOQSXBIHv6nmphNV4BNXn89jx7UUIC6 +DDVZolj1HMUlOjm+FPN/BLWtr21UzBg48+Tde09in91YBovqXa7krscjB/C0ZGX40yQG g/fmR6SCtGKRsg/yRSRtM/jaQI/ZNw9PmYIWE7ASwwvqGqQTgzTVMmxtg0mEnCJXe/A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796241878; 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=AoGOJSQzkyikCQcPX2WlAIu3WzAqZ6ORKBLwlH63qyQ=; b=t7d72WiUE2eOMsMcAPvyzss8i/GgXNxY4BPqUJWpdwUB8w3ssErnZS57QhNeLjcj6zSB CJlU6G6JiOdQZhW993B95GyJYX2chw7IWrW4T1BL8gJQgmGzHmGULjn7A8xSPTxNWLspu 7Jnt9B8fF6R4RdLuN+Qli3MMARdpxQwKTRldu+zAGAShRtX+TWFVfV7Gpu8OWdQJU7ny3 Or1U9HdMQutFLcgMD/VUSP7IF+ADTPovxKDxTTEpMn5+hyp8LFotllpT7GCXK4cydCpQB oWwjOx1NQtEuV63GkaAIj1H1OSucQNly1chDaSIuMCdDQTU3Wk/KW9B2wAM/XmOMDaQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--penghuang.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b="nye/b96p"; arc=none smtp.remote-ip=74.125.82.69 Received: from mail-dl1-f69.google.com (mail-dl1-f69.google.com [74.125.82.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 9CF02606A322 for ; Wed, 2 Dec 2026 20:04:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9CF02606A322 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--penghuang.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=nye/b96p Received: by mail-dl1-f69.google.com with SMTP id a92af1059eb24-14373747468so13065228c88.1 for ; Wed, 02 Dec 2026 12:04:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796241877; x=1796846677; 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=AoGOJSQzkyikCQcPX2WlAIu3WzAqZ6ORKBLwlH63qyQ=; b=nye/b96ptRJJ79PKWrNgUiogXFg404yJ+vpuA9SdJ7VkqxLFb5cu+pxOdCsIIgndlY m2rj1ri+hzqGzSzADDURVQhYpJwhabRpMabBsNJndZ+ZaL1MYvxxoIw4aZXNzl49G0/i J7rNzxaiR4+4W/tXUuj1Yg24WLur0eIWR9d/bydpvKMMWC7p3fK60AecKe9cCLio3XbD PXrmHNsd6r2N0+/LHYT1Fp3fg1w4Yc2aKVtx4I0oFyJ01R9BqVq/t0jISAZgEr18arEU YtpuGprUBqS8C3KHpTEdN0vkf9U0eXn1G0cFq4GszxR0RZyBoP9x8RyXaI0GiUwZ9Zh6 Aeqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796241877; x=1796846677; 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=AoGOJSQzkyikCQcPX2WlAIu3WzAqZ6ORKBLwlH63qyQ=; b=uIpGUihBP7atS3P6K7g4iQR82mNkI27mm3KQpleim1Mu1T539k65hXW+xEexvjwP88 rmC3FWsAw5Qlw5NLsNsicQJnOLb/pwVvM7dg44qPpwzTL+R9ns2kHHK3BpNZDogNV1Nl Cht0pubFfRCT5uNp2wEev3AbUxElkH4WnKptnrFzlG2xw/tiAtRJzX1jVvXqIyBAWgJN 4WhMEQy6KPIw1oruMgs3a2SGNVV/N7rNupwWc91Ku4li27mXWrXb/doGx0bOZhHzEr8a KTkaJduqdABOF+yTspZ490VBEaffTYjmiWmKqK3E/xJlKpVC5GLJ4OSssUYTMDfhDC/v gr6g== X-Forwarded-Encrypted: i=1; AL+hErFA2gy/BmbF4I5YVwqqSA4tpoQQwFx7H6rDUHqH7yJq9oEdTaYI7MQx8pOmjwbCRbs4hy/XlouG45YJ+b0=@vger.kernel.org X-Gm-Message-State: APuU4Z9sTWohUXNO7CBL/DrCeBMwyNkWXRgiYt1mB9u+WrM8wCVhgndt jurvPy3wgsSpl4fh96flkokHf4dJ0uRmQvXY8ajJogjdnGXnx+2GG6UHoRqtRNhGLfHjOHOJ6IF GnnEg/c0mY16wSR1PHw== X-Received: from dyib9.prod.google.com ([2002:a05:7300:79c9:b0:386:b9bf:ecab]) (user=penghuang job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7301:6181:10b0:386:b2ac:1f17 with SMTP id 5a478bee46e88-386b2ac2832mr32150277eec.7.1796241876291; Wed, 02 Dec 2026 12:04:36 -0800 (PST) Date: Wed, 2 Dec 2026 12:04:35 -0800 In-Reply-To: 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: <20261201062738.1047159-1-penghuang@google.com> <20261201211018.41673-1-penghuang@google.com> <20261202174912.648822-1-penghuang@google.com> X-Mailer: git-send-email 2.56.1.915.g69d5ec7298-goog Message-ID: <20261202200435.1156855-1-penghuang@google.com> Subject: Re: [RFC PATCH v2 0/6] rwsem: priority boost for holders blocking high-priority waiters From: Peng Huang To: Kayra Cizmeci Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , Juri Lelli , Vincent Guittot , Waiman Long , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , John Stultz , Suren Baghdasaryan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Sebastian Andrzej Siewior , Clark Williams , linux-rt-devel@lists.linux.dev, Peng Huang Content-Type: text/plain; charset="UTF-8" On Wed, Dec 02, 2026 at 10:18:20PM +0300, Kayra Cizmeci wrote: > TB runs on TA's donation (weight) but TA doesn't pay anything > to make the donation. Normally on Proxy Exec, TA would pay the bill. > While here, TB does. TB is running early because TA wanted to run early, > and TA was waiting for it. If TA didn't waited TB there is no reason for > TB to run early. IMO, it doesn't makes sense that TA is the only one > demanding this, and TB is the one paying the bill. Fair point, that's the main accounting difference from PE. One way to look at it: in the kernel, rwsems protect shared metadata (mmap_lock, i_rwsem, etc.) rather than RPCs, so the work inside the critical section is almost always TB's own work (like a background MADV_COLD or /proc read), not work done for TA. For short holds (within a slice), TB runs its own critical section early and pays back the lag when rescale_entity() restores its weight, much like rt_mutex PI bills the holder. For longer holds, TB actually gets the higher share during the hold and only pays back up to its residual lag on unlock (bounded within its cgroup share under FAIR_GROUP_SCHED). So TB isn't really penalized unfairly; the real trade-off is the flip side, that TA doesn't pay anything for bumping TB ahead of other runnable tasks. If you have any ideas on how to account this back to TA (or bound it better) without hurting down_read()/up_read(), I'd love to hear them! Thanks, Peng