From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.42 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796079592; b=LNjWSqHQHHTq+cwgSLiCKWKRKxNX6GY7rrQpiAICegLDG9fvMY+L53Lj9/PqWRvY3sba nZ30/s88sOKwBLK2jX8JEW0HzA/JCPnboaWR1ukDspuRxmcjfsHtuimya5qFDqOTWVTa+ J2j2j7Rn1ffHbAE8BB8a1f48Yp5SxgymgHmMPGT7Uo8UrYLB4s6mwJ2ChBn1qLL2kqAVK 6UxceiKCp1gVMGtVXTN+ryLBaPu14tkwLBUSuit2rmAYhVW9sGJt4Z2ha2TcGUA8LD/13 OcHj1p9zIuhaFLBoQi0Dw+fD33pqZWX0RUMHBdXHMW9VNGvaWlMcKugfAMajeivTE4A== 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-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=5gwysrQK52nv41Snbc3pAVEB1zpJY6VfoGWnqP6ICv5yAtr1IcZTALnIMeTeeXXwWimz luMq5cRWW2m5U1FQRfXDTcy37eSgTjl9UHcJvWWGMLdlaUHZ623WKLncmyzhgdLjErvhU taAGkjmJVc0/MPLykFwJEFwBoCDdG95ZLEHGkC2US9IVKdt62pDf1ma1/bWce2Ac3hi2F gXyvqhSycFYrjlqugQ2FyvqDQW1q4HSUrqvrXnBe36APt8iD3b9D3deCo56EPPpBfstMx 1BMYIZsrXxzvCJaFO26L32S2NHB99tqBqN9Lst1zAooH0t2coCby6BpJx4kRM2IAlog== 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="cDe90/fv"; arc=none smtp.remote-ip=74.125.82.42 Received: from mail-dl1-f42.google.com (mail-dl1-f42.google.com [74.125.82.42]) (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 B9C6D606A327 for ; Mon, 30 Nov 2026 22:59:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B9C6D606A327 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) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=cDe90/fv Received: by mail-dl1-f42.google.com with SMTP id a92af1059eb24-170135e43c7so3602246c88.0 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=vger.kernel.org; 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=cDe90/fvOTQVmDRUedY5UzWYnKOzV0W7TWBt9GagqGudTdz/8fEIoFGjY3Z7H46uO1 1lhiJTk68gz3cLv0XLMfrrU78Tbhzzi9pANqWF9waL1eBwM0+1jW4dfWQVv9D0THYG+u L3s+5eRhxqunp3koNRO8mGX62tD4Ng5MDokZQ= 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=T+/jTJPeSUA/t7dHzuUBL6s+D784C75lKzOf6x18NQVhQeaBCwFkz1Ou2URqyBs8Dr /LLBy0kO18UIFDEpi+1hYP2jAavrhDk4n4VYqiWWUHZSOu5JLujhmpzpvJ8CLEjfw9DP XRVljloMf0VrMr8uym3tpNqYX2Q7Iasd6hV4N4lk5pcp4FX4ZUX2PWTKHkEfG0erEmhE 4/3Em9kGns8qyWjfE+UK5TqDpQQflb8sCNSwehd8ZEceinPZ22XBjp/b6BoLv/KVBlJM nisNc8WSmHogxbvyE69vwtZ3YaArti4LgcDTBRxf7BBrI3wsuiZTDmcF4uSSwN3kyYRY aXJg== X-Gm-Message-State: APuU4Z8yL2SWo5xXO5dLXcOjgG3YAARLHzg0EX/Hss4wrGWjyHbLSlpt ME6fhVSvX0SuotP5byU6vNh0MWYEj93aO4WZpuzGDCUH5UJIuoM4r5V69AabGSIAvQ== X-Gm-Gg: AZFdTZfNcrPcSKUPiIhsLrM4XP6MJ5E28TXvhFe4QaZLQit0QZLEr/eW1h0gTDsg69B uU62+xZE2a3U6ZM0ziSQjz7NjexZsmMPGbVoZ9DyJnACWysRqBwBaZLpX1rlQbk/V2d3HDWrrSh LhS+IaRLqzQwnbwcbnuh98xjY0OJ43o2F6FceGP5YC+JLg3AcUAgZmI+YNkfbbKfl2W3ckyuCdu 8AqGEcAet35VT7QliuOMPuuXK65O3de7PSFy+2q5DAglcqzyE0BcNl5BZR+iQgne0Bpn8zz8EBq gknOi11XpET00BmRPyYftXEYcFOk7QTTh3cAADvTUaRsqBJcltotUUF7W8J13UaG1KJibCzceNq o25bUDAk/2aHVa45VaIrw24Dmf/ETNZdDWXyfPurkZr9ZORmHTT2yWO4KfZA1zH1xKvDAU+0O45 f8PgFZITTufUgY/mqm4dWsLQ+4kUR9teqtBoqhdgksNAZWMDDbEdo4WYaUASZS+xcxMP1UXsNUx Q+uAiTRxFMmyxTbSbJPnFizxUcEc6E4cB3rMMzlJCcDr/BwuZpr0WXs0suj9IFP2zpZ4vBQD10b hZinCR8qf9EWtj8Iqd1TCKvgzpA6KRJKiL5QE1DVnBeDxOhwIs77yN7HAYObn6NNKTit 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: linux-pm@vger.kernel.org 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 :)