public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Williams <pwil3058@bigpond.net.au>
To: Lee Revell <rlrevell@joe-job.com>
Cc: spaminos-ker@yahoo.com, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Scheduler fairness problem on 2.6 series (Attn: Nick Piggin	and others)
Date: Sun, 29 Aug 2004 12:03:49 +1000	[thread overview]
Message-ID: <41313985.3050805@bigpond.net.au> (raw)
In-Reply-To: <1093740349.7078.13.camel@krustophenia.net>

Lee Revell wrote:
> On Sat, 2004-08-28 at 20:25, Lee Revell wrote:
> 
>>On Sat, 2004-08-28 at 20:21, Peter Williams wrote:
>>
>>>spaminos-ker@yahoo.com wrote:
>>>
>>>>--- Peter Williams <pwil3058@bigpond.net.au> wrote:
>>
>>>>    -----------------
>>>> => started at: kernel_fpu_begin+0x21/0x60
>>>> => ended at:   _mmx_memcpy+0x131/0x180
>>>>=======>
>>>>00000001 0.000ms (+0.000ms): kernel_fpu_begin (_mmx_memcpy)
>>>>00000001 0.730ms (+0.730ms): sub_preempt_count (_mmx_memcpy)
>>>>00000001 0.730ms (+0.000ms): _mmx_memcpy (check_preempt_timing)
>>>>00000001 0.730ms (+0.000ms): kernel_fpu_begin (_mmx_memcpy)
>>>>
>>>
>>>As far as I can see sub_preempt_count() is part of the latency measuring 
>>>component of the voluntary preempt patch so, like you, I'm not sure 
>>>whether this report makes any sense.
>>
>>Is this an SMP machine?  There were problems with that version of the
>>voluntary preemption patches on SMP.  The latest version, Q3, should fix
>>these.
>>
> 
> 
> Hmm, after rereading the entire thread, I am not sure that voluntary
> preemption will help you here.  Voluntary preemption (and preemption in
> general) deals with the situation in which you have a high priority
> task, often the highest priority task on the system, that spends most of
> its time sleeping on some resource, and this task needs to run as soon
> as possible once it becomes runnable.  In that situation the scheduler
> doesn't have a very difficult decision, there is no question that it
> should run this task ASAP.  How long 'ASAP' is depends on how long it
> takes whatever task was running when our high priority task became
> runnable to yield the processor.  The scheduler has a very easy job
> here, there is only one right thing to do.  Also the intervals involved
> are very small, usually less than 1ms, whereas you are talking about a
> variance of several seconds.

My understanding is that it's a very occasional (every few hours) time 
out of several seconds not something with a variance of several seconds. 
  So it seems to fit the characteristics of the type of problem that you 
are hunting i.e. every now and then going through a (rarely exercised) 
code path that hogs the CPU for too long.  But, as you say, the time 
scales are radically different.

> 
> In the situation you describe, you have two tasks running at the same
> base priority, and the scheduler does not seem to be doing a good job
> balancing them.  This is a different situation, and much more dependent
> on the scheduling policy.

The mode in which the scheduler was being used had all priority fiddling 
(except promotion) turned off so the tasks should have been just round 
robinning with each other.  Also, the time outs are fairly rare (every 
few hours according to Nicolas's e-mail) and happen with several 
different schedulers (with ZAPHOD (the one being used by Nicolas) and 
Con's staircase schedulers having less problem than the vanilla 
scheduler) which is why I thought it might be something outside the 
scheduler.  Perhaps it's something outside the kernel?

Peter
-- 
Peter Williams                                   pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce


  reply	other threads:[~2004-08-29  2:03 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <411D50AE.5020005@bigpond.net.au>
2004-08-17 23:19 ` Scheduler fairness problem on 2.6 series (Attn: Nick Piggin and others) spaminos-ker
2004-08-18  0:12   ` Peter Williams
2004-08-24 21:11     ` spaminos-ker
2004-08-24 23:04       ` Peter Williams
2004-08-24 23:22         ` Lee Revell
2004-08-26  2:30         ` spaminos-ker
2004-08-26  2:42           ` Peter Williams
2004-08-26  8:39             ` Peter Williams
2004-08-28  1:59               ` spaminos-ker
2004-08-29  0:21                 ` Peter Williams
2004-08-29  0:25                   ` Lee Revell
2004-08-29  0:45                     ` Lee Revell
2004-08-29  2:03                       ` Peter Williams [this message]
2004-08-29  2:28                         ` spaminos-ker
2004-08-29  4:53                           ` Peter Williams
2004-08-29  1:19                     ` spaminos-ker
2004-08-29  1:22                       ` Lee Revell
2004-08-29  1:31                         ` Peter Williams
2004-09-13 20:09                           ` spaminos-ker
2004-08-29  2:20                       ` Lee Revell
     [not found] <20040811093945.GA10667@elte.hu>
2004-08-17 23:08 ` spaminos-ker
     [not found] <20040811010116.GL11200@holomorphy.com>
2004-08-11  2:21 ` spaminos-ker
2004-08-11  2:23   ` William Lee Irwin III
2004-08-11  2:45     ` Peter Williams
2004-08-11  2:47       ` Peter Williams
2004-08-11  3:23         ` Peter Williams
2004-08-11  3:31           ` Con Kolivas
2004-08-11  3:46             ` Peter Williams
2004-08-11  3:44           ` Peter Williams
2004-08-13  0:13             ` spaminos-ker
2004-08-13  1:44               ` Peter Williams
2004-08-11  3:09   ` Con Kolivas
2004-08-11 10:24     ` Prakash K. Cheemplavam
2004-08-12  2:04     ` spaminos-ker
2004-08-12  2:24     ` spaminos-ker
2004-08-12  2:53       ` Con Kolivas
2004-08-07 21:53 spaminos-ker

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=41313985.3050805@bigpond.net.au \
    --to=pwil3058@bigpond.net.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rlrevell@joe-job.com \
    --cc=spaminos-ker@yahoo.com \
    /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