linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Changli Gao <xiaosuo@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Davide Libenzi <davidel@xmailserver.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Roland Dreier <rolandd@cisco.com>,
	Stefan Richter <stefanr@s5r6.in-berlin.de>,
	Ingo Molnar <mingo@elte.hu>, Takashi Iwai <tiwai@suse.de>,
	David Howells <dhowells@redhat.com>,
	linux-fsdevel@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] epoll: use wrapper functions
Date: Fri, 7 May 2010 10:48:05 +0800	[thread overview]
Message-ID: <o2l412e6f7f1005061948u1ca0fe54of0b453846c678c85@mail.gmail.com> (raw)
In-Reply-To: <1273171863.1642.258.camel@laptop>

On Fri, May 7, 2010 at 2:51 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Thu, 2010-05-06 at 11:47 -0700, Davide Libenzi wrote:
>> Since we already have __add_wait_queue(), __add_wait_queue_tail() and
>> __remove_wait_queue() (which all means "locked"), and while I agree in
>> having the exclusive-add wrapped into a function, I much better prefer a:
>>
>> static inline void __add_wait_queue_excl(wait_queue_head_t *head,
>>                                          wait_queue_t *new)
>> {
>>         new->flags |= WQ_FLAG_EXCLUSIVE;
>>         __add_wait_queue(head, new);
>> }
>>
>> The patch you posted introduces a different naming, which leaves all the
>> other __*() untouched, and wraps the already one-liner __remove_wait_queue()
>> with yet another one-liner.
>
> I concur, I always get confused by the _locked postfix (and its more
> typing). Also, it goes against the lock data not code paradigm.
>
>

I greped all the code, and found that
add_wait_queue_head_exclusive_locked() and remove_wait_queue_locked()
aren't used. It seems that no users like these APIs. So I will remove
these two APIs, and add __add_wait_queue_excl() instead. Thanks.


-- 
Regards,
Changli Gao(xiaosuo@gmail.com)

      reply	other threads:[~2010-05-07  2:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-06  1:57 [PATCH] epoll: use wrapper functions Changli Gao
2010-05-06 18:47 ` Davide Libenzi
2010-05-06 18:51   ` Peter Zijlstra
2010-05-07  2:48     ` Changli Gao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=o2l412e6f7f1005061948u1ca0fe54of0b453846c678c85@mail.gmail.com \
    --to=xiaosuo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --cc=dhowells@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rolandd@cisco.com \
    --cc=stefanr@s5r6.in-berlin.de \
    --cc=tiwai@suse.de \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).