[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <83d0426d-92ea-4e2b-83bc-62998218b212@redhat.com>
Date: Tue, 3 Feb 2026 23:47:00 -0500
From: Waiman Long <llong@...hat.com>
To: Chen Ridong <chenridong@...weicloud.com>, Tejun Heo <tj@...nel.org>,
Johannes Weiner <hannes@...xchg.org>, Michal Koutný
<mkoutny@...e.com>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>,
Anna-Maria Behnsen <anna-maria@...utronix.de>,
Frederic Weisbecker <frederic@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, Shuah Khan <shuah@...nel.org>
Cc: cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH/for-next v3 3/3] cgroup/cpuset: Call housekeeping_update()
without holding cpus_read_lock
On 2/3/26 9:51 PM, Chen Ridong wrote:
>
> On 2026/2/3 4:11, Waiman Long wrote:
>> --- a/kernel/time/timer_migration.c
>> +++ b/kernel/time/timer_migration.c
>> @@ -1559,8 +1559,6 @@ int tmigr_isolated_exclude_cpumask(struct cpumask *exclude_cpumask)
>> cpumask_var_t cpumask __free(free_cpumask_var) = CPUMASK_VAR_NULL;
>> int cpu;
>>
>> - lockdep_assert_cpus_held();
>> -
>> if (!works)
>> return -ENOMEM;
>> if (!alloc_cpumask_var(&cpumask, GFP_KERNEL))
>> @@ -1570,6 +1568,7 @@ int tmigr_isolated_exclude_cpumask(struct cpumask *exclude_cpumask)
>> * First set previously isolated CPUs as available (unisolate).
>> * This cpumask contains only CPUs that switched to available now.
>> */
>> + guard(cpus_read_lock)();
>> cpumask_andnot(cpumask, cpu_online_mask, exclude_cpumask);
>> cpumask_andnot(cpumask, cpumask, tmigr_available_cpumask);
>>
> It may lead to lockdep issue.
>
> tmigr_init_isolation
> guard(cpus_read_lock)()
> tmigr_isolated_exclude_cpumask(cpumask)
> guard(cpus_read_lock)()
>
Good catch. I haven't set up "isolcpus" in my test environment. That is
why this lockdep splat didn't get triggered. I will fix that in the next
version.
Cheers,
Longman
Powered by blists - more mailing lists