Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp540749pxx; Wed, 28 Oct 2020 10:38:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6Mt7xYRJ/26pso4U9kMsLHL7k17W9jA4o2RpOMUfhBqqr7JKl47BGnsyhu4JEAh3qeDdo X-Received: by 2002:a17:906:8385:: with SMTP id p5mr170950ejx.538.1603906695538; Wed, 28 Oct 2020 10:38:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603906695; cv=none; d=google.com; s=arc-20160816; b=rxAsuwN+cloP4NKBEd7bNv4AQcl+M/+rBe3NnHeLjATPGGGCVnz0aZwWR51FCZ/pYn DfNO0/2KJ5NJ9/CNvjbbr8fnl67mTMm/Q5FwSKqgMCQenVAFbVv5T1NHfWvG+mLf825Z b/UmY2wffeDjIIvqQSuM4k5q+VSRqsJ+zT+sti/VOCtD/jIepRDqeqP3AfBw3bDE4fma oPoTjupU6biBghNMDq5ZQqhuIRwrwVci+gaOYCAj86GkaItqTAYfn9QPn8Afp9FuDkwG Zr4LIMv/eAUKMwYxo+8bf1t3Jsj1IWvYBs82eFyeOKkWR4vC56JWX4MCYUK0+WXUMkuj COEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence: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=5m3MgRMPBQhMzP+62uRAIx2Naplp90WQ1FTt6pE8yI0=; b=YGM1kvRdBTB+JJL6WAsMvxful16HINSa7bODGjUy8cYMv54zDJ4aS8r//H19QncvzC 2qMRtUAdCJd0yMR1f93SD8P3AzKDCeX0eNxyzue8vH/WGORBGABtYXY9Hkmm6nh49Bqg A5k/YCs/tbRwyX5qQ/N73RvstTlohb7LKsVoMk5nwEJVsRpexRa6fau4Wx0SGxCN94S4 HOn4R3xxRyorhaD6K2lqB2CaotFuGk7Uc9M7hlhY2KFpzumhSolRrqQW54qZh6qwwxKA BK/r+HYID0MmZ3j90MPW+ZlRr19qngtvMIwMCdr44Rui15FzyU8cQg9Gy27f/utd/15g FuaQ== 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 d23si26051edr.183.2020.10.28.10.37.51; Wed, 28 Oct 2020 10:38:15 -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 S1822245AbgJ0Rs3 (ORCPT + 99 others); Tue, 27 Oct 2020 13:48:29 -0400 Received: from mga18.intel.com ([134.134.136.126]:19011 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2901794AbgJ0O0a (ORCPT ); Tue, 27 Oct 2020 10:26:30 -0400 IronPort-SDR: xROMfIoEN3JqlZOamORHsl4Q+/s2fTCvl5l81KLDb6l/QavCLZK7vHtyePY0TCRwkilxTGsftr +pzKX9dfm76A== X-IronPort-AV: E=McAfee;i="6000,8403,9786"; a="155867380" X-IronPort-AV: E=Sophos;i="5.77,424,1596524400"; d="scan'208";a="155867380" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 07:26:28 -0700 IronPort-SDR: 3VNI4NRSBDWHp8nQBfs/B/8vJs2jkonqlfs51gP36eNdtj4GgHKhavP7gY55qKOaYs5zeu0n6W +n+P7cASaUiw== X-IronPort-AV: E=Sophos;i="5.77,424,1596524400"; d="scan'208";a="535814770" Received: from abudanko-mobl.ccr.corp.intel.com (HELO [10.249.227.194]) ([10.249.227.194]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 07:26:25 -0700 Subject: Re: [PATCH v2 00/15] Introduce threaded trace streaming for basic perf record operation To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Adrian Hunter , Andi Kleen , Peter Zijlstra , Ingo Molnar , linux-kernel References: <1ec29ed6-0047-d22f-630b-a7f5ccee96b4@linux.intel.com> <20201024154309.GA2589351@krava> <01bad2c4-4188-f5f5-452e-a0ea0672a187@linux.intel.com> <20201027121013.GE2900849@krava> From: Alexey Budankov Organization: Intel Corp. Message-ID: <6c75bf86-5f41-49dc-bbeb-20502ecba62a@linux.intel.com> Date: Tue, 27 Oct 2020 17:26:23 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201027121013.GE2900849@krava> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27.10.2020 15:10, Jiri Olsa wrote: > On Mon, Oct 26, 2020 at 08:59:01PM +0300, Alexey Budankov wrote: >> >> On 24.10.2020 18:43, Jiri Olsa wrote: >>> On Wed, Oct 21, 2020 at 06:52:43PM +0300, Alexey Budankov wrote: >>>> >>>> Changes in v2: >>>> - explicitly added credit tags to patches 6/15 and 15/15, >>>> additionally to cites [1], [2] >>>> - updated description of 3/15 to explicitly mention the reason >>>> to open data directories in read access mode (e.g. for perf report) >>>> - implemented fix for compilation error of 2/15 >>>> - explicitly elaborated on found issues to be resolved for >>>> threaded AUX trace capture >>>> >>>> v1: https://lore.kernel.org/lkml/810f3a69-0004-9dff-a911-b7ff97220ae0@linux.intel.com/ >>>> >>>> Patch set provides threaded trace streaming for base perf record >>>> operation. Provided streaming mode (--threads) mitigates profiling >>>> data losses and resolves scalability issues of serial and asynchronous >>>> (--aio) trace streaming modes on multicore server systems. The patch >>>> set is based on the prototype [1], [2] and the most closely relates >>>> to mode 3) "mode that creates thread for every monitored memory map". >>> >>> so what I liked about the previous code was that you could >>> configure how the threads would be created >>> >>> default --threads options created thread for each cpu like >>> in your change: >>> >>> $ perf record -v --threads ... >>> ... >>> thread 0 monitor: 0 allowed: 0 >>> thread 1 monitor: 1 allowed: 1 >>> thread 2 monitor: 2 allowed: 2 >>> thread 3 monitor: 3 allowed: 3 >>> thread 4 monitor: 4 allowed: 4 >>> thread 5 monitor: 5 allowed: 5 >>> thread 6 monitor: 6 allowed: 6 >>> thread 7 monitor: 7 allowed: 7 >> >> Yes, it is configurable in the prototype. Even though this patch set >> doesn't implement that parameters for --thread option, just because >> VTune doesn't have use cases for that yet, it has still been designed >> and implemented with that possible extension in mind so it could then >> be easily added on top of it. > > I'm not sure about vtune extensions, but if we are going to > have --threads option I believe we should make it configurable > at least to the extend descibed below vtune employs --threads mode only and there are no use cases observed so far beyond this mode. Do you have such use cases? Alexei > > jirka > >> >>> >>> >>> then numa based: >>> >>> $ perf record -v --threads=numa ... >>> ... >>> thread 0 monitor: 0-5,12-17 allowed: 0-5,12-17 >>> thread 1 monitor: 6-11,18-23 allowed: 6-11,18-23 >>> >>> >>> socket based: >>> >>> $ perf record -v --threads=socket ... >>> ... >>> thread 0 monitor: 0-7 allowed: 0-7 >>> >>> >>> core based: >>> >>> $ perf record -v --threads=core ... >>> ... >>> thread 0 monitor: 0,4 allowed: 0,4 >>> thread 1 monitor: 1,5 allowed: 1,5 >>> thread 2 monitor: 2,6 allowed: 2,6 >>> thread 3 monitor: 3,7 allowed: 3,7 >>> >>> >>> and user configurable: >>> >>> $ perf record -v --threads=0-3/0:4-7/4 ... >>> ... >>> threads: 0. monitor 0-3, allowed 0 >>> threads: 1. monitor 4-7, allowed 4 >>> >>> >>> so this way you could easily pin threads to cpu/core/socket/numa, >>> or to some other cpu of your choice, because this will be always >>> game of try and check where I'm not getting LOST events and not >>> creating 1000 threads >>> >>> perf record: Add support for threads numa option value >>> perf record: Add support for threads socket option value >>> perf record: Add support for threads core option value >>> perf record: Add support for threads user option value >> >> Makes sense. >> >> Alexei >> >