lkml.org 
[lkml]   [2022]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 1/4] vmstat: percpu: Rename HAVE_CMPXCHG_LOCAL to HAVE_CMPXCHG_PERCPU_BYTE
On Mon, 8 Aug 2022, guoren@kernel.org wrote:

> The name HAVE_CMPXCHG_LOCAL is confused with using cmpxchg_local, but
> vmstat needs this_cpu_cmpxchg_1. Rename would clarify the meaning, and
> maybe we could remove cmpxchg(64)_local API (Only drivers/iommu/intel
> used) in the future.

HAVE_CMPXCHG_LOCAL indicates that cmpxchg_local() is available.

The term LOCAL is important because that has traditionally signified an
operation that has an atomic nature that only works on the local core.

cmpxchg local is used in slub too in the form of this_cpu_cmpxchg_double.

But there is the other naming using this_cpu.....

Maybe rename to

HAVE_THIS_CPU_CMPXCHG ?

and clean up all the other mentions of "local" in the source too?

There is also a local.h header around somewhere

\
 
 \ /
  Last update: 2022-08-08 11:32    [W:0.063 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site