This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH] /proc/loadavg: add running/total processes
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Fri, 1 Apr 2011 10:27:46 +0200
- Subject: Re: [PATCH] /proc/loadavg: add running/total processes
- References: <1301445133.756.11.camel@YAAKOV04> <20110330081341.GA28987@calimero.vinschen.de> <1301475242.5552.28.camel@YAAKOV04> <20110330102741.GA10712@calimero.vinschen.de> <1301642508.692.5.camel@YAAKOV04>
- Reply-to: cygwin-patches at cygwin dot com
On Apr 1 02:21, Yaakov (Cygwin/X) wrote:
> On Wed, 2011-03-30 at 12:27 +0200, Corinna Vinschen wrote:
> > On Mar 30 03:54, Yaakov (Cygwin/X) wrote:
> > > On Wed, 2011-03-30 at 10:13 +0200, Corinna Vinschen wrote:
> > > > On Mar 29 19:32, Yaakov (Cygwin/X) wrote:
> > > > > This patch adds the fourth component of Linux's /proc/loadavg[1], the
> > > > > current running/total processes count. My only question is if states
> > > > > other than 'O' and 'R' should be considered "running" for this purpose.
> > > >
> > > > That looks right. But I don't see that get_process_state will ever
> > > > generate an 'O'.
> > >
> > > Good point. get_process_state() returns only R/S/Z, but
> > > format_process_status() has a case for a few other states. Why?
> >
> > Dunno. The code has been contributed by Christopher January in 2002
> > and is essentially unchanged since then. I don't think anybody would
> > be angry with you if you're going to pick it up and dust it off a bit...
>
> That's alright, I think I'll leave that alone for now; I have other
> patches waiting in my queue to deal with.
>
> Bottom line: should I remove the case 'O' since get_process_state
> doesn't (yet?) return it, or leave it in as in format_process_status()?
Leave it and check in your patch. Could you please also add a FIXME
comment to get_process_state, somewhere around the lines which generate
the 'R' flag, to explain that we might want to revist this code to
generate an 'O' flag at one point?
> Then I would like to leave the fifth column for a later time.
Ok. Go ahead.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat