Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754286Ab3JMMx5 (ORCPT ); Sun, 13 Oct 2013 08:53:57 -0400 Received: from charlotte.tuxdriver.com ([70.61.120.58]:43540 "EHLO smtp.tuxdriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751165Ab3JMMx4 (ORCPT ); Sun, 13 Oct 2013 08:53:56 -0400 Date: Sun, 13 Oct 2013 08:53:44 -0400 From: Neil Horman To: "H. Peter Anvin" Cc: linux-kernel@vger.kernel.org, sebastien.dugue@bull.net, Thomas Gleixner , Ingo Molnar , x86@kernel.org Subject: Re: [PATCH] x86: Run checksumming in parallel accross multiple alu's Message-ID: <20131013125344.GC9286@neilslaptop.think-freely.org> References: <1381510298-20572-1-git-send-email-nhorman@tuxdriver.com> <5259CD44.2000200@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5259CD44.2000200@zytor.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -2.9 (--) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1386 Lines: 30 On Sat, Oct 12, 2013 at 03:29:24PM -0700, H. Peter Anvin wrote: > On 10/11/2013 09:51 AM, Neil Horman wrote: > > S?bastien Dugu? reported to me that devices implementing ipoib (which don't have > > checksum offload hardware were spending a significant amount of time computing > > checksums. We found that by splitting the checksum computation into two > > separate streams, each skipping successive elements of the buffer being summed, > > we could parallelize the checksum operation accros multiple alus. Since neither > > chain is dependent on the result of the other, we get a speedup in execution (on > > hardware that has multiple alu's available, which is almost ubiquitous on x86), > > and only a negligible decrease on hardware that has only a single alu (an extra > > addition is introduced). Since addition in commutative, the result is the same, > > only faster > > On hardware that implement ADCX/ADOX then you should also be able to > have additional streams interleaved since those instructions allow for > dual carry chains. > Ok, thats a good idea, I'll look into those instructions this week Neil > -hpa > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/