Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2118568rwp; Fri, 14 Jul 2023 00:38:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlEHPC7jzp8rWDraFr+49iUw16YisebKjrAklNSISsUV3+xYAKb5qMJkJfJHyc0QhO3jbDOU X-Received: by 2002:a05:6a20:9384:b0:132:bdba:47a7 with SMTP id x4-20020a056a20938400b00132bdba47a7mr3416021pzh.34.1689320289766; Fri, 14 Jul 2023 00:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689320289; cv=none; d=google.com; s=arc-20160816; b=SGgjlok/QNYrylIUR4/xy9ZsVPgRpUJwZlIZYSPKzme2h8rtQamc4a8wACe0b0QHBs zAtm2HrN2orzxB40kW92viYWsyaGRh5QbTAS6klLJ8HcChAo+XZyslEYLsEo8TikQIMD 2TPh2I63xFMb2Z+ro5+LSr64TIsjvGKpHIDlCq9fZ7upHroilRskA9k+okNyCxI4JCns 4GSMtTrctgHL5v477YsMUDruiNIsLHML76tgTbu+mQ5QsoBfdTiQ9njIhmd8zgEBf2z6 +sISQmwMK4axJjggNH1EagOAlasAcoG8z/wdKV9ijxSxpR4OX/ONNXYfWveRhQyHVWRi js+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=X81Fqvj+kdBCq++7DyNrtE3X6YS16kVNJoZCvMFfXs0=; fh=3Fc84nfhLPN0MkM5Uyjz4pnFMJSkM0dsZOQU+2XP78A=; b=TNr1lcScDlVsvnqiSKJI8iQhARPkgxhjp7AYMh3/MmzUCJ/K/2mxvU6LDbZCZmSyLR CAlMCvspRy+9g7y5tTANhJ/ZqaZFX8LjiFGUM1RAsQml2BpbvZqotcmvunMfD6CSjA4Z /yr4HagM/MJrDHF6X8hyukHP/AOE7gQ/5RzSfuvjPbn9DulSzIfKfB9DrfcDRAl1BHUY 4c8DVgg52YGUGInQQvFrxuKuYXsHTroRQY/ENlUJiJaiTnP8e9bAjzopp3WFilNNu2DN hDRX2njMtVlIHGAKFEvvnK/tBeYgcLKXMBotN5mOApqW8nvOhDn7VGoq+7lIsXU/H6kA FSUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cMFakY9d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020a170902d50d00b001bb162e944dsi777951plg.51.2023.07.14.00.37.56; Fri, 14 Jul 2023 00:38:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cMFakY9d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235172AbjGNHGr (ORCPT + 99 others); Fri, 14 Jul 2023 03:06:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232382AbjGNHGm (ORCPT ); Fri, 14 Jul 2023 03:06:42 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C4F61727; Fri, 14 Jul 2023 00:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689318401; x=1720854401; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=BaEo9Tux8uqrNwgTh1LcHPbDEKHZM4gN91FR5Y91izM=; b=cMFakY9dbSPVfl9hq9dyZrQiKhidFHSfVxCXNrtf23GUV6DuF8uqq8uD 0WPlRQfFcg68Sx+JFMjaMo62xDDyGSgTvFwcyCHUt/zi5KNcoQX0KAYnp uWPyvJJDLAVwt/ytyhLOFxcr/vF25t0gWuFvnczUlsT9u5BnoJ1jsQq5g tPz43nml47Aiii6P/DowTNyaBF1rTNsUQ0hv7adGYCjoUbzhC1ezVzXkv pyYQKe75yy+192+pp1GB5cc2ThOvgBi/Ds/pKFVX1wGODSc4YywLA+l5C CK3pYQIyiWdX03bQtj0MJ9g4uMXfqVUD+MMwvTDybHQDEPYBVHHaIdrev w==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="350280434" X-IronPort-AV: E=Sophos;i="6.01,204,1684825200"; d="scan'208";a="350280434" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 00:06:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="968898780" X-IronPort-AV: E=Sophos;i="6.01,204,1684825200"; d="scan'208";a="968898780" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.252.49.109]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 00:06:35 -0700 Message-ID: Date: Fri, 14 Jul 2023 10:06:31 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.13.0 Subject: Re: [PATCH] perf: add new option '--workload-attr' to set workload sched_policy/priority/mask Content-Language: en-US To: Changbin Du , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Cc: Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230713085831.395112-1-changbin.du@huawei.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: <20230713085831.395112-1-changbin.du@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/07/23 11:58, Changbin Du wrote: > To get consistent benchmarking results, sometimes we need to set the > sched_policy/priority/mask of the workload to reduce system noise. > > For example, CPU binding is required on big.little system. > > $ perf stat -r 10 -- taskset -c 0 ls > > Nevertheless, the 'taskset' is also counted here. > > To get away of the middleman, this adds a new option '--workload-attr' to > do the same jobs for stat and record commands. > > $ sudo perf stat --workload-attr fifo,40,0x1 -- ls > > Above will make 'ls' run on CPU #0 with fifo scheduler and realtime > priority is 40. Aren't there ways to set up a process then start perf using -p then let the process continue.