From: "James Harper" Subject: RE: more profiling Date: Mon, 3 Mar 2008 14:47:47 +1100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Content-class: urn:content-classes:message 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: "Santos, Jose Renato G" , Andy Grover Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > In my experiments I also see overheads on issuing and revoking > grants due to the use of atomic operations, but these are > much less expensive than copying an entire packet as you > do on the TX path. I am surprised with your results. > Can you give more details about your configuration and how you > are comparing the cost of copy versus issuing grants on TX. I think you are right in saying that the issuing and revoking of grants is due to the use of atomic operations. Having looked into it some more, it looks like KeAcquireSpinlock (the windows lock operation) is fairly expensive. Under windows, it is the code that gets the next free ref that is protected by spinlocks. I believe that if we only get the ref once, but then reuse that ref over and over, then we'd get a lot better performace. James