summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/xen-scsifront.c
diff options
context:
space:
mode:
authorWei Liu <wei.liu2@citrix.com>2015-04-03 14:44:59 +0800
committerDavid Vrabel <david.vrabel@citrix.com>2015-04-15 10:56:47 +0100
commitccc9d90a9a8b5c4ad7e9708ec41f75ff9e98d61d (patch)
tree2a147c10a289a3f4283d6008708297f07df052a6 /drivers/scsi/xen-scsifront.c
parent278edfc07875779a69277f6c5773ec9318a994ee (diff)
downloadblackbird-op-linux-ccc9d90a9a8b5c4ad7e9708ec41f75ff9e98d61d.tar.gz
blackbird-op-linux-ccc9d90a9a8b5c4ad7e9708ec41f75ff9e98d61d.zip
xenbus_client: Extend interface to support multi-page ring
Originally Xen PV drivers only use single-page ring to pass along information. This might limit the throughput between frontend and backend. The patch extends Xenbus driver to support multi-page ring, which in general should improve throughput if ring is the bottleneck. Changes to various frontend / backend to adapt to the new interface are also included. Affected Xen drivers: * blkfront/back * netfront/back * pcifront/back * scsifront/back * vtpmfront The interface is documented, as before, in xenbus_client.c. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Bob Liu <bob.liu@oracle.com> Cc: Konrad Wilk <konrad.wilk@oracle.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'drivers/scsi/xen-scsifront.c')
-rw-r--r--drivers/scsi/xen-scsifront.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
index 78d95069ac6a..fad22caf0eff 100644
--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -714,6 +714,7 @@ static int scsifront_alloc_ring(struct vscsifrnt_info *info)
{
struct xenbus_device *dev = info->dev;
struct vscsiif_sring *sring;
+ grant_ref_t gref;
int err = -ENOMEM;
/***** Frontend to Backend ring start *****/
@@ -726,14 +727,14 @@ static int scsifront_alloc_ring(struct vscsifrnt_info *info)
SHARED_RING_INIT(sring);
FRONT_RING_INIT(&info->ring, sring, PAGE_SIZE);
- err = xenbus_grant_ring(dev, virt_to_mfn(sring));
+ err = xenbus_grant_ring(dev, sring, 1, &gref);
if (err < 0) {
free_page((unsigned long)sring);
xenbus_dev_fatal(dev, err,
"fail to grant shared ring (Front to Back)");
return err;
}
- info->ring_ref = err;
+ info->ring_ref = gref;
err = xenbus_alloc_evtchn(dev, &info->evtchn);
if (err) {
OpenPOWER on IntegriCloud