mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wysocki, Rafael J" <rafael.j.wysocki@intel.com>
To: Brian Norris <briannorris@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Guenter Roeck <linux@roeck-us.net>
Subject: Re: Linux 6.18
Date: Tue, 2 Dec 2025 15:37:58 +0100	[thread overview]
Message-ID: <fb19346c-908a-47e1-ad45-bc44f0a10f7c@intel.com> (raw)
In-Reply-To: <aS5wCcwpgkS9n67u@google.com>

On 12/2/2025 5:50 AM, Brian Norris wrote:
> 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 <linux/delay.h>
>   #include <linux/cleanup.h>
>   #include <linux/pm_runtime.h>
>   #include <kunit/device.h>
> @@ -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...

Yes, pm_runtime_barrier() should be void, the return value is a leftover 
thing.


> Maybe I can get around to that tomorrow.

I can do it unless you specifically want to take care of it yourself.


  parent reply	other threads:[~2025-12-02 14:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-30 23:59 Linus Torvalds
2025-12-02  2:39 ` Guenter Roeck
2025-12-02  4:50   ` Brian Norris
2025-12-02  6:01     ` Guenter Roeck
2025-12-02 20:38       ` Brian Norris
2025-12-02 14:37     ` Wysocki, Rafael J [this message]
2025-12-02 19:36       ` Brian Norris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb19346c-908a-47e1-ad45-bc44f0a10f7c@intel.com \
    --to=rafael.j.wysocki@intel.com \
    --cc=briannorris@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=rafael@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®