From: Alok Kataria <akataria@vmware.com>
To: "Chetan.Loke@Emulex.Com" <Chetan.Loke@Emulex.Com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
Dmitry Torokhov <dtor@vmware.com>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>,
"robert.w.love@intel.com" <robert.w.love@intel.com>,
"randy.dunlap@oracle.com" <randy.dunlap@oracle.com>,
"michaelc@cs.wisc.edu" <michaelc@cs.wisc.edu>
Subject: RE: [PATCH] SCSI driver for VMware's virtual HBA.
Date: Fri, 28 Aug 2009 15:30:56 -0700 [thread overview]
Message-ID: <1251498656.25584.7.camel@ank32.eng.vmware.com> (raw)
In-Reply-To: <412A05BA40734D4887DBC67661F433080FF71D16@EXMAIL.ad.emulex.com>
Hi Chetan,
On Fri, 2009-08-28 at 14:18 -0700, Chetan.Loke@Emulex.Com wrote:
> 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?
>
The function is allocating multiple rings, actually 2 of them for the
IO path, request and completion rings (req_ring, cmp_ring).
Let me know if you were asking something else.
Thanks,
Alok
>
>
> Chetan
>
>
>
>
next prev parent reply other threads:[~2009-08-28 22:30 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-27 23:17 [PATCH] SCSI driver for VMware's virtual HBA Alok Kataria
2009-08-28 6:03 ` Rolf Eike Beer
2009-08-31 17:26 ` Alok Kataria
2009-08-31 18:51 ` Rolf Eike Beer
2009-08-31 21:54 ` Alok Kataria
2009-08-28 21:18 ` Chetan.Loke
2009-08-28 22:30 ` Alok Kataria [this message]
2009-08-29 12:04 ` Chetan.Loke
2009-08-31 22:35 ` Alok Kataria
2009-08-31 17:28 ` Alok Kataria
2009-08-31 18:00 ` James Bottomley
2009-08-31 21:53 ` Alok Kataria
2009-09-01 14:23 ` James Bottomley
2009-09-01 16:08 ` Alok Kataria
2009-09-01 16:08 ` Alok Kataria
2009-09-01 16:13 ` Matthew Wilcox
2009-09-01 16:20 ` Boaz Harrosh
2009-09-01 16:47 ` Alok Kataria
2009-09-01 14:26 ` James Bottomley
2009-09-01 11:12 ` Bart Van Assche
2009-09-01 14:17 ` James Bottomley
2009-09-01 16:12 ` Roland Dreier
2009-09-01 16:16 ` Matthew Wilcox
2009-09-01 16:33 ` Dmitry Torokhov
2009-09-01 16:52 ` James Bottomley
2009-09-01 16:59 ` Alok Kataria
2009-09-01 17:25 ` James Bottomley
2009-09-01 17:41 ` Alok Kataria
2009-09-01 18:15 ` James Bottomley
2009-09-02 2:55 ` Alok Kataria
2009-09-02 15:06 ` James Bottomley
2009-09-02 17:16 ` Alok Kataria
2009-09-03 20:03 ` James Bottomley
2009-09-03 20:31 ` Dmitry Torokhov
2009-09-03 21:21 ` Ric Wheeler
2009-09-03 21:41 ` Dmitry Torokhov
2009-09-04 3:28 ` Alok Kataria
2009-09-01 17:25 ` Roland Dreier
2009-09-01 17:25 ` Roland Dreier
2009-09-01 17:40 ` James Bottomley
2009-09-01 17:54 ` Alok Kataria
2009-09-01 18:38 ` Christoph Hellwig
2009-09-02 9:50 ` Bart Van Assche
2009-09-01 16:34 ` Bart Van Assche
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=1251498656.25584.7.camel@ank32.eng.vmware.com \
--to=akataria@vmware.com \
--cc=Chetan.Loke@Emulex.Com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=dtor@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=randy.dunlap@oracle.com \
--cc=robert.w.love@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.