Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751711Ab0BZFeo (ORCPT ); Fri, 26 Feb 2010 00:34:44 -0500 Received: from terminus.zytor.com ([198.137.202.10]:42599 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751453Ab0BZFem (ORCPT ); Fri, 26 Feb 2010 00:34:42 -0500 Message-ID: <4B875BBD.4060104@zytor.com> Date: Thu, 25 Feb 2010 21:27:25 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1 MIME-Version: 1.0 To: Borislav Petkov CC: Michal Marek , linux-kbuild , Peter Zijlstra , Andrew Morton , Wu Fengguang , LKML , Jamie Lokier , Roland Dreier , Al Viro , "linux-fsdevel@vger.kernel.org" , Ingo Molnar , Brian Gerst Subject: Re: [PATCH] x86: Add optimized popcnt variants References: <20100219164512.GA492@aftab> <4B7EC20C.30607@zytor.com> <20100222141737.GB21233@aftab> <4B82BD01.3030008@zytor.com> <20100222184945.GD21233@aftab> <4B82E144.1050007@zytor.com> <20100223155852.GF30382@aftab> <4B84118C.90203@zytor.com> <20100223175457.GA2401@aftab> <4B841BC3.1000908@zytor.com> <20100223190614.GB2401@aftab> In-Reply-To: <20100223190614.GB2401@aftab> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1127 Lines: 33 On 02/23/2010 11:06 AM, Borislav Petkov wrote: > > Ok, here you go. > > -- > From: Borislav Petkov > Date: Thu, 11 Feb 2010 00:48:31 +0100 > Subject: [PATCH] x86: Add optimized popcnt variants > > Add support for the hardware version of the Hamming weight function, > popcnt, present in CPUs which advertize it under CPUID, Function > 0x0000_0001_ECX[23]. On CPUs which don't support it, we fallback to the > default lib/hweight.c sw versions. > > A synthetic benchmark comparing popcnt with __sw_hweight64 showed almost > a 3x speedup on a F10h machine. > > Signed-off-by: Borislav Petkov OK, this patch looks pretty good now, but I'm completely lost as to what the baseline of this patch is supposed to be. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. -- 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/