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 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'.  Wouldn't that be the difference between StateReady (R)
and StateRunning (O)?

> -  return __small_sprintf (destbuf, "%u.%02u %u.%02u %u.%02u\n",
> -				    0, 0, 0, 0, 0, 0);
> +  return __small_sprintf (destbuf, "%u.%02u %u.%02u %u.%02u %u/%u\n",
> +				    0, 0, 0, 0, 0, 0, running, pids.npids);

What about the last column in /proc/loadavg, the last pid?  Shouldn't
this be added and set to 0 as well?


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]