From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752683AbbE1ENs (ORCPT ); Thu, 28 May 2015 00:13:48 -0400 Received: from mga14.intel.com ([192.55.52.115]:32582 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751827AbbE1ENV (ORCPT ); Thu, 28 May 2015 00:13:21 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,510,1427785200"; d="scan'208";a="499231714" From: Andi Kleen To: peterz@infradead.org Cc: acme@kernel.org, linux-kernel@vger.kernel.org, jolsa@redhat.com, eranian@google.com Subject: Date: Wed, 27 May 2015 21:13:13 -0700 Message-Id: <1432786398-23861-1-git-send-email-andi@firstfloor.org> X-Mailer: git-send-email 2.1.0 perf: Optimize call stack mode on Skylake Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Repost; I forgot to copy linux-kernel earlier. Apologies if you see it twice.] Skylake moved to 32 Last Branch Records, from previously 16. The current call stack LBR implementation reads all LBRs and also saves/restores them on context switch. This patchkit adds some optimizations to avoid extra costs in most cases from the larger number of LBRs for call-stack, unless a nesting larger than 16 is actually needed. It applies on top of the earlier Skylake code. Some of the optimization will also benefit earlier CPUs, such as Haswell. note: one patch is for perf user space, the rest is kernel. -Andi