From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753547AbcHRDzJ (ORCPT ); Wed, 17 Aug 2016 23:55:09 -0400 Received: from mga14.intel.com ([192.55.52.115]:10436 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753542AbcHRDzH (ORCPT ); Wed, 17 Aug 2016 23:55:07 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,537,1464678000"; d="scan'208";a="1043208095" From: "Huang\, Ying" To: Borislav Petkov Cc: "Huang\, Ying" , "H. Peter Anvin" , Denys Vlasenko , Peter Zijlstra , Brian Gerst , LKML , Andy Lutomirski , , Thomas Gleixner , Linus Torvalds , Ingo Molnar , Ville =?utf-8?B?U3lyasOkbMOk?= Subject: Re: [LKP] [lkp] [x86/hweight] 65ea11ec6a: will-it-scale.per_process_ops 9.3% improvement References: <20160816142642.GA24206@yexl-desktop> <9FF32F53-5EF8-40D4-B696-A30FDF7201E1@zytor.com> <20160816171635.GA10542@nazgul.tnic> <796A2A72-06B7-4B3D-AA38-DF558FC75857@zytor.com> <20160817054605.GA6728@nazgul.tnic> <87r39n58sv.fsf@yhuang-mobile.sh.intel.com> <20160818034513.GA21415@nazgul.tnic> Date: Wed, 17 Aug 2016 20:54:11 -0700 In-Reply-To: <20160818034513.GA21415@nazgul.tnic> (Borislav Petkov's message of "Thu, 18 Aug 2016 05:45:13 +0200") Message-ID: <877fbespek.fsf@yhuang-mobile.sh.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Borislav Petkov writes: > On Wed, Aug 17, 2016 at 03:29:04PM -0700, Huang, Ying wrote: >> branch-miss-rate decreased from ~0.30% to ~0.043%. >> >> So I guess there are some code alignment change, which caused decreased >> branch miss rate. > > Hrrm, I still can't imagine how that would happen if the machine > supports POPCNT and we never call the __sw_hweight* variants. Or does > it? > > Can you paste /proc/cpuinfo from that Sandy Bridge-EP box? Here it is. processor : 31 vendor_id : GenuineIntel cpu family : 6 model : 45 model name : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz stepping : 6 microcode : 0x603 cpu MHz : 3158.129 cache size : 20480 KB physical id : 1 siblings : 16 core id : 7 cpu cores : 8 apicid : 47 initial apicid : 47 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts bugs : bogomips : 5392.85 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: Best Regards, Huang, Ying