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: <20090209180058.GG6802@linux.vnet.ibm.com>
Date:	Mon, 9 Feb 2009 10:00:58 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Mathieu Desnoyers <compudj@...stal.dyndns.org>
Cc:	Bert Wesarg <bert.wesarg@...glemail.com>,
	ltt-dev@...ts.casi.polymtl.ca, linux-kernel@...r.kernel.org,
	Robert Wisniewski <bob@...son.ibm.com>
Subject: Re: [RFC git tree] Userspace RCU (urcu) for Linux (repost)

On Mon, Feb 09, 2009 at 12:42:02PM -0500, Mathieu Desnoyers wrote:
> * Paul E. McKenney (paulmck@...ux.vnet.ibm.com) wrote:
> > On Mon, Feb 09, 2009 at 06:35:38PM +0100, Bert Wesarg wrote:
> > > On Mon, Feb 9, 2009 at 18:34, Paul E. McKenney
> > > <paulmck@...ux.vnet.ibm.com> wrote:
> > > > On Mon, Feb 09, 2009 at 06:19:45PM +0100, Bert Wesarg wrote:
> > > >> On Mon, Feb 9, 2009 at 14:16, Paul E. McKenney
> > > >> <paulmck@...ux.vnet.ibm.com> wrote:
> > > >> > On Sun, Feb 08, 2009 at 11:53:52PM -0500, Mathieu Desnoyers wrote:
> > > >> >> Yes, I guess the signal is not so bad.
> > > >> >
> > > >> > Now if there were a /proc entry that listed out the tids of the
> > > >> > currently running threads, then it might be possible to do something,
> > > >> > especially for applications with many more threads than CPUs.
> > > >>
> > > >> Do you mean something like: `ls /proc/$pid/tasks/*`? Or is this not
> > > >> atomic enough?
> > > >
> > > > Won't that give me all the threads rather than only the ones currently
> > > > running?
> > >
> > > What do you mean by 'running'?
> > 
> > Sitting on a CPU and executing, as opposed to blocked or preempted.
> > 
> > It is pretty easy to scan the running tasks within the kernel, but I
> > don't know of an efficient way to do it from user mode.  The only way
> > I know of would be to cat out the /proc/$pid/tasks/*/status (IIRC)
> > and look for the task state.
> 
> The thing I dislike about this approach is the non-portability. Ideally,
> if we want to integrate urcu to pthreads, we should also aim at
> BSD-based OSes.

But it could be portable.  If the /proc file in question could not be
opened (as would be the case on BSDs), you just send the signal to all
the tasks.

							Thanx, Paul
--
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