All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: ltt-dev@lists.casi.polymtl.ca, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	William Lee Irwin III <wli@holomorphy.com>
Subject: Re: [ltt-dev] [RFC PATCH] Poll : add poll_wait_set_exclusive (fixing thundering herd problem in LTTng)
Date: Mon, 24 Nov 2008 06:51:34 -0500	[thread overview]
Message-ID: <20081124115134.GA17972@Krystal> (raw)
In-Reply-To: <20081124203932.26BE.KOSAKI.MOTOHIRO@jp.fujitsu.com>

* KOSAKI Motohiro (kosaki.motohiro@jp.fujitsu.com) wrote:
> Hi
> 
> >  static struct poll_table_entry *poll_get_entry(poll_table *_p)
> >  {
> >  	struct poll_wqueues *p = container_of(_p, struct poll_wqueues, pt);
> > @@ -117,8 +135,10 @@ static struct poll_table_entry *poll_get
> >  }
> >  
> >  /* Add a new entry */
> > -static void __pollwait(struct file *filp, wait_queue_head_t *wait_address,
> > -				poll_table *p)
> > +static void __pollwait_common(struct file *filp,
> > +			      wait_queue_head_t *wait_address,
> > +			      poll_table *p,
> > +			      int exclusive)
> >  {
> >  	struct poll_table_entry *entry = poll_get_entry(p);
> >  	if (!entry)
> > @@ -127,7 +147,23 @@ static void __pollwait(struct file *filp
> >  	entry->filp = filp;
> >  	entry->wait_address = wait_address;
> >  	init_waitqueue_entry(&entry->wait, current);
> > -	add_wait_queue(wait_address, &entry->wait);
> > +	if (!exclusive)
> > +		add_wait_queue(wait_address, &entry->wait);
> > +	else
> > +		add_wait_queue_exclusive(wait_address, &entry->wait);
> > +}
> 
> 
> I fully agreed this feature is needed.
> Actually, I've made similar patch at one years ago.
> 
> http://marc.info/?l=linux-kernel&m=120257050719087&w=2
> 
> 
> but, I have one question.
> My version have epoll support, but yours donesn't have.
> Is it intensionally?
> 
> this is just dumb question, it doesn't mean any objection.

Hrm, actually, your patch seems cleaner than mine, but it adds a branch
in the standard hotpath, which mine does not do (but I am not sure it is
such an important optimization...). Is there any reason why your patch
did not get merged ?

The only reason I did not make a epoll version is simply because LTTng
currently does not support it. :)

Mathieu

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

  reply	other threads:[~2008-11-24 11:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 11:24 [RFC PATCH] Poll : add poll_wait_set_exclusive (fixing thundering herd problem in LTTng) Mathieu Desnoyers
2008-11-24 11:44 ` [ltt-dev] " KOSAKI Motohiro
2008-11-24 11:51   ` Mathieu Desnoyers [this message]
2008-11-24 12:11     ` KOSAKI Motohiro
2008-11-24 12:16       ` Mathieu Desnoyers
2008-11-25 10:50         ` [PATCH] Poll : introduce poll_wait_exclusive() new function KOSAKI Motohiro
2008-11-25 21:19           ` Davide Libenzi
2008-11-26  1:09             ` KOSAKI Motohiro
2008-11-26 11:15             ` [ltt-dev] " Mathieu Desnoyers
2008-11-26 11:20               ` Andrew McDermott
2008-11-26 22:27                 ` Mathieu Desnoyers
2008-11-27  0:08               ` Davide Libenzi
2008-11-27 12:50                 ` KOSAKI Motohiro
2008-11-28 13:13                 ` Mathieu Desnoyers
2008-12-02  1:27                   ` Davide Libenzi
2008-12-02  4:44                     ` KOSAKI Motohiro

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=20081124115134.GA17972@Krystal \
    --to=mathieu.desnoyers@polymtl.ca \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltt-dev@lists.casi.polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=wli@holomorphy.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.