From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796239106; b=Y2gh2CCqj2skb+NP88CUQ5y9yGFM6qakn/r2QEuS1GXu19HlnpukG2uGlxrwRhOZ2YeC NFf+c0mru+8lFAzcpadNZL9EINP0kNyM8tMGpx9Tys74BBJ2SQn8NYttagmrgi4ZkTebM WvS42LpMhGTYFgLtO2D5CAVo3bUpfRqFCCtzX+WgL+29X2fplEkXOYUX6QMVAMBdIL0wf xvTBv7+1FzoRpeQyteRx7A7A9zNikJFF6KfeOJ8nIISaO9n6BQh3bA4WLYFjb2Sh9/oRC Ie01l8qj6URhnQAQ8yQmL2AXmUOxKne50J+gJSrxnyBjDgZTdj8NwYVO9gwNwTpRTpQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796239106; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=32N8w1MJvQTGhte5hOJQCDoXrM4LHZ6nMXbtaCa1U6U=; b=J0riQ9IJqBVeUvSd/9gyxqtX3+Sg8Dw4RD/QJ0wxBTnEac/cH1fxumKnfU3pARFcrV3p UmUKabpugaMZgldUcbJh3KD3Mvea7rFPxTej1bVbMu9okT6h4b2hFa/qAJbxpkqSE1xjH l6VAejTj86Tm/aTzCbpa8aLdS6td0Eva+vL6Vd9y7nbQI4bc4KTpinA8YDLR7XrvjYcXZ BG+J4fg3NQaP+Orvz02L0SceFhsKzD+bl8pIc2L9YkEGseD5XHVMeKA5lRXkPbdlYQepl voCiolqzdCIHWPqKNjVVIrtPV+ahnIccpDsYjSou9Y9RV2zEPlBfRdtDsRsPi7CIFVw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=JacZwoHw; arc=none smtp.remote-ip=209.85.128.41 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 3B1C1606A322 for ; Wed, 2 Dec 2026 19:18:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3B1C1606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=JacZwoHw Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-4bb76bb36c7so11346495e9.3 for ; Wed, 02 Dec 2026 11:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796239105; x=1796843905; darn=lists.linux.dev; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=32N8w1MJvQTGhte5hOJQCDoXrM4LHZ6nMXbtaCa1U6U=; b=JacZwoHwYkdkvMmwqK8GHhlLcZqt64/dIbgQh1OFl4T8Sk8PLOJ6dAMYgyIQ9qVTbj UIJNZJOkJj+h+WNBxWc3qSfqOvqeKaoO3Q22gXCDBZ0tf+oa/h2Qil35TcHu9jpxKxWa RZwHQ/TYsV9zuJAKJaBknWSEiHnqy2jEgGBvr+lnJu8JRXkoKyQGkdPG4RCGwZ7pV6Ac UaD/T4CDbR5DFoXdee0S8Z/5cjkRjmqBxBpPcBagkZkqV8WwsBlFZvl7vl0hqD1ndhUB VjyF23yrDBdnc0nyd1ohrw0bFv5gb6iMaGBC6o7dlDkpuoEpvdK2//GOVhGQDaCzJ2HA leaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796239105; x=1796843905; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=32N8w1MJvQTGhte5hOJQCDoXrM4LHZ6nMXbtaCa1U6U=; b=Y5xZk65e6OwkY/j68KNyC1wIlMq4IBgcW4Rp6QdirLwr1thycFsGpPz0egi15vgqVH +rpmwmG8H5Rv/WBkX6GsNsP6cIfrKeYbBH9vN/6PfSxlXMfqCSBKjq0/UNAsK/xuY18A 92cd+lhARz5UUg3+TpU1N6fhKboUE3BwmiTQtNQ6TO4wS9ikxtitkw4tLHqdBF5/DsdT ZBiG57y8OXGGEh4QBf/Gdbf0MZF8QUQXNkl+HlfbkiTK5ZR2X7MlnlisbwbDHie9qQZC HYTH4MUdPd8PkXeSDtTsKzFn8kEUrUiM3/O7fq2FUmzCOcw96d+OscTMc4B7IoamVQmY 9hag== X-Forwarded-Encrypted: i=1; AL+hErF3FZGUjKlTcsImmNsuJfY0SLusHBmo40/YT+dWAcGUXCyefKu2gGVyCm1Y9RdlbLL8By8tiEWn39MlKOo8YQ==@lists.linux.dev X-Gm-Message-State: APuU4Z+xt1tnR7UUjRZIa3KKWAbBur+Ll8njuGrqFPjXF/PXc4b4wdm7 KEQWFziLHiUTys0+5gq5Lw2BHbGL/Rh5ou5vPqbcZliEQC0gpC85/zZo X-Gm-Gg: AZFdTZdZLdzUqotabfaQKcs7AQXEyHuWKyMkqhVBRZikI724c0p0jO0T2M69iGnV6Dh WMxPVZDVOepiivRWF9aL7TxmDv3JHqsKXTjWF0WVm3B44shSECC7cB2P1wpooBTCdWVqbjdvJEC 79JY3an0d95c/VEalfXX04NqCuJHhGhagAW2n1fT5/aDsYkiLHeTqTlksJt9q5muv80O9XKQFKZ gOyQSsx0ijhGA5OrFsz9DADUeTMU6fhW0ueTdLX1eMxvlHp7iqQDrAkTIER6aSP4UCg35in+wAi tpLYo4kU8CvqyOjOieqP2J+16Igk/D2fbx4qNZ78rwo95WOW2tmmL0oxoFWlQ5/CpmIVQsbwOXU 0fWFsPVHBOTuBCU+EMVYrdFVwvdKjBOfDKndl6WBbNnwY34d9YGvQ9hbf+k3BrxQK7xhB1ytes3 0tswTs1+GWtrNlcId2moCGrRVIfaa9t9ySV07aABb6jXyTiVzWNn8imLuUl2PWCaQAO2wucg+bt ARsfUJVtmI6wrqX4YpvYEP5l/VxFxovSAvVMxCpF6cXxTex/ACTW4ImN24yZ0lggWJpXBz0/ZJJ JLOw1vAM9bVBZSGgQ2LNKK2SQY9SmIzJIZGEflOcvZi4EVW/aEbqu6tT X-Received: by 2002:a05:600d:7:b0:4bb:a9f6:8bbe with SMTP id 5b1f17b1804b1-4bbe0d4a495mr248855e9.0.1796239104492; Wed, 02 Dec 2026 11:18:24 -0800 (PST) Received: from scheduler.schedules ([85.100.65.216]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbe0055020sm15249685e9.4.2026.12.02.11.18.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 11:18:24 -0800 (PST) Date: Wed, 2 Dec 2026 22:18:20 +0300 From: Kayra Cizmeci To: Peng Huang 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 Subject: Re: [RFC PATCH v2 0/6] rwsem: priority boost for holders blocking high-priority waiters Message-ID: References: <20261201062738.1047159-1-penghuang@google.com> <20261201211018.41673-1-penghuang@google.com> <20261202174912.648822-1-penghuang@google.com> X-Mailing-List: linux-rt-devel@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20261202174912.648822-1-penghuang@google.com> On Wed, Dec 02, 2026 at 09:49:12AM -0800, Peng Huang wrote: > On Wed, Dec 02, 2026 at 07:39:16PM +0300, Kayra Cizmeci wrote: > > Can't we select one of the readers as the owner? > > I thought about that too, and ran into two things: > > With a single reader slot, overlapping readers slip through: if reader A > takes the slot and reader B enters while it's taken, once A unlocks B is > still blocking the writer with no owner recorded. We'd also need extra > sync in up_read() so the owner task can't exit under PE. > > Keeping a full reader list on the rwsem lets us hand off to the next > reader, but puts lock/list contention on every down_read()/up_read(). > > Happy to hear if you have a cleaner way around that! Nah, I don't. But then I'm not so optimistic about all this... :-(. Look here: TA waits on the lock that TB holds. TB has a weight of 1, while TA has a weight of 99. Now TA wants to run early, so it needs to donate some of its time to TB so that TB finishes its job earlier and TA runs earlier. But you just raise TB's weight to TA's. So now there is a problem, no?: 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. Thanks, Kayra