mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Bob Liu <bob.liu@oracle.com>, <xen-devel@lists.xen.org>
Cc: <konrad.wilk@oracle.com>, <linux-kernel@vger.kernel.org>,
	<david.vrabel@citrix.com>, <junxiao.bi@oracle.com>
Subject: Re: [PATCH] xen/blkfront: restart request queue when there is enough persistent_gnts_c
Date: Fri, 9 Jan 2015 16:51:37 +0100	[thread overview]
Message-ID: <54AFF909.3090909@citrix.com> (raw)
In-Reply-To: <1420550343-14013-1-git-send-email-bob.liu@oracle.com>

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@oracle.com>
> Signed-off-by: Bob Liu <bob.liu@oracle.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.

  reply	other threads:[~2015-01-09 15:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-06 13:19 Bob Liu
2015-01-09 15:51 ` Roger Pau Monné [this message]
2015-01-12  7:06   ` Bob Liu
2015-01-12  7:09   ` Bob Liu
2015-01-12 11:36     ` Roger Pau Monné
2015-01-12 13:04       ` David Vrabel
2015-01-12 15:14         ` Roger Pau Monné
2015-01-13  9:49       ` Bob Liu
2015-01-13  9:50       ` Bob Liu

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=54AFF909.3090909@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=bob.liu@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=junxiao.bi@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xen.org \
    /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

Powered by JetHome