[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [PATCH 1/2] block: Avoid invoking blk_run_queue() recursively

On 02/22/13 20:01, Jens Axboe wrote:
That'd be fine. I agree with Tejun that just returning is error prone
and could cause hard-to-debug hangs or stalls. So something ala

         if (blk_queue(dead))
         else if (q->request_fn_active) {
                 blk_delay_queue(q, 0);

would work. Alternatively, you could mark the queue as needing a re-run,
so any existing runner of it would notice and clear this flag and re-run
the queue. But that's somewhat more fragile, and since it isn't a
hot/performance path, I suspect the simple "just re-run me soon" is good

I'm worried that in the device mapper the approach using blk_delay_queue() could trigger a queue run after the final dm_put(). And I'm also afraid that that approach could trigger several needless context switches before q->request_fn_active finally drops to zero. So the approach with the "need re-run" flag seems preferable to me. But maybe I'm overlooking something ?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]