lkml.org 
[lkml]   [2011]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 10/10] block: fix request_queue lifetime handling by making blk_queue_cleanup() proper shutdown
Hello,

On Wed, Oct 19, 2011 at 01:29:14PM -0400, Vivek Goyal wrote:
> > Hmmm... the thing is you need to check DEAD again once after releasing
> > and re-grabbing the queuelock, os if we move the test into the caller,
> > we end up having one in the caller and one in the callee, so I thought
> > it would be better to keep them in the same function.
>
> Sorry I did not get that why do we need to check again for DEAD after
> realeasing the queue lock. From throttling perspective, we grab lock
> once, if queue is DEAD, release lock and just return.
>
> blk_throtl_bio() {
>
> bunch_of_checks_without_queue_lock;
>
> spin_lock()
> if (queue_dead) {
> spin_unlock()
> return;
> }
>
> throtl_get_tg();
> }

Because DEAD state is protected by queue_lock and get_tg may release
and re-grab queue_lock across allocation? It needs to re-test after
re-grabbing.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2011-10-19 19:35    [W:0.067 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site