public inbox for linux-kernel@vger.kernel.org
 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: <david.vrabel@citrix.com>, <linux-kernel@vger.kernel.org>,
	<konrad.wilk@oracle.com>, <felipe.franciosi@citrix.com>,
	<axboe@fb.com>, <hch@infradead.org>, <avanzini.arianna@gmail.com>
Subject: Re: [PATCH 04/10] xen/blkfront: separate ring information to an new struct
Date: Wed, 18 Feb 2015 18:28:49 +0100	[thread overview]
Message-ID: <54E4CBD1.1000802@citrix.com> (raw)
In-Reply-To: <1423988345-4005-5-git-send-email-bob.liu@oracle.com>

El 15/02/15 a les 9.18, Bob Liu ha escrit:
> A ring is the representation of a hardware queue, this patch separate ring
> information from blkfront_info to an new struct blkfront_ring_info to make
> preparation for real multi hardware queues supporting.
> 
> Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
> Signed-off-by: Bob Liu <bob.liu@oracle.com>
> ---
>  drivers/block/xen-blkfront.c | 403 +++++++++++++++++++++++--------------------
>  1 file changed, 218 insertions(+), 185 deletions(-)
> 
> diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
> index 5a90a51..aaa4a0e 100644
> --- a/drivers/block/xen-blkfront.c
> +++ b/drivers/block/xen-blkfront.c
> @@ -102,23 +102,15 @@ MODULE_PARM_DESC(max, "Maximum amount of segments in indirect requests (default
>  #define BLK_RING_SIZE __CONST_RING_SIZE(blkif, PAGE_SIZE)
>  
>  /*
> - * We have one of these per vbd, whether ide, scsi or 'other'.  They
> - * hang in private_data off the gendisk structure. We may end up
> - * putting all kinds of interesting stuff here :-)
> + *  Per-ring info.
> + *  A blkfront_info structure can associate with one or more blkfront_ring_info,
> + *  depending on how many hardware queues supported.
>   */
> -struct blkfront_info
> -{
> +struct blkfront_ring_info {
>  	spinlock_t io_lock;
> -	struct mutex mutex;
> -	struct xenbus_device *xbdev;
> -	struct gendisk *gd;
> -	int vdevice;
> -	blkif_vdev_t handle;
> -	enum blkif_state connected;
>  	int ring_ref;
>  	struct blkif_front_ring ring;
>  	unsigned int evtchn, irq;
> -	struct request_queue *rq;
>  	struct work_struct work;
>  	struct gnttab_free_callback callback;
>  	struct blk_shadow shadow[BLK_RING_SIZE];
> @@ -126,6 +118,22 @@ struct blkfront_info
>  	struct list_head indirect_pages;
>  	unsigned int persistent_gnts_c;
>  	unsigned long shadow_free;
> +	struct blkfront_info *info;

AFAICT you seem to have a list of persistent grants, indirect pages and
a grant table callback for each ring, isn't this supposed to be shared
between all rings?

I don't think we should be going down that route, or else we can hoard a
large amount of memory and grants.


  reply	other threads:[~2015-02-18 17:33 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-15  8:18 [RFC PATCH 00/10] Multi-queue support for xen-block driver Bob Liu
2015-02-15  8:18 ` [PATCH 01/10] xen/blkfront: convert to blk-mq API Bob Liu
2015-02-15  8:18 ` [PATCH 02/10] xen/blkfront: drop legacy block layer support Bob Liu
2015-02-18 17:02   ` Christoph Hellwig
2015-02-15  8:18 ` [PATCH 03/10] xen/blkfront: reorg info->io_lock after using blk-mq API Bob Liu
2015-02-18 17:05   ` Christoph Hellwig
2015-02-19  2:07     ` Bob Liu
2015-02-15  8:18 ` [PATCH 04/10] xen/blkfront: separate ring information to an new struct Bob Liu
2015-02-18 17:28   ` Roger Pau Monné [this message]
2015-02-18 17:37     ` Konrad Rzeszutek Wilk
2015-02-18 18:08       ` Felipe Franciosi
2015-02-18 18:29         ` Konrad Rzeszutek Wilk
2015-02-19  2:05         ` Bob Liu
2015-02-19 11:08           ` Roger Pau Monné
2015-02-19 11:14             ` David Vrabel
2015-02-19 12:06               ` Felipe Franciosi
2015-02-19 13:12                 ` Roger Pau Monné
2015-02-20 18:59                   ` Konrad Rzeszutek Wilk
2015-02-27 12:52                     ` Bob Liu
2015-03-04 21:21                       ` Konrad Rzeszutek Wilk
2015-03-05  0:47                         ` Bob Liu
2015-03-06 10:30                           ` Felipe Franciosi
2015-03-17  7:00                             ` Bob Liu
2015-03-17 14:52                               ` Felipe Franciosi
2015-03-18  0:52                                 ` Bob Liu
2015-02-15  8:19 ` [PATCH 05/10] xen/blkback: separate ring information out of struct xen_blkif Bob Liu
2015-02-15  8:19 ` [PATCH 06/10] xen/blkfront: pseudo support for multi hardware queues Bob Liu
2015-02-15  8:19 ` [PATCH 07/10] xen/blkback: " Bob Liu
2015-02-19 16:57   ` [Xen-devel] " David Vrabel
2015-02-15  8:19 ` [PATCH 08/10] xen/blkfront: negotiate hardware queue number with backend Bob Liu
2015-02-15  8:19 ` [PATCH 09/10] xen/blkback: get hardware queue number from blkfront Bob Liu
2015-02-15  8:19 ` [PATCH 10/10] xen/blkfront: use work queue to fast blkif interrupt return Bob Liu
2015-02-19 16:51   ` [Xen-devel] " David Vrabel
2015-02-18 17:01 ` [RFC PATCH 00/10] Multi-queue support for xen-block driver Christoph Hellwig
2015-02-18 18:22 ` Felipe Franciosi
2015-02-19  2:04   ` 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=54E4CBD1.1000802@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=avanzini.arianna@gmail.com \
    --cc=axboe@fb.com \
    --cc=bob.liu@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=felipe.franciosi@citrix.com \
    --cc=hch@infradead.org \
    --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