public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: "Perez-Gonzalez, Inaky" <inaky.perez-gonzalez@intel.com>
Cc: "'Andrew Morton'" <akpm@digeo.com>,
	"'joe.korty@ccur.com'" <joe.korty@ccur.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"'mingo@elte.hu'" <mingo@elte.hu>
Subject: Re: O(1) scheduler seems to lock up on sched_FIFO and sched_RR ta sks
Date: Wed, 18 Jun 2003 19:02:21 -0700	[thread overview]
Message-ID: <3EF119AD.9050000@mvista.com> (raw)
In-Reply-To: <A46BBDB345A7D5118EC90002A5072C780DD16D38@orsmsx116.jf.intel.com>

Perez-Gonzalez, Inaky wrote:
>>From: Andrew Morton [mailto:akpm@digeo.com]
>>
>>Various things like character drivers do rely upon keventd services.  So
> 
> it
> 
>>is possible that bash is stuck waiting on keyboard input, but there is no
>>keyboard input because keventd is locked out.
>>
>>I'll take a closer look at this, see if there is a specific case which can
>>be fixed.
>>
>>Arguably, keventd should be running max-prio RT because it is a kernel
>>service, providing "process context interrupt service".
> 
> 
> Now that we are at that, it might be wise to add a higher-than-anything
> priority that the kernel code can use (what would be 100 for user space,
> but off-limits), so even FIFO 99 code in user space cannot block out
> the migration thread, keventd and friends.

Wait a bit (or even a byte) here.  I think the proper thing to do, IF 
we want to go down this road, is to seperate out the various 
subsystems and give them each their own kernel task or workqueue. 
Then  those who need to could adjust, for example, network code to run 
after real time process control and prior to print jobs, priority 
wise, that is.  Likewise, you could adjust the console access to be 
higher priority than the network so that we call always talk to the 
system.  If you give any kernel thread an untouchable priority, you 
might just as well move the work back to a bottom half or even the 
interrupt code.

-g
> 
> 
>>IIRC, Andrea's kernel runs keventd as SCHED_FIFO.  I've tried to avoid
>>making this change for ideological reasons ;) Userspace is more important
>>than the kernel and the kernel has no damn right to be saying "oh my stuff
>>is so important that it should run before latency-critical user code".
> 
> 
> I agree with that, but the consequence is kind of ugly; not that a true
> real-time embedded process is going to be printing to the console, but 
> it might be outputting to a serial line, so now they rely on the keventd.
> 
> BTW, I have seen similar problems wrt to the migration thread, where a
> FIFO 20 process would get stuck in CPU1, that is taken by a FIFO 40
> while CPU0 was running a FIFO 10 -- however, I am not that positive
> that it is a migration thread problem; I blame it more on the scheduler
> not taking into account priorities for firing the load balancer. It is
> a tricky thingie, though. Affinity helps, in this case.
> 
> Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own
> (and my fault)
> 
> 

-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml


  parent reply	other threads:[~2003-06-19  1:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-19  1:44 O(1) scheduler seems to lock up on sched_FIFO and sched_RR ta sks Perez-Gonzalez, Inaky
2003-06-19  1:58 ` Robert Love
2003-06-19  2:02 ` george anzinger [this message]
2003-06-19  4:34 ` 'joe.korty@ccur.com'
  -- strict thread matches above, loose matches on Subject: below --
2003-06-19  2:55 Perez-Gonzalez, Inaky
2003-06-19  4:38 Perez-Gonzalez, Inaky
2003-06-19  6:06 Perez-Gonzalez, Inaky
2003-06-19  6:07 ` Ingo Molnar
2003-06-19 16:00 ` george anzinger
2003-06-19 17:19   ` 'joe.korty@ccur.com'
2003-06-19 17:23     ` Robert Love
2003-06-19 17:28       ` Joe Korty
2003-06-19  6:52 Perez-Gonzalez, Inaky
2003-06-19 17:43 ` Robert Love
2003-06-19 18:31 Perez-Gonzalez, Inaky
2003-06-19 18:36 ` Robert Love
2003-06-19 19:22 Perez-Gonzalez, Inaky
2003-06-20  2:53 Perez-Gonzalez, Inaky

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=3EF119AD.9050000@mvista.com \
    --to=george@mvista.com \
    --cc=akpm@digeo.com \
    --cc=inaky.perez-gonzalez@intel.com \
    --cc=joe.korty@ccur.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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