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: <20140124102037.GE4870@tango.0pointer.de>
Date:	Fri, 24 Jan 2014 11:20:38 +0100
From:	Lennart Poettering <mzxreary@...inter.de>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Dan Ballard <dan@...dstab.net>, kay.sievers@...y.org,
	Rob Landley <rob@...dley.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Minto Joseph <mvaliyav@...hat.com>,
	Cyrill Gorcunov <gorcunov@...nvz.org>,
	Pavel Emelyanov <xemul@...allels.com>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	Rik van Riel <riel@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Mel Gorman <mgorman@...e.de>, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] add StartTimeMonotomic, StartTimeBootTime to per
 pid  in   /proc

On Wed, 22.01.14 16:53, Peter Zijlstra (peterz@...radead.org) wrote:

> 
> On Tue, Jan 21, 2014 at 07:10:04AM -0800, Dan Ballard wrote:
> > starttime in /proc/$PID/stat is inaccurate by "clock tick" granularity.
> > The kernel keeps better track os this exposes that in /prod/$PID/status
> > as StartTimeMonotonic and StartTimeBootTime
> 
> Why?

Well, the canonical way to expose clocks to userspace these days is with
CLOCK_MONOTONIC, CLOCK_BOOTTIME, and so on. The starttime is currently
exposed in a way that is made inaccurate by the clock tick in
/proc/$PID/stat. Dan's patch simply unfucks that interface.

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. It is useful information to show the
admin in "ps". 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.

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. 

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