[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y2e343np.ffs@nanos.tec.linutronix.de>
Date: Wed, 31 Mar 2021 19:46:34 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Mel Gorman <mgorman@...hsingularity.net>
Cc: Linux-MM <linux-mm@...ck.org>,
Linux-RT-Users <linux-rt-users@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Chuck Lever <chuck.lever@...cle.com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Matthew Wilcox <willy@...radead.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: Re: [PATCH 2/6] mm/page_alloc: Convert per-cpu list protection to local_lock
On Wed, Mar 31 2021 at 19:42, Thomas Gleixner wrote:
> On Wed, Mar 31 2021 at 12:01, Mel Gorman wrote:
>> On Wed, Mar 31, 2021 at 11:55:56AM +0200, Thomas Gleixner wrote:
>> @@ -887,13 +887,11 @@ void cpu_vm_stats_fold(int cpu)
>>
>> pzstats = per_cpu_ptr(zone->per_cpu_zonestats, cpu);
>>
>> - preempt_disable();
>> for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
>> if (pzstats->vm_stat_diff[i]) {
>> int v;
>>
>> - v = pzstats->vm_stat_diff[i];
>> - pzstats->vm_stat_diff[i] = 0;
>> + v = this_cpu_xchg(pzstats->vm_stat_diff[i], 0);
>
> Confused. pzstats is not a percpu pointer. zone->per_cpu_zonestats is.
>
> But @cpu is not necessarily the current CPU.
@cpu _is_ definitely NOT the current CPU as this is invoked from the
hotplug callback _after_ @cpu went dead. @cpu is dead and wont update
these things concurrently. So I'm even more confused :)
Thanks,
tglx
Powered by blists - more mailing lists