lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081124115134.GA17972@Krystal>
Date:	Mon, 24 Nov 2008 06:51:34 -0500
From:	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc:	ltt-dev@...ts.casi.polymtl.ca, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org,
	William Lee Irwin III <wli@...omorphy.com>
Subject: Re: [ltt-dev] [RFC PATCH] Poll : add poll_wait_set_exclusive
	(fixing thundering herd problem in LTTng)

* KOSAKI Motohiro (kosaki.motohiro@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ