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

Re: [Xen-devel] [RFC 10/16] gic:vgic:gic-vgic: introduce non-atomic bitops

Hello Andre,

On 29.11.18 14:14, Andre Przywara wrote:
Nah, please don't do this.
Sorry for making you crying looking at this code.
It's terrible, I know. It's rather an idea.

Can you show that atomic bit ops are a
problem? They shouldn't be expensive unless contended, also pretty
lightweight on small systems (single cluster).
Yep, but still it is a call to a function of 10 operations instead of one `orr` for set_bit(). Taking in account a heavy usage of bitops in the old vgic code, this should benefit latency.

But if you really think this is useful, why not go with the Linux way
of using __set_bit to provide a non-atomic version?
This would have the big advantage that you can replace them on a
case-by-case base, which is much less risky than unconditionally
replacing every (even future!) usage in the whole file.
Whatever you prefer :)

Andrii Anisov.

Xen-devel mailing list



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