public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* Problem in proc(5), regarding loadavg
@ 2009-05-25 18:22 Juliano F. Ravasi
  0 siblings, 0 replies; only message in thread
From: Juliano F. Ravasi @ 2009-05-25 18:22 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
	linux-man-u79uwXL29TY76Z2rM5mHXA

Hi,

I found that the information on proc(5) in the latest version of
man-pages (3.21) do not seem to match the real implementation, regarding
the file /proc/loadavg.

The manual page says that:

	"The first of these [the two numbers of the fourth field] is the
	number of currently executing kernel scheduling entities
	(processes, threads); this will be less than or equal to the
	number of CPUs."

By looking at the implementation in (v2.6.29)/fs/proc/loadavg.c, this
field returns the value of `nr_running()', which is defined in
/kernel/sched.c and returns the current number of *runnable* threads. It
is easily verifiable that this value may and will be greater the number
of CPUs if you start a number of processing-intensive threads, then
inspect /proc/loadavg.

Best regards,
Juliano.


-- 
Juliano F. Ravasi ·· http://juliano.info/
5105 46CC B2B7 F0CD 5F47 E740 72CA 54F4 DF37 9E96

"A candle loses nothing by lighting another candle." -- Erin Majors
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-25 18:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-25 18:22 Problem in proc(5), regarding loadavg Juliano F. Ravasi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox