Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2584151rdg; Mon, 16 Oct 2023 08:38:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHOjHeuhKqbDMGQHoHE7WvE6RAg4qISFrgmyXpvl/mlniGitjHBQJwUNZE4SASACj6cYPM0 X-Received: by 2002:a17:90b:528d:b0:27d:6937:db89 with SMTP id si13-20020a17090b528d00b0027d6937db89mr4936075pjb.43.1697470715348; Mon, 16 Oct 2023 08:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697470715; cv=none; d=google.com; s=arc-20160816; b=A5Fky8QLOGkqXcN60Of19M5sLAL2M0s856cEnQCYSe7D1n66RInspWMEgxDia279LW 7zH4CEEYNd8Uj+nuhE+UJ3BzwHQW4W3tyj+QBBecA4Dr68NkX/83UR2/nMSp45lKi87m edNOZkXeeIf/3Yi6pSi8GYIf1H+Nr3M+7ubpqXX5xIFguH15QctehRnNsFhfZSF4yREq 0Rrn/SsbsOs6HWdfrdF+aJfhym0sOjkRuP+PTgSUm3BhVCcdvr+CmLIcOMOflXKSoC3D Ct8MsqmYpjKOsOOkRZWM0BastWxtuMKAvMUbJCNXEghkg9RAH8E3ACJSXmoLi+IQn40q +cbQ== 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=jHFbuL41JWSWc//9Q4KGfMroPz3IWdmbsG8b4sSxInY=; fh=hQ+BUuCg7gBze1e8gtQ4yU2+OgLFXeAacUW3ZtDEiag=; b=OactCTPM514DEdG0gvA9S3+5y+pgFxd319IK0mXyTrkQz9snyq41xoyMO5oCTojFp/ sa4Sux1h03+4kd2y/7RyHvvxq3l0hizRvzdXAJiaLHPMHKFISERapIZjEIFTM66tZtB8 w9pdvCTsJ0wyyQ7C0ZsIcPmy+w3kyM2XAkux/2N60jPw2qynZiyl9G93qbGbUF/ob27j e6oBV8a+wdOVi1hqcF5sLBKPptgj+Iuh9e4XBTuNsV4d1X8kuWCqv+clFlfr5MbrmKnz WjTPaf7MO0iSKeq/SjAp7hCOU0G08WrRey8OnNINKe97KIdoeQYnFHtk78sQ9qo9ehf9 AfAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ser5PMkz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id fw11-20020a17090b128b00b0027749a98350si6450131pjb.159.2023.10.16.08.38.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 08:38:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ser5PMkz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 0D03C80219CF; Mon, 16 Oct 2023 08:38:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233630AbjJPPiV (ORCPT + 99 others); Mon, 16 Oct 2023 11:38:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233627AbjJPPiT (ORCPT ); Mon, 16 Oct 2023 11:38:19 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49106F2 for ; Mon, 16 Oct 2023 08:38:16 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B41AAC433CA; Mon, 16 Oct 2023 15:38:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697470695; bh=wtC6ekFrSeHsJyDMoZcgF7d8+qu8m8xwaumKuPeAXd4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ser5PMkz2wEu6pyX7zJkesK3olhWDPQ4oeeoGJj99lV5GcAFDrnMDo+icKrldb7kx aEFqF0XHEYyFFL1ORjedSayoa7Bwh6NSbTQvbUDmZs4RqEJb+YoLcqniFPdaaZ6Dzu sa0W7FSnlEYzY4sZ1sQjGcvtvDH1gn3aAMRa5hsEihRLFdwJJuQeRscnfhvZafHeGZ of13Z6JeNR1c/kiB1n8tadcPxj6U3FyR54MyCGSC1IN8G1Aubgxx89imFSzWZuYKyx n/jzwn8wUcOksYxi/RC93OSZ0uasjNtwVw9ifcYuseFWilggTw20ik/tYgVTwLv81y FrfB590iNn3tA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id EE3B240016; Mon, 16 Oct 2023 12:38:12 -0300 (-03) Date: Mon, 16 Oct 2023 12:38:12 -0300 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Namhyung Kim , Jiri Olsa , Ian Rogers , Adrian Hunter , Peter Zijlstra , LKML , linux-perf-users@vger.kernel.org Subject: Re: [PATCH v3] perf bench sched pipe: Add -G/--cgroups option Message-ID: References: <20231016044225.1125674-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 16 Oct 2023 08:38:29 -0700 (PDT) Em Mon, Oct 16, 2023 at 11:35:35AM +0200, Ingo Molnar escreveu: > > > * Namhyung Kim wrote: > > > + /* try cgroup v2 interface first */ > > + if (threaded) > > + fd = openat(cgrp->fd, "cgroup.threads", O_WRONLY); > > + else > > + fd = openat(cgrp->fd, "cgroup.procs", O_WRONLY); > > + > > + /* try cgroup v1 if failed */ > > + if (fd < 0) > > + fd = openat(cgrp->fd, "tasks", O_WRONLY); > > + > > + if (fd < 0) { > > + char mnt[PATH_MAX]; > > + > > + printf("Failed to open cgroup file in %s\n", cgrp->name); > > + > > + if (cgroupfs_find_mountpoint(mnt, sizeof(mnt), "perf_event") == 0) > > + printf(" Hint: create the cgroup first, like 'mkdir %s/%s'\n", > > + mnt, cgrp->name); > > Ok, this works too I suppose. > > Acked-by: Ingo Molnar I'm not getting that: [root@five ~]# perf bench sched pipe -l 10000 -G AAA,BBB # Running 'sched/pipe' benchmark: no access to cgroup /sys/fs/cgroup/AAA cannot open sender cgroup: AAA Usage: perf bench sched pipe -G, --cgroups Put sender and receivers in given cgroups [root@five ~]# Its better now as it bails out, but it is not emitting any message that helps with running the test, well, there is that /sys/fs/cgroup/AAA path, lemme try doing a mkdir: [root@five ~]# perf bench sched pipe -l 10000 -G AAA,BBB # Running 'sched/pipe' benchmark: no access to cgroup /sys/fs/cgroup/BBB cannot open receiver cgroup: BBB Usage: perf bench sched pipe -G, --cgroups Put sender and receivers in given cgroups [root@five ~]# [root@five ~]# perf bench sched pipe -l 10000 -G AAA,BBB # Running 'sched/pipe' benchmark: [root@five ~]# It seems to be bailing out but doesn't run the test nor emits any warning. I'm using v3. I'll try to debug it a bit. - Arnaldo