LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Simon Arlott <simon@arlott.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: round_jiffies and load average
Date: Sat, 24 Feb 2007 15:19:24 +0000	[thread overview]
Message-ID: <45E0577C.9020409@simon.arlott.org.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 2205 bytes --]

I've modified the driver of an USB device (cxacru) to schedule the next poll for status every 1s using round_jiffies_relative instead of just waiting 1s since the last poll was completed. This process takes on average 11ms to complete and while it is waiting for a response it's considered running.

The load average is calculated every 5 seconds equivalent to round_jiffies, so I have a problem with the load average always tending towards 1.00:

 14:26:19 up 6 days, 14:45,  5 users,  load average: 1.10, 1.04, 1.02
 14:27:19 up 6 days, 14:46,  5 users,  load average: 1.03, 1.03, 1.01
 14:28:19 up 6 days, 14:47,  5 users,  load average: 0.95, 1.01, 1.00
 14:29:19 up 6 days, 14:48,  5 users,  load average: 0.90, 0.97, 0.99
 14:30:19 up 6 days, 14:49,  5 users,  load average: 0.93, 0.96, 0.98
 14:31:19 up 6 days, 14:50,  5 users,  load average: 0.90, 0.94, 0.97
 14:32:20 up 6 days, 14:51,  5 users,  load average: 0.96, 0.95, 0.97
 14:33:20 up 6 days, 14:52,  5 users,  load average: 0.98, 0.95, 0.97
 14:34:20 up 6 days, 14:53,  5 users,  load average: 1.09, 0.99, 0.98
 14:35:20 up 6 days, 14:54,  5 users,  load average: 1.03, 0.99, 0.98
 14:36:20 up 6 days, 14:55,  5 users,  load average: 1.01, 0.99, 0.98
 14:37:20 up 6 days, 14:56,  5 users,  load average: 1.00, 0.99, 0.98
 14:38:21 up 6 days, 14:57,  5 users,  load average: 1.22, 1.05, 1.00
 14:39:21 up 6 days, 14:58,  5 users,  load average: 1.08, 1.04, 1.00
 14:40:21 up 6 days, 14:59,  5 users,  load average: 1.03, 1.03, 1.00
 14:41:21 up 6 days, 15:00,  5 users,  load average: 0.95, 1.01, 0.99
 14:42:21 up 6 days, 15:01,  5 users,  load average: 0.90, 0.97, 0.98
 14:43:21 up 6 days, 15:02,  5 users,  load average: 0.99, 0.99, 0.99
 14:44:22 up 6 days, 15:03,  5 users,  load average: 0.86, 0.94, 0.97
 14:45:22 up 6 days, 15:04,  5 users,  load average: 0.97, 0.95, 0.97
 14:46:22 up 6 days, 15:05,  5 users,  load average: 1.08, 0.99, 0.98
 14:47:22 up 6 days, 15:06,  5 users,  load average: 1.03, 0.99, 0.98
 14:48:22 up 6 days, 15:07,  5 users,  load average: 1.32, 1.07, 1.01

Perhaps the load average count could be run just before or in the middle of a second instead?

-- 
Simon Arlott


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 829 bytes --]

             reply	other threads:[~2007-02-24 15:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-24 15:19 Simon Arlott [this message]
2007-03-01  9:11 ` Simon Arlott
2007-03-01 18:52   ` [PATCH] timer: Add an initial 0.5s delay to calc_load Simon Arlott
2007-03-01 22:52     ` [PATCH (updated)] timer: Run calc_load halfway through each round_jiffies second Simon Arlott
2002-01-01  3:05       ` Pavel Machek
2007-03-05 22:35         ` Simon Arlott
2007-03-06 18:42           ` [PATCH (update 4)] " Simon Arlott
2007-03-06 22:20         ` [PATCH (updated)] " Chuck Ebbert
2007-03-01 23:10       ` Bill Irwin
2007-03-02 10:15         ` [PATCH (update 2)] " Simon Arlott
2007-03-02 15:15           ` [PATCH (update 3)] " Simon Arlott
2007-03-02 16:35             ` Eric Dumazet
2007-03-02 17:32               ` Simon Arlott
2007-03-02 18:03                 ` Eric Dumazet
2007-03-02 20:14                   ` Simon Arlott
2007-03-02 22:32                     ` Eric Dumazet
2007-03-02 23:54                       ` Simon Arlott

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=45E0577C.9020409@simon.arlott.org.uk \
    --to=simon@arlott.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: round_jiffies and load average' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).