[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54AFF909.3090909@citrix.com>
Date: Fri, 9 Jan 2015 16:51:37 +0100
From: Roger Pau Monné <roger.pau@...rix.com>
To: Bob Liu <bob.liu@...cle.com>, <xen-devel@...ts.xen.org>
CC: <konrad.wilk@...cle.com>, <linux-kernel@...r.kernel.org>,
<david.vrabel@...rix.com>, <junxiao.bi@...cle.com>
Subject: Re: [PATCH] xen/blkfront: restart request queue when there is enough
persistent_gnts_c
El 06/01/15 a les 14.19, Bob Liu ha escrit:
> When there is no enough free grants, gnttab_alloc_grant_references()
> will fail and block request queue will stop.
> If the system is always lack of grants, blkif_restart_queue_callback() can't be
> scheduled and block request queue can't be restart(block I/O hang).
>
> But when there are former requests complete, some grants may free to
> persistent_gnts_c, we can give the request queue another chance to restart and
> avoid block hang.
>
> Reported-by: Junxiao Bi <junxiao.bi@...cle.com>
> Signed-off-by: Bob Liu <bob.liu@...cle.com>
> ---
> drivers/block/xen-blkfront.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
> index 2236c6f..dd30f99 100644
> --- a/drivers/block/xen-blkfront.c
> +++ b/drivers/block/xen-blkfront.c
> @@ -1125,6 +1125,17 @@ static void blkif_completion(struct blk_shadow *s, struct blkfront_info *info,
> }
> }
> }
> +
> + /*
> + * Request queue would be stopped if failed to alloc enough grants and
> + * won't be restarted until gnttab_free_count >= info->callback->count.
> + *
> + * But there is another case, once we have enough persistent grants we
> + * can try to restart the request queue instead of continue to wait for
> + * 'gnttab_free_count'.
> + */
> + if (info->persistent_gnts_c >= info->callback.count)
> + schedule_work(&info->work);
I guess I'm missing something here, but blkif_completion is called by
blkif_interrupt, which in turn calls kick_pending_request_queues when
finished, which IMHO should be enough to restart the processing of requests.
Roger.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists