From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755964Ab2ECJQp (ORCPT ); Thu, 3 May 2012 05:16:45 -0400 Received: from mga02.intel.com ([134.134.136.20]:49275 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752191Ab2ECJQn (ORCPT ); Thu, 3 May 2012 05:16:43 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.67,352,1309762800"; d="scan'208";a="136509374" Message-ID: <4FA24CA7.2070107@intel.com> Date: Thu, 03 May 2012 17:15:19 +0800 From: Alex Shi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111229 Thunderbird/9.0 MIME-Version: 1.0 To: Borislav Petkov CC: andi.kleen@intel.com, tim.c.chen@linux.intel.com, jeremy@goop.org, chrisw@sous-sol.org, akataria@vmware.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, rostedt@goodmis.org, fweisbec@gmail.com, riel@redhat.com, luto@mit.edu, avi@redhat.com, len.brown@intel.com, paul.gortmaker@windriver.com, dhowells@redhat.com, fenghua.yu@intel.com, yinghai@kernel.org, cpw@sgi.com, steiner@sgi.com, linux-kernel@vger.kernel.org, yongjie.ren@intel.com Subject: Re: [PATCH 2/3] x86/flush_tlb: try flush_tlb_single one by one in flush_tlb_range References: <1335603099-2624-1-git-send-email-alex.shi@intel.com> <1335603099-2624-3-git-send-email-alex.shi@intel.com> <20120430105440.GC9303@aftab.osrc.amd.com> <4FA0FD39.9060908@intel.com> <20120502093815.GB12914@aftab.osrc.amd.com> <4FA11CC7.5040302@intel.com> <20120502134441.GF12914@aftab.osrc.amd.com> In-Reply-To: <20120502134441.GF12914@aftab.osrc.amd.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/02/2012 09:44 PM, Borislav Petkov wrote: > On Wed, May 02, 2012 at 07:38:47PM +0800, Alex Shi wrote: >>> Are you saying you want to have this setting per family? >> >> Set it according to CPU type is more precise, but looks ugly. > > By "CPU type" do you mean microarchitecture here? Yes. > >> I am wondering if it worth to do. Maybe conservative selection is >> acceptable? > > Well, as I said earlier, I'd run it on a couple of different machines > and make FLUSHALL_BAR configurable from userspace - this way you have > real, solid data instead of guessing the exact number. Consider different CPU type has different balance point, I has another patch will add a interface for tuning. > >>> Also, have you run your patches with other benchmarks beside your >>> microbenchmark, say kernbench, SPEC, i.e. some other >>> multithreaded benchmark touching shared memory? Are you seeing any >>> improvement there? >> >> I tested oltp reading and specjbb2005 with openjdk. They should not much >> flush_tlb_range calling. So, no clear improvement. >> Do you know benchmarks which cause enough flush_tlb_range? > > Not really. Probably get a couple of benchmarks and count > flush_tlb_range calls with trace_printk or perf probe? :-) perf probe is enough. :)