From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.174 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079592; b=YB8HCBmHvIK8c/LgxLgR6obarVMpTkmL6LKdhfs1Y7RD0Lj3hNC1mzlr6X5auQiDRiFC MJCf6ZA4vMkFaA1u2pHEofWFnL7qfRgf3kxp/ezRcWPnB1A8agDYaj+i9K+LkbC581bgF cMht77sDKePU64PlZbaVlvRfn4NOcBLO2AB5cD4wR05p+4YCiBERZmnomnAdf9h9YaCTQ jljqSoIZYan6XuulzaJ/wXMJIUEAFWZlf8oXNBXh+TW+AA4WfNIYoF2cjBOykXRb8MaU9 Y+Xp+XJqtA7EyA1MS6CUW44g+oNnoOp4gX2fiG4/7GSfkDEBtv9WiPPTEznCSLBi+GA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796079592; 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=N96rrnw7t7Oxp9rq48Up9XD188RYEI5rvjkYqINqxBk=; b=b/zB1Fr0j70GS0r5fm/fv18zKIjupWzM+UAMJa6b9U6d6G763suiM6RkmZHMLs+UDUCJ 4Eyq0ZWuzQy+kYYZX47BgQlFpLuvCZg2CRNslP9VLPJLXnkmlpRR9LKieDipggEt40mDj 7csh6eNeuPldGyzvBzI0e/QVudnWbV2L7lnr41eP+mSiQPKR29ZHC78LlTMl16cIx9NNf PjNKpU9GDkd+cqE30rW8UDKcZWH3kNNq3Yd9wwopJhDstmpXhYM49dpLnGkXnn2/X+WY/ XvRT3ml5RBm5HY7v4Eq7ZukVLSCO4AD5cws9BxDqDiDxLIA+5z81tLAYoabLHzSqfHQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b="e/886MTp"; arc=none smtp.remote-ip=74.125.82.174 Received: from mail-dy1-f174.google.com (mail-dy1-f174.google.com [74.125.82.174]) (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 B26CC606A325 for ; Mon, 30 Nov 2026 22:59:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B26CC606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=e/886MTp Received: by mail-dy1-f174.google.com with SMTP id 5a478bee46e88-386bd881d39so4335604eec.1 for ; Mon, 30 Nov 2026 14:59:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1796079591; x=1796684391; 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=N96rrnw7t7Oxp9rq48Up9XD188RYEI5rvjkYqINqxBk=; b=e/886MTpr2MwOLleVi/I7EROKWH0qX2ApuDBvMSCSpiBw9V/krzeo0kmM9qpy6xCMz bLZRFEwonTCYKSHVSJoemP1WN2GCs6WZx2lBbDD4k7PYcSkIMp77kfK4fkx37DqFEvcC Eurw+pWF7sDBWOf1pPi4R6ejZWt/jpU3a69jI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796079591; x=1796684391; 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=N96rrnw7t7Oxp9rq48Up9XD188RYEI5rvjkYqINqxBk=; b=iSZLB5e+EUXa/txg2Zu9JgJp3X34RyabxQmsOc5iCLRswhok6vE8GA4OXjxiSYi9oq JKsY050mpmV1r4qLEku12P3EC1so2vEAeTMY3MmXd4T5Y5QQ5w5yqBvq6pAT4rW46dHE Ur5+hkTNH7X/4OuJhU0+tqa2qRuNFJ8Pl7zeR31zG9+3AfO7ecoZ+thUcS8BRhcFzhfF G2hY5EUeCTP7cG+W2PnkrBVyA8vY9MQ1w7nHGTEw88IyZ7zxA93vGOkgq1uPakFy+Ioz oLiw+oC7OGipDuJqDD4agbUVVDd2s5URbPn5UVgoP7GWwg6QkUjY1OHa5K+NxMsEI28K Bh2A== X-Forwarded-Encrypted: i=1; AL+hErEIIOOX36Y/OXexqWSMlWmuiZbLPUggrkhSAPc+Ag3MQXkJcTaaQvAfGa7CtVcgWSX/mw5YUGb5/clzcg==@lists.linux.dev X-Gm-Message-State: APuU4Z/cCp1bRUcNUiOE1UYBU4COJQAiR1uwRFedJh+Z6+apw6EpiKwF e4s48uvQRZGIRoGFFo80cfZx+Afd5CERSMuPHUJKt1HmLB44vN4rhesMxuQmcM5dtQ== X-Gm-Gg: AZFdTZfI6muwQkAOJnAFVj62fqV7rNn6/bb++DsQe46fejWcFaPC6AFU2NQG2V/UXo7 +ObrLx5qJ1iGgGeHiX+Y85jS/j9cG9sBy3ExNzkabX+Dsq1wlDoSoVvcpN+Dz3lBWijL8Bpa5bN igdkxPGRbJTbN420pT0X6sA2e0adZf5AFqdxiujSPp8BekkkFTiE10tM2EYFblJtclI571x830T 90mV6ZQXXbI4WOQCgpln9i6ZsrktcJj6ekUbPYUA2Xoe7fGJO+mutuOORfavY9Yke6M/FzIPxwM cZtZLKQI8ZnJ0NgUl/vZLlrRsiZOEuBhBH5nOym6CcG8DnUb6cFcoSrZFY+cUgt9w1clL9/qpcN HPEo2sEE6PgZuPwy8UB2tSNFkS6d2AJ5vRtm4fKjAop8WzqfP+M5Ltb0b0xydRLKwVkeK9jPiuM h1H3FxdQ09bS1Rg5MzRlMJaXVNlU8Xj65OByrrOvgT3Zld4sxtTLnay6ZYFjDTpxYkk66qFSYjf 9KeC37YBD52ec4QtkJFhzB2UBV3XJF1R3CqjvwLqhNmMvXB2ptrNQGoviQn02EITR87WM20D6Y1 wvmaAlNPmHWlJgLwP4gMd2e2Rucc+G9skdN3bZwHX4rb1kYobElOE4fkPxS84JX042il X-Received: by 2002:a05:7301:550e:b0:386:e952:3455 with SMTP id 5a478bee46e88-386e952358cmr13278018eec.34.1796079590823; Mon, 30 Nov 2026 14:59:50 -0800 (PST) Received: from localhost ([2a00:79e0:2e7c:8:d64c:d468:46b8:64da]) by smtp.gmail.com with UTF8SMTPSA id 5a478bee46e88-386f6651e2asm29146147eec.27.2026.11.30.14.59.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 14:59:50 -0800 (PST) Date: Mon, 30 Nov 2026 14:59:48 -0800 From: Brian Norris To: "Rafael J. Wysocki" Cc: Linux PM , Alan Stern , Sakari Ailus , Ulf Hansson , Linux Driver Core Development Subject: Re: [PATCH v2 2/4] PM: runtime: Avoid suspends without respecting autosuspend delay Message-ID: References: <4779892.LvFx2qVVIh@rafael.j.wysocki> <3450859.44csPzL39Z@rafael.j.wysocki> X-Mailing-List: driver-core@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=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Nov 30, 2026 at 02:38:23PM -0800, Brian Norris wrote: > On Tue, Nov 24, 2026 at 04:35:08PM +0100, Rafael J. Wysocki wrote: > > @@ -333,6 +336,16 @@ void pm_runtime_release_supplier(struct device_link *link) > > { > > struct device *supplier = link->supplier; > > > > + /* > > + * Since rpm_suspend() may run as a whole right after the loop below, > > + * prevent it from suspending the supplier without respecting its > > + * autosuspend delay. The last_busy update cannot be reordered with > > + * the usage counter update in pm_runtime_put_noidle(), which is fully > > + * ordered and pairs with the read memory barrier in > > + * pm_runtime_autosuspend_expiration(). > > + */ > > + pm_runtime_mark_last_busy(supplier); [...] > Perhaps this this last_busy update should go inside the 'if'? Or > otherwise refactor this function to be less subtle. Sorry, there's no 'if' in pm_runtime_release_supplier() -- it's a 'while' loop. We could move it into the 'while', although that'd probably induce redundant mark_last_busy updates. So perhaps the "otherwise refactor" option would be more attractive? Brian P.S. My redundant "this this" is a bit ironic :)