[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/bitops: Introduce variable/constant pairs for __{set, clear, change}_bit()



On Thu, 2018-01-11 at 16:34 +0000, Andrew Cooper wrote:
> Just as with test_bit, the non-atomic set/clear/change helpers can be
> better
> optimised by the compiler in the case that the nr parameter is
> constant, and
> it often is.
> 
> This results in a general replacement of `mov $imm, %reg; bt* %reg,
> mem` with
> the more simple `op $imm, mem`, reducing register pressure.
> 
> The net diffstat is:
>   add/remove: 0/1 grow/shrink: 5/17 up/down: 90/-301 (-211)
> 
> As a piece of minor cleanup, drop unnecessary brackets in the
> test_bit()
> macro, and fix the indentation.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>
FWIW,

Reviewed-by: Dario Faggioli <dfaggioli@xxxxxxxx>

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Software Engineer @ SUSE https://www.suse.com/

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.