Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1590511

Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier

From Radim Krčmář <rkrcmar@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier
Date 2017-03-01 18:00 +0100
Message-ID <tgfLz-5N5-5@gated-at.bofh.it> (permalink)
References <teuc1-4Ze-5@gated-at.bofh.it> <teuc2-4Ze-9@gated-at.bofh.it> <tfqpI-45z-29@gated-at.bofh.it> <tfqJ3-4cn-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2017-02-27 11:18+0100, David Hildenbrand:
> Am 27.02.2017 um 11:02 schrieb David Hildenbrand:
>> Am 24.02.2017 um 20:49 schrieb Radim Krčmář:
>>> The leading underscores denote that the call is just a bitop wrapper.
>> 
>> Actually, the leading underscore is misleading
>> 
>> If we want to match the semantics of set/test/clear_bit, using a leading
>> underscore might feel like using the non-atomic variants like
>> __clear_bit and friends.
>> 
>> I'd prefer to simply drop the underscore.
>> 
> 
> Okay, this is not really possible for __kvm_request_set(). Hm.....

Yeah, requests are always atomic, but have some extra cruft on top of
bit operations and underscores are similar in the sense of doing less
that the non-underscored version.  Also, the underscores were something
to make its use look undesirable in the code.

kvm_request_set and kvm_request_test_and_clear use a barrier and
kvm_request_test could be expected to do so as well.

I think that a barrier makes no sense in kvm_request_clear, but called
it with underscores for consistency with others and also because I think
that some callers of could use a second thought.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier Radim Krčmář <rkrcmar@redhat.com> - 2017-03-01 18:00 +0100

csiph-web