From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B3862DE1F0 for ; Tue, 2 Dec 2025 04:50:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764651022; cv=none; b=TZ09cC9auWMT9H3aFOkcdSnBWCpw/VoiWkMoM8lZaZgyJ/tvxhm+JQebBDq1YA1xZ6/t7D2PUwPBCXdVJ3UmcyvGK3L9N+/ku1E9EM03CRXcgYD2ZTfYpwapEGgLHGoOKRSB9lIqR6IPdlsB0UAcnHVMNjOrJxVptpax+/lsGH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764651022; c=relaxed/simple; bh=06+SbVcmXnRv+G/0jyIFuvKPVL9uuBLBL2uMRreTYpI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IR3fg09r+b+LzPj5aqSPzHJ8VFmhK9E0I3CZ55SM6MSCfgrhluNBIw3vbQ6GVDYhhNocfy1rWzgA/egc8xdU+4mUs8J+sJM9VD8VUJmHV6Ty3SIyHBVcYQMDSGM0veXnQ+JG9TApAyGopmNSvGw0nx8znKpKL1hJDaBo6Gl2zvc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=gyNJkUBh; arc=none smtp.client-ip=209.85.210.180 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.b="gyNJkUBh" Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-7ba92341f83so7614821b3a.0 for ; Mon, 01 Dec 2025 20:50:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1764651021; x=1765255821; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=KEKCOyKjoe137jQNWfUHx3/pR3ZaljANse9Fk/PyXCw=; b=gyNJkUBh+m4osbMfyOh/tc+nRB4tiROQAdzdJIc0S+khQOhcU2JqDbQ151VA/S9zUw ALULupfizWm+TKrMSMULls3LS7Uin+fz3KI5nZ3EpyK9WLVclUkrMNzjoYYKF/pfaVNY nsgRmZmBdXR6UtMLARjocYyD28wfhw4gk26IM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764651021; x=1765255821; h=in-reply-to:content-disposition: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; bh=KEKCOyKjoe137jQNWfUHx3/pR3ZaljANse9Fk/PyXCw=; b=OqD8wf9tNUgbLPwtmJ+ZCVfQT1Lc97PwpDeKQtQekPSaMOCllQFsg5bjTIbHgoLMW+ e5sQvDjnsQYZWlcvHS+O1e1wSqq4lmWPh7DoWFoR6hkrC/HPdBOpYfJjcIvG8cOQRTn4 gpDRbUGu2tKDwhfR8hJY+OWrRsWNP4h7RapjB9G5NZy7R5c5X99pazeXYLZimqFnkVoi SlDv9KV9qGwKQq+oxEk4ewTxnQE7wL6q1oQs9oC1s2iz/VIhtFM0v8i2JusddplRUCSQ wO7GciB09AOXAghhVtpfG+ypmhRswEse59K2fTp/KQUZYnoaio72gXiEupZ/IXiCcqcP jVcg== X-Forwarded-Encrypted: i=1; AJvYcCWvD3yxUcgTmge60C6HU7eFuijCiojTLzwecF+v0vQJjPkofyhfVb04CEkB/VUOEF8JWad1bmhUmd4pFi4=@vger.kernel.org X-Gm-Message-State: AOJu0YwfIp6SeJxKmTw5rRGb/+SmH4niJ+zfiKT2mgaCisxxx0/PpW95 nxqGSHugV6FetNQniSGD7Ej0t87nyVpR2xmt74ApP+BWtwGdA06ytjC0ERtTqIV8rA== X-Gm-Gg: ASbGncu483DhycPzJzg5BZRRwXVYIuYibbMWHpC6O6fDDt5LlcALNLSaZZot+aAcjfO Dicm/i5klHtmROLPb91klashRmwfQ6nEXrDsvaUfYxwg5SM8M4TnZ/AJHSzvu5M42fFDx58ayMM KVAKxxGc/FMrXT7E3rfShZXI0kZ7fuAzfySMtivpdV2ypnMLLdoyKCkDIeTGfTHZo/QPpXhDftl QHCDKD/qABqP+PMzhX/9HWA7NBvhbaJSh2hSMzGEB6CE2m2QOXdgDhtTegUKMsRxvoz2kRk7JMG bQbxgtCkEb5/1+LBu4wgmEH5WG7xb+RaKq1KWuMXVLj2q2DxIviFFOQ3+Fty8vAR9IxkzAEirEQ eXSqoDnmO3ZXH1eTADyjvsc74bM3Iu4KLYuaGbKRciRuZxVS08VgZCEe7LFxHEgUKcteLneOYvn Nk/Y2DCkJlEDPMFTM/zT/X+7zHIPF5hhY7IT0O0kmwGo+1pVdiSAe7xjf462En X-Google-Smtp-Source: AGHT+IGsFQodw+YXckbos1NIqP9LJ6f+1jzfzYC/ApAffbk/gtY0LjdSioTEI0GnNCvmSv4kMvg+bA== X-Received: by 2002:a05:7022:5e06:b0:119:e56b:c754 with SMTP id a92af1059eb24-11cb683684amr13560394c88.25.1764651020483; Mon, 01 Dec 2025 20:50:20 -0800 (PST) Received: from localhost ([2a00:79e0:2e7c:8:fc9c:7662:7f07:b35c]) by smtp.gmail.com with UTF8SMTPSA id a92af1059eb24-11dcb03cc7dsm71279439c88.5.2025.12.01.20.50.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Dec 2025 20:50:19 -0800 (PST) Date: Mon, 1 Dec 2025 20:50:17 -0800 From: Brian Norris To: Guenter Roeck Cc: Linus Torvalds , Linux Kernel Mailing List , "Rafael J. Wysocki" Subject: Re: Linux 6.18 Message-ID: References: <93259f2b-7017-4096-a31b-cabbf6152e9b@roeck-us.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <93259f2b-7017-4096-a31b-cabbf6152e9b@roeck-us.net> On Mon, Dec 01, 2025 at 06:39:49PM -0800, Guenter Roeck wrote: > On Sun, Nov 30, 2025 at 03:59:17PM -0800, Linus Torvalds wrote: > ... > > Anyway, *today* the important kernel is the newly minted 6.18 release. > > Please do keep testing, > > > > Build results: > total: 158 pass: 158 fail: 0 > Qemu test results: > total: 610 pass: 610 fail: 0 > Unit test results: > pass: 666778 fail: 113 > > In terms of testing, that is worse that it sounds. I enabled > CONFIG_PM_RUNTIME_KUNIT_TEST last week, and it results in widespread > test failures. Picking one (from x86_64): > > [ 34.559694] # pm_runtime_error_test: EXPECTATION FAILED at drivers/base/power/runtime-test.c:177 > [ 34.559694] Expected 1 == pm_runtime_barrier(dev), but > [ 34.559694] pm_runtime_barrier(dev) == 0 (0x0) > [ 34.563604] # pm_runtime_error_test: pass:0 fail:1 skip:0 total:1 > > Looks like that fails pretty much on every architecture/platform where > it is enabled. Copying the author (Brian) for feedback. I wonder how you manage to be the one who hits all these problems, because none of the configurations and environments generated by ./tools/testing/kunit/kunit.py seem to hit it naturally. (I tested hundreds of cycles in various configurations with no failures previously, and I still didn't reproduce it today.) Do you make special effort to direct cosmic rays into your test setups while holding an unlucky charm? :) But since you pointed out the failure, I *can* induce the failure by forcing some scheduling delay. --- a/drivers/base/power/runtime-test.c +++ b/drivers/base/power/runtime-test.c @@ -3,6 +3,7 @@ * Copyright 2025 Google, Inc. */ +#include #include #include #include @@ -174,6 +175,7 @@ static void pm_runtime_error_test(struct kunit *test) KUNIT_EXPECT_TRUE(test, pm_runtime_suspended(dev)); KUNIT_EXPECT_EQ(test, 0, pm_runtime_get(dev)); + msleep(1000); KUNIT_EXPECT_EQ(test, 1, pm_runtime_barrier(dev)); /* resume was pending */ pm_runtime_put(dev); pm_runtime_suspend(dev); /* flush the put(), to suspend */ Looking closer at this part of the API, I think checking the return code of pm_runtime_barrier() is a bad idea, since it's inherently racy, and there's really no way to control that race. On the plus side, this test is the only one that does it. So I can probably just go ahead and make pm_runtime_barrier() a void function, and stop pretending it's part of the API surface. One fewer weird part of the runtime PM API to think about... Maybe I can get around to that tomorrow. Also CC Rafael while I'm at it. Thanks for reporting, Brian