[lkml]   [2020]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH 3/7] microblaze: Define SMP safe bit operations
> On Thu, Feb 13, 2020 at 09:01:21AM +0000, Stefan Asserhall wrote:
> > The comment in the generic bitops.h says "You should recode these in
> > the native assembly language, if at all possible". I don't think using
> > the generic implementation will be as efficient as the current arch specific one.
> That is a very crusty old recommendation. Please look at the compiler generated
> code.
> We've extended the atomic_t operations the past few years and Will wrote the
> generic atomic bitops for Arm64, we're looking to convert more LL/SC archs to
> them.
> There is currently one known issue with it, but Will has a patch-set pending to
> solve that (IIRC that only matters if you have stack protector on).
> Also see this thread:
> And these patches:

Thanks for the links. Sure, I agree that it is better to use the generic
implementation if it is as efficient as the arch specific one, but I don't
think we should assume that it is.

Michal, would it be possible to replace the arch specific code and check
what we get?


 \ /
  Last update: 2020-02-13 10:25    [W:0.044 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site