Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp51759pxx; Wed, 28 Oct 2020 17:53:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwQSadPfIm02PH59pqro+lSqybowjWVXvLmpwVb2qCcC2rV7vveuMkpTBYU0ETd8Mq+/Fm X-Received: by 2002:a17:906:1494:: with SMTP id x20mr1618703ejc.339.1603932832910; Wed, 28 Oct 2020 17:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603932832; cv=none; d=google.com; s=arc-20160816; b=gjpm4InPaexALaaGu6gzp9w5yzfFUIwKxZqDqnulp5qdzIK4t0w3Ri4jd5mFGkQkkm IEZoK9UjlyhqogPHY3zDRhsLX9IwRrnBRFJ/L28lLZCknA+jh0y5jodzKVkkliBkzNR1 mAvsQJ8s4CTPFfnvsuaOHSUtqV6hHFQCY5uf44Koz/LDmBperTlWye5Pgl72S2SmZj/X lAjomyknMzhjDXh2TMD+5VOAvCAXWNsZczW0J/V4nWO0AiXlUutktYpXQvg8vyXMzbHr 5FrWtRBDhgkoZ//CvZ65MDLw3L0oouRHO5dvirYVJesLL5DG3bfLALNiKVIls+EX/gl0 qkvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=em9NSnSfYtBwnUrHbtl7Uc7Gjk0Lxoi5sqGFBDm80lk=; b=tIPbYkQkIKgorMTjEZ6vHNGc4h1FNcd9bEWOVsEfdcevJWn43jNrz9cqXtOR7w2C6u 4YluuDH0TAnCiI5jortgH4v2jl+5RZbgWkfbE2sxUBYshnJFvZA3fwnF5znJQGH/D9c1 GfPa8/i7kOS0Ua2kEJa+rSu5OS/OBr6q8J8QBqX+r37ISL8CShrn99HnH/rkaIykrrcY 1bwZlIGg+p4GivOEdmcI4U0cpVwWGz1koCibDGiNEQ47k5bXE5pJ+8NqasYwZI6rHSrY aWe3312KOautI+7Gnpo5jMQTNMyrQikDeX3KRklsnVYIux2QyoL69kosteWhow1b/yNy Fu9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eV+w4kBk; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j15si906798edl.207.2020.10.28.17.53.23; Wed, 28 Oct 2020 17:53:52 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eV+w4kBk; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726535AbgJ1VeM (ORCPT + 99 others); Wed, 28 Oct 2020 17:34:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50347 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726485AbgJ1VeI (ORCPT ); Wed, 28 Oct 2020 17:34:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603920845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=em9NSnSfYtBwnUrHbtl7Uc7Gjk0Lxoi5sqGFBDm80lk=; b=eV+w4kBkTfRwUuqd8AdCdesVcL8XE7A8V1j+u3WKrnMS3vEG6ISX0ugbjrsVYVIati+uEd pkhJ+mXYbH4udi+16f6tT1qLBALZU2D74shlxgFVjsuF4xi6LzCKTNzwC7pFj5PuqcbZlk q7yLIYKCNKP1Burb2SeNo1MbBUdzAvU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-370-pRc3BdCmPFGCt4Hves5fEg-1; Wed, 28 Oct 2020 11:32:24 -0400 X-MC-Unique: pRc3BdCmPFGCt4Hves5fEg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 98083E9003; Wed, 28 Oct 2020 15:32:22 +0000 (UTC) Received: from krava (unknown [10.40.192.64]) by smtp.corp.redhat.com (Postfix) with SMTP id A204760C04; Wed, 28 Oct 2020 15:32:20 +0000 (UTC) Date: Wed, 28 Oct 2020 16:32:19 +0100 From: Jiri Olsa To: Alexey Budankov Cc: Namhyung Kim , Arnaldo Carvalho de Melo , Alexander Shishkin , Adrian Hunter , Andi Kleen , Peter Zijlstra , Ingo Molnar , linux-kernel Subject: Re: [PATCH v2 00/15] Introduce threaded trace streaming for basic perf record operation Message-ID: <20201028153219.GL2900849@krava> References: <1ec29ed6-0047-d22f-630b-a7f5ccee96b4@linux.intel.com> <20201024154309.GA2589351@krava> <01bad2c4-4188-f5f5-452e-a0ea0672a187@linux.intel.com> <20201027121013.GE2900849@krava> <9c76b415-2610-14f8-37d4-461d0d5c078b@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 28, 2020 at 10:35:08AM +0300, Alexey Budankov wrote: > > On 28.10.2020 10:08, Namhyung Kim wrote: > > Hi, > > > > On Wed, Oct 28, 2020 at 1:02 AM Alexey Budankov > > wrote: > >> > >> > >> 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 > >> > >> It employs --threads mode only and there are no use cases > >> observed so far beyond this mode. Do you have or see such > >> use cases? > > > > I don't know about vtune and other users, but it's an important > > feature for better performance so I agree with Jiri's opinion to > > make it flexible for the system requirement. > > For sure, vtune is not the only one for this threaded streaming > and it should be well suited for perf tool use cases equally. > And for perf it would be beneficial to document some examples in > perf-record.txt as a part of this configuration implementation. > I am not just aware of such examples and that is why I am asking > you guys. I saw no LOST events on big servers for some tests with --threads=numa option, so there was no reason to spawn 200+ threads jirka