Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp803247ybh; Mon, 13 Jul 2020 01:19:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJi59nP7ifHZwRvi66x3ag3pg3i+NQxKzvc76r7OOKPuIshrjklB3ldrMIV+d0RSsBhP/0 X-Received: by 2002:a17:906:da19:: with SMTP id fi25mr71923307ejb.369.1594628389522; Mon, 13 Jul 2020 01:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594628389; cv=none; d=google.com; s=arc-20160816; b=Zh9U69mCp2kPHEsDf51Idwh4FQsd548wK9LxN+Pr7gYKmbjQgzvjudtQ+jcarXWsej QwTJJ3bcXBm52Sq4tf8F/UR0wgPCLHeitfWNAWKQU9oBft9K5LMYpj2kAX8p6vCxsR88 ioCrtkKaXLf82lnZiqq9whVPPJ1JXO0sX2iwTwMU/oKHz1uxsVJSy5LulkAvAYYGKQP8 h+GItAB3X1L6H/GwW3BwAM9c670T63EnLXqbyuJmzPpgStP7erPY7HiuhaJm20e/q1w9 JUmkQdHKB1rCTd4C0IIFIHCCoogFT9QW3Ep0TPopvdSHr6Bp0FV+Oqb/Iq77uwX9DsKr cmsA== 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:organization:from:references:cc:to:subject:ironport-sdr :ironport-sdr; bh=qhlfv2azxYErRZww/ruXP3yCQxxKaFyUmjAcByvXTFE=; b=uLAfk5/5g8tjAhzqdsSO8TQf6JjhJaCFZm2G16nqQFD2U2DOvIT0KHnT96Uc4x4rpj C40N6Om/GwYubsadP9Tj8aDT6Ahm5KtdspKTnFCoMiq0qKtjSB/DCDzsSbnKBm7bUWdA A6e0hDAVzD4pdmWe5ddq4R7jdsQBc2JNHddp57EEFRk46ml9g6LXq6rQsvRYL5D8pAVk AYtj/jEOfCD402lS+7rj+lk5oMYAFcpVQ3jv5JV3TmeRTRliYZ2OnPnlGS7vAXaB5uh3 vwXwwneNt66ctnSoTw9VfH3efjo3+YmngRHogs8DmmzPLPQ7hJLNLd93hXG1RKYJW9YD +fVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id r12si8476167ejz.398.2020.07.13.01.19.26; Mon, 13 Jul 2020 01:19:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727035AbgGMIQM (ORCPT + 99 others); Mon, 13 Jul 2020 04:16:12 -0400 Received: from mga07.intel.com ([134.134.136.100]:44345 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726077AbgGMIQM (ORCPT ); Mon, 13 Jul 2020 04:16:12 -0400 IronPort-SDR: ECD8d+6VRERVz1NexPRZLAD16cqy0DLQfBe3yBgY8lt1YIdTHViZQs3MDURNGkXxKe684enxaR QyJ+hk5S46YA== X-IronPort-AV: E=McAfee;i="6000,8403,9680"; a="213412198" X-IronPort-AV: E=Sophos;i="5.75,346,1589266800"; d="scan'208";a="213412198" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2020 01:16:11 -0700 IronPort-SDR: W0/N1s0QOrFeETf1Nu+GSGKpwp7WPsF7Kg8kkCMvvHqU/8uN4iZ6YsxgiZY1oeB8A8vM2KRCSC uWVo3KQ3dYfQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,346,1589266800"; d="scan'208";a="325431342" Received: from linux.intel.com ([10.54.29.200]) by orsmga007.jf.intel.com with ESMTP; 13 Jul 2020 01:16:11 -0700 Received: from [10.249.229.49] (abudanko-mobl.ccr.corp.intel.com [10.249.229.49]) by linux.intel.com (Postfix) with ESMTP id 981DE580810; Mon, 13 Jul 2020 01:16:08 -0700 (PDT) Subject: Re: [PATCH v10 04/15] perf evlist: introduce control file descriptors To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel References: <4af50c95-36f6-7a61-5a22-2949970fe7a5@linux.intel.com> <92aa73c7-4148-a45d-6964-983fe1654d1e@linux.intel.com> From: Alexey Budankov Organization: Intel Corp. Message-ID: <823145dc-f293-166e-290b-076c1254fe17@linux.intel.com> Date: Mon, 13 Jul 2020 11:16:06 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: 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 On 13.07.2020 6:13, Namhyung Kim wrote: > Hello, > > On Wed, Jul 8, 2020 at 4:47 PM Alexey Budankov > wrote: >> >> >> Define and initialize control file descriptors. >> >> Signed-off-by: Alexey Budankov >> --- >> tools/perf/util/evlist.c | 3 +++ >> tools/perf/util/evlist.h | 5 +++++ >> 2 files changed, 8 insertions(+) >> >> diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c >> index bcbe0cb8482e..36eb50aba1f5 100644 >> --- a/tools/perf/util/evlist.c >> +++ b/tools/perf/util/evlist.c >> @@ -63,6 +63,9 @@ void evlist__init(struct evlist *evlist, struct perf_cpu_map *cpus, >> perf_evlist__set_maps(&evlist->core, cpus, threads); >> evlist->workload.pid = -1; >> evlist->bkw_mmap_state = BKW_MMAP_NOTREADY; >> + evlist->ctl_fd.fd = -1; >> + evlist->ctl_fd.ack = -1; >> + evlist->ctl_fd.pos = -1; >> } >> >> struct evlist *evlist__new(void) >> diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h >> index 38901c0d1599..2caf19fb87a8 100644 >> --- a/tools/perf/util/evlist.h >> +++ b/tools/perf/util/evlist.h >> @@ -74,6 +74,11 @@ struct evlist { >> pthread_t th; >> volatile int done; >> } thread; >> + struct { >> + int fd; >> + int ack; >> + int pos; >> + } ctl_fd; > > Could you please add brief descriptions for each field > in the comment? It's not obvious to me other than fd. Ok. In v11. Alexei