Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp116536pxx; Mon, 26 Oct 2020 04:52:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAsqxpO5Rh16/yojYsEtfSh6ZIVasXl+rPkHsNs6M7MNGt+/gBgO1Qy7EbwJ5yZfxkLyUk X-Received: by 2002:aa7:db07:: with SMTP id t7mr15750325eds.161.1603713175010; Mon, 26 Oct 2020 04:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603713175; cv=none; d=google.com; s=arc-20160816; b=BfbQx3zbE2U5yENBBL0VKKgWqehmGbH+faEIIW12otaWW+hSP3dRLEFxZIBwu0I/B3 kxT3hXfDYxDY+qn54xmOkDCOf71WGleECe0vJg2q0t7+jVSVeqbAzRBEGV2e+9tYd5Vc L1Q3KHGmm4wkmLOM4FIWREjoFdIUf2E5sk+IDSUuVteo5LpyEubPaZfbPEtWUrJouVCa Azde4UFCx1mS2uJSwKTuQczw7bmvN+xlD5uLFXtMKVyAiLuIyAlrnyruAuorgDPtMMpM 3rhVSK+cu93gh+TBbItRjPf42lN85Lj/pTjMxCuRA+5C66BEZpKX7UHdDpkGLcX1FzKq +97g== 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:dkim-signature; bh=d5qVxbniITl5BClK9FgemM6r+Xx7WYyuIWPQHG6BtwM=; b=Mf5QvTtzmInis6WBuukBf1OuN/qz7aBfQH838lnD+OewYSOf8cW4cB3BtJCMqfJfM8 fRfBnovbgXDE3IlVd2pzI2iYNUAoG9s/3HMgQNBWPQKSbm3pKxYTTMSaQX8hkJg6y/ue V/SKgSk4MuUZ8A18hmi4y8y55WpiUP+Z/WOoy7lM96o552sZmyaoY+B5AiRzYKyJjzei dTShTpXI77wyUtbv0i0tSy4KvA4QNW3J7/msMc1Zw2J97jOmppYcUScka9FRifNjpNWx d+hL3S+Fai3Zc9qT/SoEppCVcQEIUVqHZsFyDI67SLvEMQtJyQRKPRph2PbGJh13+oBO J12A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lvVo449g; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du13si4353764ejc.60.2020.10.26.04.52.32; Mon, 26 Oct 2020 04:52:54 -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=@gmail.com header.s=20161025 header.b=lvVo449g; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1772244AbgJZIw0 (ORCPT + 99 others); Mon, 26 Oct 2020 04:52:26 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:43680 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1772240AbgJZIw0 (ORCPT ); Mon, 26 Oct 2020 04:52:26 -0400 Received: by mail-lf1-f67.google.com with SMTP id l28so10709362lfp.10 for ; Mon, 26 Oct 2020 01:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=d5qVxbniITl5BClK9FgemM6r+Xx7WYyuIWPQHG6BtwM=; b=lvVo449gu4vdByaPAB6NkFU9vyV9eJN6Hr/r1oZ/p+raLCfTgxLBZxo17PU/eoKKaT RtKJCJg/dC5id/se/yOoUKSa6gazdoJGCnYVj8jH3fRitFuIqf+H3w7r5gd5JPD/jn5p iYjohxf0tW7m6T+wmAUDd6Ds43jNJCdSxu/5TIfMQNlVidARkfqXXUNSg3HQa3bL7MP8 3pFe4YpMKlWeL4dwpqJTQRaS+CNyCXGlYaRTtz8qGXiputOtsAIx0fD9/39cET7K+LHB +rL1uhSkR7Txkf8nSlzjz3RLSFL4b0nZhTu1e+Oaz+S0ASSqQSDU3jvkbg2P+I6lmv8h 3gMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=d5qVxbniITl5BClK9FgemM6r+Xx7WYyuIWPQHG6BtwM=; b=DmSJ00F7+tTy4AZTiCirYkC8/Kf+9+BLgECdn8GTOWMwOaC54tC2bxAY9/8SaMrYBx Qr0PRhHQYGypdLNtfVxI3jpUX1rWPNXoTBAWTbgB05xJZio9aEORsqsSrQoLCGXggfbl w7zrQk4lEILx7IETM3iHeR5NjXKxMGHWRdh79fTDcYm+GExQeFHzjUcfHugqF9dPnWHH 77pb9LID3pXo5nVDuRwVUB1qEY1TdlmjYTKoz6ifPqxfmMmHDG5D3Fku1tcD6GYpM13e 18PBmOBhm5DE2qVQeiLmgnCkqGLmJZYfHu5ICqiWWU27Q/e7d/gGmn1CSSgtf08FuTYR G88A== X-Gm-Message-State: AOAM530p9f9j8RE4tPN625/6S52r52zBRuVD8tnP/VwCEwrArIOAlgXe ii51FbOgoVB2mazJ5pjHnVU= X-Received: by 2002:a19:9150:: with SMTP id y16mr5021511lfj.190.1603702343575; Mon, 26 Oct 2020 01:52:23 -0700 (PDT) Received: from [192.168.0.10] (89-109-58-109.dynamic.mts-nn.ru. [89.109.58.109]) by smtp.gmail.com with ESMTPSA id t10sm385871lfc.258.2020.10.26.01.52.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Oct 2020 01:52:22 -0700 (PDT) Subject: Re: [PATCH v2 08/15] perf record: write trace data into mmap trace files To: Jiri Olsa , Alexey Budankov Cc: Arnaldo Carvalho de Melo , Namhyung Kim , Alexander Shishkin , Adrian Hunter , Andi Kleen , Peter Zijlstra , Ingo Molnar , linux-kernel , budankov.lore@gmail.com References: <1ec29ed6-0047-d22f-630b-a7f5ccee96b4@linux.intel.com> <1202e665-6321-28d4-eca3-b21693364467@linux.intel.com> <20201024154423.GG2589351@krava> From: Alexei Budankov Organization: Intel Corp. Message-ID: Date: Mon, 26 Oct 2020 11:52:21 +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: <20201024154423.GG2589351@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 24.10.2020 18:44, Jiri Olsa wrote: > On Wed, Oct 21, 2020 at 07:02:56PM +0300, Alexey Budankov wrote: > > SNIP > >> >> record__synthesize(rec, true); >> - /* this will be recalculated during process_buildids() */ >> - rec->samples = 0; >> >> if (!err) { >> if (!rec->timestamp_filename) { >> @@ -2680,9 +2709,12 @@ int cmd_record(int argc, const char **argv) >> >> } >> >> - if (rec->opts.kcore) >> + if (rec->opts.kcore || record__threads_enabled(rec)) >> rec->data.is_dir = true; >> >> + if (record__threads_enabled(rec)) >> + rec->opts.affinity = PERF_AFFINITY_CPU; > > so all the threads will pin to cpu and back before reading? No, they will not back. Thread mask compares to mmap mask before read and the thread migrates if masks don't match. This happens once on the first mmap read. So explicit pinning can be avoided. Alexei