mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] Wall time clocks + change in access rules
@ 2010-07-30  9:57 Tomasz Buchert
  2010-07-30  9:57 ` [PATCH 1/4] posix-timers: Refactoring of CPUCLOCK* macros Tomasz Buchert
  2010-07-30 11:23 ` [PATCH 0/4] Wall time clocks + change in access rules Stanislaw Gruszka
  0 siblings, 2 replies; 11+ messages in thread
From: Tomasz Buchert @ 2010-07-30  9:57 UTC (permalink / raw)
  To: linux-kernel, Daniel Walker, Stanislaw Gruszka, Peter Zijlstra
  Cc: Tomasz Buchert

My another attempt to get my patches reviewed. For
the convenience of a prospective reviewer I've written
a set of tests for this kernel change. One may get them using:

git clone http://pentium.hopto.org/~thinred/repos/clock-test.git

During our work we encountered a problem of obtaining
a reliable and fine-grained measurements of CPU time/wall time
of a process/thread. The existing methods (taskstats, procfs,
POSIX CPU clocks) have either unfriendly interface (taskstats)
or give unsatisfactory precision (procfs). However, even
the most precise and clean interface, POSIX CPU clocks,
is limited only to threads in the same thread group.

The following patches introduce three changes:
  * new per process/thread wall time clocks --
    CLOCK_PROCESS_WALLTIME_ID and CLOCK_THREAD_WALLTIME_ID;
    one can also access wall time of a process/thread
    using clocks constructed from macros in posix-timers.h
  * less restricted access to CPU and wall clocks --
    user can access them for all their threads
  * minor refactoring/renaming to reflect the changes.

Tomasz Buchert (4):
  posix-timers: Refactoring of CPUCLOCK* macros
  posix-cpu-timers: Introduction of wall clocks
  posix-cpu-timers: Wider access to the thread clocks
  posix-cpu-timers: posix-cpu-timers.c renamed to posix-task-timers.c

 include/linux/posix-timers.h |   52 +-
 include/linux/sched.h        |    2 +-
 include/linux/time.h         |    2 +
 kernel/Makefile              |    2 +-
 kernel/itimer.c              |   14 +-
 kernel/posix-cpu-timers.c    | 1642 -------------------------------------
 kernel/posix-task-timers.c   | 1852 ++++++++++++++++++++++++++++++++++++++++++
 kernel/posix-timers.c        |   25 +-
 8 files changed, 1924 insertions(+), 1667 deletions(-)
 delete mode 100644 kernel/posix-cpu-timers.c
 create mode 100644 kernel/posix-task-timers.c


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [PATCH 1/4] posix-timers: Refactoring of CPUCLOCK* macros
@ 2010-07-19 21:02 Daniel Walker
  2010-07-21 18:03 ` [PATCH 0/4] Wall time clocks + change in access rules Tomasz Buchert
  0 siblings, 1 reply; 11+ messages in thread
From: Daniel Walker @ 2010-07-19 21:02 UTC (permalink / raw)
  To: Tomasz Buchert; +Cc: linux-kernel, Stanislaw Gruszka, Peter Zijlstra

On Mon, 2010-07-19 at 22:59 +0200, Tomasz Buchert wrote:
> Daniel Walker a écrit :
> > On Mon, 2010-07-19 at 13:34 +0200, Tomasz Buchert wrote:
> >> This is merely a preparation to introduce wall time
> >> clocks for threads/processes. All occurences of
> >> CPUCLOCK* macros were replaced by CLOCK*.
> > 
> > It seems like it would be better to make this naming more specific that
> > less. Couldn't you say "POSIX_CLOCK" or something like that?
> > 
> > Daniel
> Hi Daniel.
> Sure. However, technically, my wall clocks have nothing to do
> with POSIX. Still the code is inside a file with "posix" prefix,
> so you are right.
> I will resend patch series as soon as it is done. Could you
> elaborate on another patches?

I wasn't suggesting that adding "POSIX" is the only option, but adding
something more so it's not just "CLOCK" .

You mean you want me to review the other patches also ? 

Daniel

-- 
Sent by an consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 0/4] Wall time clocks + change in access rules
@ 2010-07-19 11:34 Tomasz Buchert
  0 siblings, 0 replies; 11+ messages in thread
From: Tomasz Buchert @ 2010-07-19 11:34 UTC (permalink / raw)
  To: linux-kernel, Stanislaw Gruszka, Peter Zijlstra; +Cc: Tomasz Buchert

During our work we encountered a problem of obtaining
a reliable and fine-grained measurements of CPU time/wall time 
of a process/thread. The existing methods (taskstats, procfs,
POSIX CPU clocks) have either unfriendly interface (taskstats)
or give unsatisfactory precision (procfs). However, even
the most precise and clean interface, POSIX CPU clocks, 
is limited only to threads in the same thread group.

The following patches introduce three changes:
  * new per process/thread wall time clocks --
    CLOCK_PROCESS_WALLTIME_ID and CLOCK_THREAD_WALLTIME_ID;
    one can also access wall time of a process/thread
    using clocks constructed from macros in posix-timers.h
  * less restricted access to CPU and wall clocks --
    user can access them for all their threads
  * minor refactoring/renaming to reflect the changes.

Tomasz Buchert (4):
  posix-timers: Refactoring of CPUCLOCK* macros
  posix-cpu-timers: Introduction of wall clocks
  posix-cpu-timers: Wider access to the thread clocks
  posix-cpu-timers: posix-cpu-timers.c renamed to posix-task-timers.c

 include/linux/posix-timers.h |   51 +-
 include/linux/sched.h        |    2 +-
 include/linux/time.h         |    2 +
 kernel/Makefile              |    2 +-
 kernel/itimer.c              |   14 +-
 kernel/posix-cpu-timers.c    | 1642 -------------------------------------
 kernel/posix-task-timers.c   | 1852 ++++++++++++++++++++++++++++++++++++++++++
 kernel/posix-timers.c        |   25 +-
 8 files changed, 1923 insertions(+), 1667 deletions(-)
 delete mode 100644 kernel/posix-cpu-timers.c
 create mode 100644 kernel/posix-task-timers.c


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-07-30 14:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-30  9:57 [PATCH 0/4] Wall time clocks + change in access rules Tomasz Buchert
2010-07-30  9:57 ` [PATCH 1/4] posix-timers: Refactoring of CPUCLOCK* macros Tomasz Buchert
2010-07-30  9:57   ` [PATCH 2/4] posix-cpu-timers: Introduction of wall clocks Tomasz Buchert
2010-07-30  9:57     ` [PATCH 3/4] posix-cpu-timers: Wider access to the thread clocks Tomasz Buchert
2010-07-30  9:57       ` [PATCH 4/4] posix-cpu-timers: posix-cpu-timers.c renamed to posix-task-timers.c Tomasz Buchert
2010-07-30 11:30     ` [PATCH 2/4] posix-cpu-timers: Introduction of wall clocks Stanislaw Gruszka
2010-07-30 11:23 ` [PATCH 0/4] Wall time clocks + change in access rules Stanislaw Gruszka
2010-07-30 11:51   ` Stanislaw Gruszka
2010-07-30 14:58   ` Rationale for wall clocks Tomasz Buchert
  -- strict thread matches above, loose matches on Subject: below --
2010-07-19 21:02 [PATCH 1/4] posix-timers: Refactoring of CPUCLOCK* macros Daniel Walker
2010-07-21 18:03 ` [PATCH 0/4] Wall time clocks + change in access rules Tomasz Buchert
2010-07-19 11:34 Tomasz Buchert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®