[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1286397096.6661.2.camel@gandalf.stny.rr.com>
Date: Wed, 06 Oct 2010 16:31:36 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Frederic Weisbecker <fweisbec@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Christoph Hellwig <hch@....de>, Li Zefan <lizf@...fujitsu.com>,
Lai Jiangshan <laijs@...fujitsu.com>,
Johannes Berg <johannes.berg@...el.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Tom Zanussi <tzanussi@...il.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Andi Kleen <andi@...stfloor.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [RFC PATCH] poll(): add poll_wait_set_exclusive()
On Wed, 2010-10-06 at 15:04 -0400, Mathieu Desnoyers wrote:
> For reference, here is the use-case: The user-space daemon runs typically one
> thread per cpu, each with a handle on many file descriptors. Each thread waits
> for data to be available using poll(). In order to follow the poll semantic,
> when data becomes available on a file descriptor, the kernel wakes up all
> threads at once, but in my case only one of them will successfully consume the
> data (all other thread's splice or read will fail with -ENODATA). With many
> threads, these useless wakeups add an unwanted overhead and scalability
> limitation.
Mathieu, I'm curious to why you have multiple threads reading the same
fd. Since the threads are per cpu, does the fd handle all CPUs? Or do
you have an fd per event per CPU, in which case the threads should just
poll off of their own fds.
-- Steve
--
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