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]
Date:	Tue, 1 May 2007 18:27:24 -0400
From:	Theodore Tso <tytso@....edu>
To:	Ulrich Drepper <drepper@...il.com>
Cc:	Bill Irwin <bill.irwin@...cle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Eric Dumazet <dada1@...mosbay.com>,
	linux-kernel@...r.kernel.org, wli@...omorphy.com
Subject: Re: per-thread rusage

On Tue, May 01, 2007 at 03:10:40PM -0700, Ulrich Drepper wrote:
> I think beside RUSAGE_THREAD you'll find no precedence.  It's all new,
> you have to tread the path.  The RUSAGE_THREAD interface is not
> sufficient, actually.  First, if a thread terminates we don't have to
> keep it stick around until a wait call can be issued.  We terminate
> threads right away and the synchronization with waiters is done
> independently.  Seond, the thread ID (aka kernel process ID) is not
> exported nor should it.  This is easy to solve, though: introduce a
> pthread_getrusage interface.

Hey Ulrich, 

	It turns out this could be useful implementing something
called "Cost Enforcement" in the Real Time Specification for Java,
which is an optional part of the specification, but which some
customers have wanted. 

	The basic idea is that the thread tells JVM how much time
(either CPU or wall clock) it will consume, and if it takes more than
the specified amount of time, the assumption is that the thread has
malfunctioned or there has been some programming error, and the thread
should get the Java equivalent of a SIGXPU.

	There are two ways of implementing this.  One is to have the
JVM periodically poll using a pthread_getrusage() interface.  A better
choice might be some kind of per-thread CPU limit, that would result
in a thread-specific SIGXCPU signal.  But there are no interfaces
today that do anything like this.

	Do you have any thoughts or preferences about how this might
be done, if we tried to about doing something like a per-thread
SIGXCPU functionality?  If not, pthread_getrusage() might be
sufficient, if not the most efficient way of doing things.

	Regards,

					- Ted
-
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