lkml.org 
[lkml]   [2012]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] bitops: add _local bitops
On Wed, 9 May 2012 16:45:29 +0300
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> kvm needs to update some hypervisor variables atomically
> in a sense that the operation can't be interrupted
> in the middle. However the hypervisor always runs
> on the same CPU so it does not need any memory
> barrier or lock prefix.

Well. It adds more complexity, makes the kernel harder to understand
and maintain and introduces more opportunities for developers to add
bugs. So from that point of view, the best way of handling this patch
is to delete it.

Presumably the patch offers some benefit to offest all those costs.
But you didn't tell us what that benefit is, so we cannot make
a decision.

IOW: numbers, please. Convincing ones, for realistic test cases.


Secondly: can KVM just use __set_bit() and friends? I suspect those
interfaces happen to meet your requirements. At least on architectures
you care about.



\
 
 \ /
  Last update: 2012-05-09 21:41    [W:0.203 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site