[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <412A05BA40734D4887DBC67661F433080FF71D16@EXMAIL.ad.emulex.com>
Date: Fri, 28 Aug 2009 14:18:29 -0700
From: Chetan.Loke@...lex.Com
To: <akataria@...are.com>
CC: <linux-kernel@...r.kernel.org>, <akpm@...ux-foundation.org>,
<dtor@...are.com>, <James.Bottomley@...senPartnership.com>,
<robert.w.love@...el.com>, <randy.dunlap@...cle.com>,
<michaelc@...wisc.edu>
Subject: RE: [PATCH] SCSI driver for VMware's virtual HBA.
Alok,
> +static int __devinit pvscsi_allocate_rings(struct pvscsi_adapter
> *adapter)
> +{
> + adapter->rings_state = pci_alloc_consistent(adapter->dev, PAGE_SIZE,
> + &adapter->ringStatePA);
> + if (!adapter->rings_state)
> + return -ENOMEM;
> +
> + adapter->req_pages = min(PVSCSI_MAX_NUM_PAGES_REQ_RING,
> + pvscsi_ring_pages);
> + adapter->req_depth = adapter->req_pages
> + * PVSCSI_MAX_NUM_REQ_ENTRIES_PER_PAGE;
> + adapter->req_ring = pci_alloc_consistent(adapter->dev,
> + adapter->req_pages * PAGE_SIZE,
> + &adapter->reqRingPA);
> + if (!adapter->req_ring)
> + return -ENOMEM;
> +
> + adapter->cmp_pages = min(PVSCSI_MAX_NUM_PAGES_CMP_RING,
> + pvscsi_ring_pages);
> + adapter->cmp_ring = pci_alloc_consistent(adapter->dev,
> + adapter->cmp_pages * PAGE_SIZE,
> + &adapter->cmpRingPA);
> + if (!adapter->cmp_ring)
> + return -ENOMEM;
> +
> + BUG_ON(adapter->ringStatePA & ~PAGE_MASK);
> + BUG_ON(adapter->reqRingPA & ~PAGE_MASK);
> + BUG_ON(adapter->cmpRingPA & ~PAGE_MASK);
> +
> + if (!adapter->use_msg)
> + return 0;
> +
> + adapter->msg_pages = min(PVSCSI_MAX_NUM_PAGES_MSG_RING,
> + pvscsi_msg_ring_pages);
> + adapter->msg_ring = pci_alloc_consistent(adapter->dev,
> + adapter->msg_pages * PAGE_SIZE,
> + &adapter->msgRingPA);
> + if (!adapter->msg_ring)
> + return -ENOMEM;
> + BUG_ON(adapter->msgRingPA & ~PAGE_MASK);
> +
> + return 0;
> +}
> +
I understand the emulation etc. But I see that this function isn't allocating multiple rings right? Didn't see any performance benefits?
Chetan
--
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