Igor, On Thu, 1 Nov 2018, Igor Stoppa wrote: > On 01/11/2018 01:19, Andy Lutomirski wrote: > > > ISTM you don't need that atomic operation -- you could take a spinlock > > and then just add one directly to the variable. > > It was my intention to provide a 1:1 conversion of existing code, as it should > be easier to verify the correctness of the conversion, as long as there isn't > any significant degradation in performance. > > The rework could be done afterward. Please don't go there. The usual approach is to 1) Rework existing code in a way that the new functionality can be added with minimal effort afterwards and without creating API horrors. 2) Verify correctness of the rework 3) Add the new functionality That avoids creation of odd functionality and APIs in the first place, so they won't be used in other places and does not leave half cleaned up code around which will stick for a long time. Thanks, tglx