public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Lee Revell <rlrevell@joe-job.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: CFQ + 2.6.13-rc4-RT-V0.7.52-02 = BUG: scheduling with irqs disabled
Date: Thu, 25 Aug 2005 13:17:19 +0200	[thread overview]
Message-ID: <20050825111717.GA4018@suse.de> (raw)
In-Reply-To: <20050825075205.GB30650@elte.hu>

On Thu, Aug 25 2005, Ingo Molnar wrote:
> 
> * Jens Axboe <axboe@suse.de> wrote:
> 
> > There can quite easily be lots of pending IO for the io_context (and, 
> > in CFQ's case, below cfq_io_contexts), task exiting is completely 
> > decoupled from any pending io.
> 
> yes, but that only affects the io_context reference count. Actual new 
> use of tsk->io_context should only be possible on the IO-submission 
> side, which should all have stopped by the time we execute do_exit().  
> (and it's synchronous anyway, so the fact that we are executing in the 
> kernel prevents the same thread from submitting new IO, in this case.)
> 
> i.e. the removal of tsk->io_context can be done without locking out 
> interrupts. No interrupt or io_context is supposed to access 
> current->io_context at that point.

Well that's not quite correct, changes were made that allow lookup of
the cic from another task. What happens is that process A will be
dirtying lots of data and process B will be quitely reading other data.
Process B can then get unlucky and have to do page reclaim on behalf of
process A, simply because it tries to allocate a page under memory
pressure.

This is probably fairly rare, because async writeout goes to a dedicated
queue typically bound to one (or more) of the pdflush threads which
never exit. None the less, it needs fixing.

This used to be safe (it used rcu and the cfq_cic_lock to protect read
and write side respectively), I _think_ this was dropped at some point
because I dropped the cross-lookup. I have to ponder how best to fix
this...

-- 
Jens Axboe


      reply	other threads:[~2005-08-25 11:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-24 16:02 CFQ + 2.6.13-rc4-RT-V0.7.52-02 = BUG: scheduling with irqs disabled Lee Revell
2005-08-24 17:47 ` Jens Axboe
2005-08-24 21:35   ` Esben Nielsen
2005-08-25  6:10     ` Jens Axboe
2005-08-25  7:40     ` Ingo Molnar
2005-08-25  6:09   ` Ingo Molnar
2005-08-25  6:22     ` Jens Axboe
2005-08-25  7:52       ` Ingo Molnar
2005-08-25 11:17         ` Jens Axboe [this message]

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=20050825111717.GA4018@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rlrevell@joe-job.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