On Wed, 5 Sep 2012 12:26:49 +0300 "Michael S. Tsirkin" <mst@xxxxxxxxxx> wrote: > It's not guaranteed if another thread can modify the bitmap. > Is this the case here? If yes we need at least ACCESS_ONCE. In this patch, using the wrapper function to read out a register value forces compilers not to do bad things. But I agree that it is not a good API. I would like to use fls() rather than ACCESS_ONCE if it's really needed. > > Anyway, I'm now thinking that we do not care about such > > things here, and can just follow your advice, yes? > > Unless you see an issue with it ... Although I read the code, I'm not sure. But this code is apparently not so critical for performance that we can simply use fls(). If I can remove likely() and use proper macros, that's enough for me. Thanks, Takuya -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html