Bug 11972
Summary: | CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID not setabble | ||
---|---|---|---|
Product: | Timers | Reporter: | Michael Kerrisk (mtk.manpages) |
Component: | Other | Assignee: | john stultz (john.stultz) |
Status: | CLOSED INVALID | ||
Severity: | normal | CC: | a.p.zijlstra, tglx |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | any | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Michael Kerrisk
2008-11-07 09:30:03 UTC
Huh. This seems odd. Those are process accounting values, and I'm not sure I see the rational for user-land being able to change them. Is there any pointer to the portion of the spec in question, or maybe a link to discussion around why this would be desired? Michael: Could you provide more rational for why the process accounting values should be settable? Hi John, See http://www.opengroup.org/onlinepubs/009695399/functions/clock_getres.html I don't know exactly what the rationale is, but the standard seems pretty clear that these clocks should be settable. Thomas, Peter: What's your thought on this? Is this just posix being crazy? Or should we add an extra layer of indirection (basically providing a settable per thread offset that would be added to the thread cpu time before returning) in order to make this work? thanks -john Reply-To: peterz@infradead.org On Thu, 2010-01-14 at 00:30 +0000, bugzilla-daemon@bugzilla.kernel.org wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=11972 > > > john stultz <johnstul@us.ibm.com> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |a.p.zijlstra@chello.nl, > | |tglx@linutronix.de > > > > > --- Comment #4 from john stultz <johnstul@us.ibm.com> 2010-01-14 00:30:08 > --- > Thomas, Peter: What's your thought on this? Is this just posix being crazy? > > Or should we add an extra layer of indirection (basically providing a > settable > per thread offset that would be added to the thread cpu time before > returning) > in order to make this work? Sounds daft, if people want per thread offsets they can do so in userspace, right? Take a look at http://thread.gmane.org/gmane.comp.standards.posix.austin.general/1671. Don Cragun noted: [[ The third from the last paragraph of the DESCRIPTION section of clock_getres(), clock_gettime(), and clock_settime() on XSH7, P668, L22645 says: "Appropriate privileges to set a particular clock are implementation-defined." If the Linux kernel documents that no process has the privileges required to set the clocks identified by CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID, it meets the standard's requirements for this issue. ]] So, at the moment, it sounds to me like Linux doesn't need to implement this to be standards conformant. I'm closing this bug out as invalid. |