[lkml]   [2011]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 1/4] sched: Separate the scheduler entry for preemption
On Wed, 22 Jun 2011, Christoph Hellwig wrote:

> On Wed, Jun 22, 2011 at 05:52:13PM -0000, Thomas Gleixner wrote:
> > Block-IO and workqueues call into notifier functions from the
> > scheduler core code with interrupts and preemption disabled. These
> > calls should be made before entering the scheduler core.
> >
> > To simplify this, separate the scheduler core code into
> > __schedule(). __schedule() is directly called from the places which
> > set PREEMPT_ACTIVE and from schedule(). This allows us to add the work
> > checks into schedule(), so they are only called when a task voluntary
> > goes to sleep.
> I don't think that works. We'll need to flush the block requests even
> for an involuntary schedule.

We don't do that right now as that code conditional on:

if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {

Also blk_flush_plug_list() when called from io_schedule() is
preemptible, so you might be preempted in the middle of the list
operations, so calling into it when preempted would result in an utter



 \ /
  Last update: 2011-06-22 20:55    [W:0.102 / U:3.504 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site