public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "Juliano F. Ravasi" <ml-3xekma+8Mi6ZuzBka8ofvg@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Problem in proc(5), regarding loadavg
Date: Mon, 25 May 2009 15:22:09 -0300	[thread overview]
Message-ID: <4A1AE1D1.4080006@juliano.info> (raw)

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

                 reply	other threads:[~2009-05-25 18:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4A1AE1D1.4080006@juliano.info \
    --to=ml-3xekma+8mi6zuzbka8ofvg@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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