public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lennart Poettering <mzxreary@0pointer.de>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Dan Ballard <dan@mindstab.net>,
	kay.sievers@vrfy.org, Rob Landley <rob@landley.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Minto Joseph <mvaliyav@redhat.com>,
	Cyrill Gorcunov <gorcunov@openvz.org>,
	Pavel Emelyanov <xemul@parallels.com>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	Rik van Riel <riel@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Mel Gorman <mgorman@suse.de>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] add StartTimeMonotomic, StartTimeBootTime to per pid   in   /proc
Date: Fri, 24 Jan 2014 13:49:39 +0100	[thread overview]
Message-ID: <20140124124939.GA6146@tango.0pointer.de> (raw)
In-Reply-To: <20140124113203.GZ30183@twins.programming.kicks-ass.net>

On Fri, 24.01.14 12:32, Peter Zijlstra (peterz@infradead.org) wrote:

> > The process starttime is useful for a variety of things, like figuring
> > out creation ordering of processes. Or it is useful to detect PID
> > reuses in a somewhat reliable way. 
> 
> OK, maybe. Changelog should have said so.
> 
> > It is useful information to show the admin in "ps".
> 
> Does the one jiffy rounding really matter there? I doubt it, ps
> typically shows in second granularity.

Well, it's just annoying. Much of userspace uses CLOCK_MONOTONIC
throughout all the local timestamping needs these days, however the jiffy rounding
and the fact that "starttime" is based on CLOCK_BOOTTIME makes it hard
to compare process timestamps currently with other timestamps...

> > Profilers like "bootchart" can use this information to
> > plot when precisely specific process got started. From the outside it is
> > often useful to see for how long a specific process has already been
> > running, for accounting needs, and so on.
> 
> Profilers have far better interfaces than /proc to get information
> from.

That is true, but note that at least on Fedora taskstats and thing are
actually disabled these days in the kernel, since they slow things down
too much. The /proc interface is certainly much nicer there, since it
relies on a the timestamping the kernel does anyway...

> > Note that Dan's patch doesn't add any new timestamp logic to the kernel,
> > it just exposes the existing timestamps in a way to userspace that is
> > more in line with the rest of timestamps exposed. 
> 
> Yeah, Dan was also too lazy to explain the need, and had like 3 typoes
> in the inadequate changelog he had.
> 
> He also fails to explain why he needs the timestamp twice, as do you for
> that matter.

Well, I am mostly interesting int the monotonic timestamp. But given
that the kernel keeps the boottime clock value as well, and already
exposes it in a skewed way to userspace it looked like a natural choice
to also expose that time in a clean way, while we are it...

Lennart

-- 
Lennart Poettering, Red Hat

  reply	other threads:[~2014-01-24 12:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 15:10 [PATCH 1/1] add StartTimeMonotomic, StartTimeBootTime to per pid in /proc Dan Ballard
2014-01-22 15:53 ` Peter Zijlstra
2014-01-23 14:52   ` Dan Ballard
2014-01-23 15:20     ` Peter Zijlstra
2014-01-24 10:20   ` Lennart Poettering
2014-01-24 11:32     ` Peter Zijlstra
2014-01-24 12:49       ` Lennart Poettering [this message]
2014-01-31 15:42       ` Dan Ballard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140124124939.GA6146@tango.0pointer.de \
    --to=mzxreary@0pointer.de \
    --cc=akpm@linux-foundation.org \
    --cc=dan@mindstab.net \
    --cc=fweisbec@gmail.com \
    --cc=gorcunov@openvz.org \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mvaliyav@redhat.com \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=rob@landley.net \
    --cc=tglx@linutronix.de \
    --cc=xemul@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox