[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180524220610.GA7607@andrea>
Date: Fri, 25 May 2018 00:06:10 +0200
From: Andrea Parri <andrea.parri@...rulasolutions.com>
To: Mark Rutland <mark.rutland@....com>
Cc: Will Deacon <will.deacon@....com>,
Peter Zijlstra <peterz@...radead.org>,
linux-kernel@...r.kernel.org, mingo@...nel.org,
linux-arm-kernel@...ts.infradead.org, yamada.masahiro@...ionext.com
Subject: Re: [PATCH 6/9] asm-generic/bitops/atomic.h: Rewrite using
atomic_fetch_*
Hi Mark,
> As an aside, If I complete the autogeneration stuff, it'll be possible
> to generate those. I split out the necessary barriers in [1], but I
> still have a lot of other preparatory cleanup to do.
I do grasp the rationale behind that naming:
__atomic_mb_{before,after}_{acquire,release,fence}()
and yet I remain puzzled by it:
For example, can you imagine (using):
__atomic_mb_before_acquire() ?
(as your __atomic_mb_after_acquire() is whispering me "acquire-fences"...)
Another example:
the "atomic" in that "smp_mb__{before,after}_atomic" is so "suggestive"!
(think at x86...), but it's not explicit in the proposed names.
I don't have other names to suggest at the moment... ;/ (aka just saying)
Andrea
>
> IIUC, the void-returning atomic ops are relaxed, so trying to unify that
> with the usual rule that no suffix means fence will slow things down
> unless we want to do a treewide substitition to fixup for that.
>
> Thanks,
> Mark.
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?h=atomics/api-unification&id=c6b9ff2627d06776e427a7f1a7f83caeff3db536
Powered by blists - more mailing lists