From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755321AbbG3KnW (ORCPT ); Thu, 30 Jul 2015 06:43:22 -0400 Received: from casper.infradead.org ([85.118.1.10]:54183 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755139AbbG3KnV (ORCPT ); Thu, 30 Jul 2015 06:43:21 -0400 Date: Thu, 30 Jul 2015 12:43:10 +0200 From: Peter Zijlstra To: Alexander Shishkin Cc: Ingo Molnar , linux-kernel@vger.kernel.org, adrian.hunter@intel.com, x86@kernel.org, hpa@zytor.com, acme@infradead.org Subject: Re: [PATCH 2/3] perf/x86/intel/pt: Add an option to not force PSB+ on every schedule-in Message-ID: <20150730104310.GW19282@twins.programming.kicks-ass.net> References: <1437140050-23363-1-git-send-email-alexander.shishkin@linux.intel.com> <1437140050-23363-3-git-send-email-alexander.shishkin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437140050-23363-3-git-send-email-alexander.shishkin@linux.intel.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 17, 2015 at 04:34:09PM +0300, Alexander Shishkin wrote: > Currently, the PT driver zeroes out the status register every time before > starting the event. However, all the writable bits are already taken care > of in pt_handle_status() function, except the new PacketByteCnt field, > which in new versions of PT contains the number of packet bytes written > since the last sync (PSB) packet. Zeroing it out before enabling PT forces > a sync packet to be written. This means that, with the existing code, a > sync packet (PSB and PSBEND, 18 bytes in total) will be generated every > time a PT event is scheduled in. > > To avoid these unnecessary syncs and save a WRMSR in the fast path, this > patch adds a new attribute config bit "no_force_psb", which will disable > this zeroing WRMSR. Why is this exposed?