This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] /proc/loadavg: add running/total processes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]