Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4211003imm; Mon, 17 Sep 2018 09:55:52 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda+nxPqwFUpwH47bGkAY7D0FUjQvacR7fljhD522dWsjXmWkkyo4Ufv1mHdjH9gHTn4Uewg X-Received: by 2002:a17:902:9a82:: with SMTP id w2-v6mr25941893plp.109.1537203352864; Mon, 17 Sep 2018 09:55:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537203352; cv=none; d=google.com; s=arc-20160816; b=jhQvJVG5kHeHgcQ0sdTgvxN7pvssk22TfX1J/4GBeoFpKntCFYO7ZxvL3W0XaqysQK J873ECh2sdzl6P91QNeuiMcQHp/teMIie7b8Bn/PX/RRkHhRkGqK/0DJd/NSAcqakqMI VymK9/NM8A1dwIzUMkw+aNfYNumDNhLY3GAJeE3fLObcpf4CiyLurtyZ6LP92fegsv9W +tJnwxkF2PVIPcEQqOHdCxfiyqNyMQXvLbM0vJANB4nV24Pv2ZGj6UCJuYNsq5tGLtiw dK/c6Y8fqe8w7wzc2XZD5wxNsyVu/x4XaY4y9xn6fMAMdOQ9CcWnqTT9Q1nVWmyPPpYC OlfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=TZlHH7tM9L3k3/OqE3FbUD5CZfEVuXOEOfr7QTnGm7U=; b=pTv0NiU+YLiohkGBjF4gt2ErQ6PM+OmTCjnON2X+Mn1Auh1aGnyo24idPESNjQiNtF f79X/rCiUy71SXy2lv1ZiVkN3+G1NroDsSChDgOWWt7xUyztNKG0/LwqP5fc1wGQSGMN 8K2JpkSlhj1fkdaQ2vWeI6P+1jjJNr1JlW2qiMiWbL65WQNYqHUzxGt3ZaZ+Zd3d2njc Rn17C3gYfMlCWbLLOT69vr+gpWVpw8tsu7Dl3cr2orvkDtr8oiGZGwMIQvQDjW/yR/Ch EFtrCI+za/kp3KU6V6htvU4aCVzZhu+TEQMxWlqlnHbp85W76cj+Bwj2+7syPYt7LkhR WVxw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7-v6si15550793plp.263.2018.09.17.09.55.37; Mon, 17 Sep 2018 09:55:52 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728809AbeIQWW0 (ORCPT + 99 others); Mon, 17 Sep 2018 18:22:26 -0400 Received: from mga04.intel.com ([192.55.52.120]:53081 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726795AbeIQWW0 (ORCPT ); Mon, 17 Sep 2018 18:22:26 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2018 09:54:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,386,1531810800"; d="scan'208";a="81132636" Received: from rchatre-mobl.amr.corp.intel.com (HELO [10.24.14.130]) ([10.24.14.130]) by FMSMGA003.fm.intel.com with ESMTP; 17 Sep 2018 09:54:14 -0700 Subject: Re: [PATCH V3 5/6] x86/intel_rdt: Use perf infrastructure for measurements To: Peter Zijlstra Cc: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com, mingo@redhat.com, acme@kernel.org, gavin.hindman@intel.com, jithu.joseph@intel.com, dave.hansen@intel.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org References: <20180917085848.GQ24124@hirez.programming.kicks-ass.net> From: Reinette Chatre Message-ID: Date: Mon, 17 Sep 2018 09:54:14 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180917085848.GQ24124@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On 9/17/2018 1:58 AM, Peter Zijlstra wrote: > On Tue, Sep 11, 2018 at 10:14:36AM -0700, Reinette Chatre wrote: >> +static int measure_l2_residency(void *_plr) >> +{ > >> + measure_residency_fn(&perf_miss_attr, &perf_hit_attr, plr, &counts); > >> +} >> + >> +static int measure_l3_residency(void *_plr) >> +{ > >> + measure_residency_fn(&perf_miss_attr, &perf_hit_attr, plr, &counts); > > Not sure it's important, but both sites loose the error return. > measure_l2_residency() as well as measure_l3_residency() are thread functions so this error does not propagate directly to the caller. Even so, by not exiting the thread here if measure_residency_fn() fails the tracepoints will be written with zeroes. If we exited here the tracepoints will not be written and the trace buffer will be empty when the user searches for the measurement data. Do you perhaps have an inclination to which a user would prefer? Reinette