9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: uriel@cat-v.org
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Re: patch/list sorry/proc-mtime
Date: Thu, 30 Mar 2006 18:22:49 +0200	[thread overview]
Message-ID: <cbaec0a748afc5e3b6734d03077eeed8@cat-v.org> (raw)
In-Reply-To: <599f06db0603300652t25cf9075i817ea6b2a337710a@mail.gmail.com>

> I am not sure about this. Static devices having all the
> same mtime (kerndate) makes sense to me. Dynamic
> devices in which files and directories appear and disappear
> as draw or proc not having the mtime set as normal
> dir/files doesnt.

In all fairness at least the semantics for files inside each proc
directory would not match directly what one would expect from
static file systems (eg., content can change, but mtime would always
be the creation time of the proc.) Maybe setting only the mtime of the
dirs would removes any ambiguity.

Certainly having dirs with a mtime that clearly predates their creation
is far from ideal.

> It may be done for simplicity,
> but it breaks what one would expect. The information
> is not duplicated as far as I understand. The info on the
> mtime would be when the process started, but the
> info inside status is how much time it has consumed
> isnt it?.

The information in status also includes real elapsed time in ms, that
can be used to calculate when the process started as russ pointed out.
Still this is tedious and akward and the mtime of the proc dirs seems
like a natural place to present this often useful information.

Adding the calculation to ps is another possibility, but IMHO it would
unnecessarily clutter the output, probably add an extra option and
require more code while ls -lt /proc works just fine with the mtime
approach.

In the end everything is matter of convenience and taste, but this
criticism comming from the person that instigated the tar -z
abomination is harder to take seriously.

> All this said, I am not coding any of this, so I have voice but not vote...

FYI here is the change to set the mtime, a single line of code:
+  dp->mtime = seconds() - TK2MS(MACHP(0)->ticks - p->time[TReal]) / 1000;

uriel



  reply	other threads:[~2006-03-30 16:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <dfb566242e58a31d6d4f97b379b4f487@plan9.bell-labs.com>
2006-03-29 23:07 ` uriel
2006-03-29 23:34   ` Russ Cox
2006-03-30  0:13   ` quanstro
2006-03-29 23:34     ` Federico G. Benavento
2006-03-30  8:31   ` Charles Forsyth
2006-03-30 10:09     ` lucio
2006-03-30 11:33     ` Gabriel Diaz
2006-03-30 13:42       ` Anthony Sorace
2006-03-30 14:17         ` Russ Cox
2006-03-30 14:52           ` Gorka guardiola
2006-03-30 16:22             ` uriel [this message]
2006-03-30 16:50               ` matt
2006-03-30 17:19                 ` Russ Cox
2006-03-31 10:52                   ` matt
2006-03-30 17:24         ` rog
2006-03-30 17:32           ` uriel
2006-03-30 16:37 Fco. J. Ballesteros

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=cbaec0a748afc5e3b6734d03077eeed8@cat-v.org \
    --to=uriel@cat-v.org \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).