From: MaoXiaoyun Subject: RE: RE: Rather slow time of Pin in Windows with GPL PVdriver Date: Mon, 14 Mar 2011 10:44:38 +0800 Message-ID: References: , , , , , <291EDFCB1E9E224A99088639C47620228E936E1A88@LONPMAILBOX01.citrite.net>, , <291EDFCB1E9E224A99088639C47620228E936E1A9A@LONPMAILBOX01.citrite.net>, , <291EDFCB1E9E224A99088639C47620228E936E1AA0@LONPMAILBOX01.citrite.net> , Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0470831926==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: James Harper , paul.durrant@citrix.com Cc: xen devel List-Id: xen-devel@lists.xenproject.org --===============0470831926== Content-Type: multipart/alternative; boundary="_0c596bce-3ec3-4156-af55-c3a1a862784e_" --_0c596bce-3ec3-4156-af55-c3a1a862784e_ Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Do you mean if we discard KeSetTargetProcessorDpc(&xi->rx_dpc, 0) , the i= nterrupts will be processed across on different VCPUS, but will cause serious perfo= rmance issue? Where could I find the releated docs? =20 So actually we need do KeSetImportanceDpc(&xi->rx_dpc, HighImportance) to= solve ping problem. Though performance is not the best, but it should not decr= ease, right? =20 many thanks. =20 > Subject: RE: [Xen-devel] RE: Rather slow time of Pin in Windows with G= PL PVdriver > Date: Mon, 14 Mar 2011 11:45:46 +1100 > From: james.harper@bendigoit.com.au > To: tinnycloud@hotmail.com; paul.durrant@citrix.com > CC: xen-devel@lists.xensource.com >=20 > >=20 > > I've just pushed a bit of a rewrite of the rx path in gplpv. It's not > > particularly well tested yet but I can't get it to crash. It should > scale much > > better with SMP too. I'm using more lock free data structures so the > lock's > > are held for much less time. > >=20 >=20 > Unfortunately performance still isn't good. What I've found is that NDI= S > really does want you to only process packets on one CPU at one time (eg > CPU0), otherwise they are indicated to NDIS out of order causing seriou= s > performance problems (according to the docs). >=20 > In addition to KeSetTargetProcessorDpc(&xi->rx_dpc, 0), we also need to > do KeSetImportanceDpc(&xi->rx_dpc, HighImportance) - as Paul stated, > which makes sure the DPC runs immediately even if it is triggered from > another CPU (I assume this has IPI overhead though). I think I could > detect >1 CPU's and schedule the rx and tx onto different CPU's to each > other, but always the same CPU. >=20 > Windows does support RSS which ensures per-connection in-order > processing of packets. From reading the "Receive-Side Scaling > Enhancements in Windows Server 2008" document, it appears that we would > need to hash various fields in the packet header and compute a CPU > number for that connection, then schedule the DPC onto that CPU. It > shouldn't be that hard except that xennet.sys is an NDIS5.1 driver, not > an NDIS6.0 driver, and in order to support NDIS6.0 I would need to > maintain two trees which I'm reluctant to do without a very good reason= . > Other docs state the RSS is supported for Windows 2003 SP2 but I can't > find any specifics - I've asked the question on the ntdev list. >=20 > James =20 --_0c596bce-3ec3-4156-af55-c3a1a862784e_ Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable Do you mean if we discard KeSetTargetProcessorDpc(&xi->rx_dpc, 0) = , the interrupts
will be processed across on different VCPUS, but will cause serious perfo= rmance issue?
Where could I find the releated docs?
 
So actually we need do KeSetImportanceDpc(&xi->rx_dpc, HighImporta= nce) to solve
ping problem.  Though performance is not the best, but it should not= decrease, right?
 
many thanks.
 
 > Subject: RE: [Xen-devel] RE: Rather slow time of Pin in Window= s with GPL PVdriver
> Date: Mon, 14 Mar 2011 11:45:46 +1100
>= From: james.harper@bendigoit.com.au
> To: tinnycloud@hotmail.com; = paul.durrant@citrix.com
> CC: xen-devel@lists.xensource.com
>=
> >
> > I've just pushed a bit of a rewrite of the r= x path in gplpv. It's not
> > particularly well tested yet but I= can't get it to crash. It should
> scale much
> > better = with SMP too. I'm using more lock free data structures so the
> loc= k's
> > are held for much less time.
> >
>
&= gt; Unfortunately performance still isn't good. What I've found is that N= DIS
> really does want you to only process packets on one CPU at on= e time (eg
> CPU0), otherwise they are indicated to NDIS out of ord= er causing serious
> performance problems (according to the docs).<= BR>>
> In addition to KeSetTargetProcessorDpc(&xi->rx_dpc, 0), we al= so need to
> do KeSetImportanceDpc(&xi->rx_dpc, HighImportan= ce) - as Paul stated,
> which makes sure the DPC runs immediately e= ven if it is triggered from
> another CPU (I assume this has IPI ov= erhead though). I think I could
> detect >1 CPU's and schedule t= he rx and tx onto different CPU's to each
> other, but always the s= ame CPU.
>
> Windows does support RSS which ensures per-connection in-order
&g= t; processing of packets. From reading the "Receive-Side Scaling
> = Enhancements in Windows Server 2008" document, it appears that we would> need to hash various fields in the packet header and compute a CPU=
> number for that connection, then schedule the DPC onto that CPU.= It
> shouldn't be that hard except that xennet.sys is an NDIS5.1 d= river, not
> an NDIS6.0 driver, and in order to support NDIS6.0 I w= ould need to
> maintain two trees which I'm reluctant to do without= a very good reason.
> Other docs state the RSS is supported for Wi= ndows 2003 SP2 but I can't
> find any specifics - I've asked the qu= estion on the ntdev list.
>
> James

--_0c596bce-3ec3-4156-af55-c3a1a862784e_-- --===============0470831926== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0470831926==--