Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp700285pxv; Thu, 1 Jul 2021 07:28:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzptfcUsAY91QRaICHeQqZ3NvFxdJH3jj/y4fPNNpbYuf2i2V41awBMswRtGyLqj7R8Ejq1 X-Received: by 2002:a5d:83c4:: with SMTP id u4mr12856141ior.21.1625149698272; Thu, 01 Jul 2021 07:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625149698; cv=none; d=google.com; s=arc-20160816; b=EaGfRd+9ZgUQMK8KFNt0T6Xy5p8Sub/xvjCIyjrpySqaWU+9Sqbgwts9/0jDcvkJ2F YYSaQbiRiuxyz1S376kh3oYRsiuFQCWFZ7DMUSLk3+w+5fr307/OIjJLIlQkw5DnA6+E cQT/N5OMbjBO4vqDfkG4BccHt6j4I9NcfcOwBFOTNYLxywaR/Jo1Kc0VDqUzIK52asce eN0oDDivmkhn9YYPjimIlB3/Fu322d8sgI0vlmhJXDCNeFEEvYEE0R9GtwaqhizT4ivf dM75zcOc/sz4oYiugqdpAkKEBbZlqYqEiFabzU7DWXgpXPeBHZBluTSvVabQ3LDpOVCO 2HFg== 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=yTNQoB4Ns36b6fCQ9ZT8ITIS84a9o2kUa+zHmtIoRkc=; b=gwO4LcFVs4++UXnj7zAS0lPKX1xD2AcSasc64+Wl59QwS8rfJj+l+2DJQezzDomawF fK5OSjQAyAE1puq1tU/soIKQzuo55b1wXTSFclnSKJ5npyCYMd/3Wo6LgbZikqY1eYX6 UX9SXa7UaX7LtK2Yla87wAdlP7GTwSLscSj4EiFWK0KrIM8/YtXnjr57cjAnoV2y66f9 3YGThWc15PJb7Cx1WsVNHwMUs43t3yrW+ftBGDZqg+BE8dcYFo7QLUYub6l+PvpoQ2qT Q2Wgui5Jm0mkJ047GIo3zGGLmVFA8ylF+TxEzgCUeMMOg8Za4FoDR9B5D/BsvgtIJ25W Wg6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="nh/mDDRF"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o9si68141jap.86.2021.07.01.07.28.03; Thu, 01 Jul 2021 07:28:18 -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=@kernel.org header.s=k20201202 header.b="nh/mDDRF"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233300AbhGAO3O (ORCPT + 99 others); Thu, 1 Jul 2021 10:29:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:37444 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232618AbhGAO3N (ORCPT ); Thu, 1 Jul 2021 10:29:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2EA0661409; Thu, 1 Jul 2021 14:26:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625149603; bh=qKgx3HCbAl2O2yMXpHyqALqNcKKjqeW9rIOXBgMJ7IA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nh/mDDRFcF/2ERPfAlGxzAAnpIBLl32hGqC3dePCwwzv5eOHW8+0nuXCG48gb4nJn CLmQhwPJBB/i/DP+szXSrfae7rPfNcYuJzoEDEo2RRZNsRPEG0mxvVCiFuw1ZB4/ao 8OCw18ZCRtR0YLg4AWLAlQmdaQY+CdZ6lqSFcAw/bhBK4alxUqc9MlGvC0GzFJx52H J2HEOe7L7dxk6Y3dCahKAnpM6a7a1edx90snCUEeAkpEF41ju1T5msGbLcENZceDVT rKaNoeMe5ppMZcrAZgsLgOBEpstpmDv8l+4N/NKYncwH+HziAeLsTToKryIeTJnRK5 6H75vfxhc/nmw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id C5D2840B1A; Thu, 1 Jul 2021 11:26:39 -0300 (-03) Date: Thu, 1 Jul 2021 11:26:39 -0300 From: Arnaldo Carvalho de Melo To: "Bayduraev, Alexey V" Cc: Jiri Olsa , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , linux-kernel , Andi Kleen , Adrian Hunter , Alexander Antonov , Alexei Budankov , Riccardo Mancini Subject: Re: [PATCH v8 10/22] perf record: Introduce --threads= command line option Message-ID: References: <00e9de2e-3963-1507-9eb0-40d419bf9a49@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00e9de2e-3963-1507-9eb0-40d419bf9a49@linux.intel.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Jul 01, 2021 at 02:50:40PM +0300, Bayduraev, Alexey V escreveu: > On 30.06.2021 21:54, Bayduraev, Alexey V wrote: > > On 30.06.2021 20:28, Arnaldo Carvalho de Melo wrote: > >> I thought you would start with plain: > >> -j N > >> And start one thread per CPU in 'perf record' existing CPU affinity > >> mask, then go on introducing more sophisticated modes. > > As I remember the first prototype [1] and > > [2] https://lore.kernel.org/lkml/20180913125450.21342-1-jolsa@kernel.org/ > > introduces: > > --thread=mode|number_of_threads > > where mode defines cpu masks (cpu/numa/socket/etc) > > Then somewhere while discussing this patchset it was decided, for unification, > > that --thread should only define CPU/affinity masks or their aliases. > > I think Alexei or Jiri could clarify this more. > >> Have you done this way because its how VTune has evolved over the years > >> and now expects from 'perf record'? > > VTune uses only --thread=cpu or no threading. > However we would like to have such sophisticated cpu/affinity masks to > tune perf-record for different workloads. I don't have, a priori, anything against the modes you propose, as you have a justification for them, its just how we should introduce that. I.e. first doing the simple case of '-j NCPUS' and then doing what you need, so that we get more granular patches. Not adding too much complexity per patch pays off when/if we find bugs and need to bisect. > For example, some HPC workloads prefer "numa" mask or most of telecom > workloads disallow to use cpus where their non-preemtable > communication threads work. - Arnaldo