[prev in list] [next in list] [prev in thread] [next in thread]
List: dm-devel
Subject: Re: [dm-devel] [PATCH 1/2] block: Avoid invoking blk_run_queue() recursively
From: Bart Van Assche <bvanassche () acm ! org>
Date: 2013-02-23 12:34:53
Message-ID: 5128B76D.4040004 () acm ! org
[Download RAW message or body]
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))
> return;
> else if (q->request_fn_active) {
> blk_delay_queue(q, 0);
> return;
> }
>
> 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
> enough.
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 ?
Bart.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic