From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH RFC 1/5] KVM: introduce a set_bit function for bitmaps in user space Date: Mon, 12 Apr 2010 12:12:49 +0300 Message-ID: <4BC2E411.3060601@redhat.com> References: <20100409182732.857de4db.yoshikawa.takuya@oss.ntt.co.jp> <20100409183021.843ca432.yoshikawa.takuya@oss.ntt.co.jp> <4BC2020B.5030402@redhat.com> <4BC27787.4020701@oss.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org, fernando@oss.ntt.co.jp To: Takuya Yoshikawa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48363 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752548Ab0DLJM4 (ORCPT ); Mon, 12 Apr 2010 05:12:56 -0400 In-Reply-To: <4BC27787.4020701@oss.ntt.co.jp> Sender: kvm-owner@vger.kernel.org List-ID: On 04/12/2010 04:29 AM, Takuya Yoshikawa wrote: >> Should be called __set_bit_user() since it is non-atomic. > > > Actually I first named it like that and then noticed that in the uaccess' > convention, __ prefix means it is "with less checking" version. On the other hand, for the bitops family, __ means nonatomic. > > I don't know which is better in this case, should be > "set_bit_user_non_atomic" > though bit long? May be judged by x86 people. And there's _inatomic which means no sleeping... it's good to have a long name since it avoids confusion, especially in a newly introduced function. So I like your last suggestion. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.