Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp695446img; Wed, 20 Mar 2019 08:59:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtWXJjwpkIk5Bdu79Bainwm9yc2FuPmJgNbwyMpHxb68CcoENKyAvnQXpI2yQ69yHgbX7T X-Received: by 2002:a17:902:bb0c:: with SMTP id l12mr8821185pls.108.1553097560909; Wed, 20 Mar 2019 08:59:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553097560; cv=none; d=google.com; s=arc-20160816; b=xaVmvH9caZ4qqzv0u17AeeCIIIPdVmFbAlLg2reebEj2ZoWYhpiQwHEdLw51IqPQ91 QJlr7Zkqj6RHs2GlNYZ63/Y8qrwbxhBtQFXbFNG5NurQsw62zQhByRm232uMuBX4wqHR Iwof+JqL+YM6or13E/E38MY94/Oc14LtvroojbnTYxk5cdthkyN0ExKNBNxgwG80g0ni b4COMs5C8k++qADXFU2vnYUCpP+T3c/n3u5jkMvcYNeMYXguLZ2pbvovK5/PNm0PB2by emoez40rVLocynVCp76EadCcBOOMIB7bxuXxDCBHsRq7oZUDeBB/3TEbFrlAnVNGpFEl StlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5g9pViXNY7nvZ81dpyxLzpfjmEIOF3XIHU7e+zT5Mv0=; b=XdR+keM3YLPQ17/4c1stMULXAN2TvIIK3cQZRen5Ie8jEz1+a3T/uouRoWyiwK5V7t 42BQYvx3aZz0cbAhQDGrO2nToDZfZAGIQjuXmUFfkiYRxn/CrBIrOJ5MTF5u2U+XFWEX fauo8X3bqefkbFy1xPy+1BH4UE+pETBowSu4Wbh1b4Mb071RAa+mW2618s//uEwgdNKN bh742W/ftft5ZV5CEXBsgmi6pMdeJGkRSkroNy9AjzmI4/h35Qk3BHndV3ljKwKQdx5Q yNFx0/NxU6H+IEEanoyxQysMCjkvuARWaZjTQ2L4tSwDvFZ0Cs80cgXtQzvQCABh/fci T2kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=lBlhaYbX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s11si2068865plp.326.2019.03.20.08.59.05; Wed, 20 Mar 2019 08:59:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=lBlhaYbX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726980AbfCTP6W (ORCPT + 99 others); Wed, 20 Mar 2019 11:58:22 -0400 Received: from merlin.infradead.org ([205.233.59.134]:52486 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbfCTP6W (ORCPT ); Wed, 20 Mar 2019 11:58:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=5g9pViXNY7nvZ81dpyxLzpfjmEIOF3XIHU7e+zT5Mv0=; b=lBlhaYbX6cripVhlxSqE0OMQf xNuBhITN2Rh7W2zm25DQNm1rpCZqazCq7lO/LSnpk4WNWlCjP7m4csMBAkHG4E4Cca5D9tp7E7fCZ AUdb2dS9P9S5atYiR0A4si4bezKwOv6eVEpKPz+vSoIFlAQ19S8v2ubE509vVdfGnLBeNOydPR905 9OuMzFg+hYx0YOvnwjRGxyjzcrEQtvweIVBkYEeAu/Jx4iXDOLY2S56AQOhimqlhS21bzNYavZdfA R4xKLSDoz/EL5guuPGIqZtC2Hwf6QBYEFuQv7LHbglcD45xMPV/GBjKB3LAD1TLJadyY7gC3grZ1n AbuDHTyiw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6dbc-0004In-Fo; Wed, 20 Mar 2019 15:58:16 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 41E7D2391A9A2; Wed, 20 Mar 2019 16:58:15 +0100 (CET) Date: Wed, 20 Mar 2019 16:58:15 +0100 From: Peter Zijlstra To: Andi Kleen Cc: kan.liang@linux.intel.com, acme@kernel.org, mingo@redhat.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, jolsa@kernel.org, eranian@google.com, alexander.shishkin@linux.intel.com Subject: Re: [PATCH 03/22] perf/x86/intel: Support adaptive PEBSv4 Message-ID: <20190320155815.GI6058@hirez.programming.kicks-ass.net> References: <20190318214144.4639-1-kan.liang@linux.intel.com> <20190318214144.4639-4-kan.liang@linux.intel.com> <20190319144748.GH5996@hirez.programming.kicks-ass.net> <20190319213824.GY24002@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190319213824.GY24002@tassilo.jf.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 19, 2019 at 02:38:24PM -0700, Andi Kleen wrote: > > How much work would intel_pmu_drain_pebs_icl() be? > > > > I'm thinking that might not be terrible. > > I had it in an early version of the code, but it ended up with a lot > of code duplication. I'm thinking that if you remove all the