lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM9d7cgG8KL=CoEM3E1dXSMsC8RbYnCYQEBQOw3jPLS9YdC5PQ@mail.gmail.com>
Date:   Fri, 26 May 2023 22:45:20 -0700
From:   Namhyung Kim <namhyung@...il.com>
To:     Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        peterz@...radead.org
Cc:     Stephane Eranian <eranian@...gle.com>,
        Liang Kan <kan.liang@...ux.intel.com>,
        linux-cxl@...r.kernel.org, mark.rutland@....com, will@...nel.org,
        mingo@...hat.com, acme@...nel.org, dan.j.williams@...el.com,
        linuxarm@...wei.com, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org, Davidlohr Bueso <dave@...olabs.net>,
        Dave Jiang <dave.jiang@...el.com>
Subject: Re: [PATCH v6 4/5] perf: CXL Performance Monitoring Unit driver

On Fri, May 26, 2023 at 2:24 AM Jonathan Cameron
<Jonathan.Cameron@...wei.com> wrote:
>
> On Thu, 25 May 2023 18:18:55 -0700
> Stephane Eranian <eranian@...gle.com> wrote:
>
> > On Thu, May 25, 2023 at 6:06 PM Namhyung Kim <namhyung@...il.com> wrote:
> > >
> > > Add Stephane to CC.
> > >
> > > On Thu, Apr 13, 2023 at 7:35 AM Jonathan Cameron
> > > <Jonathan.Cameron@...wei.com> wrote:
> > > >
> > > > CXL rev 3.0 introduces a standard performance monitoring hardware
> > > > block to CXL. Instances are discovered using CXL Register Locator DVSEC
> > > > entries. Each CXL component may have multiple PMUs.
> > > >
> > > > This initial driver supports a subset of types of counter.
> > > > It supports counters that are either fixed or configurable, but requires
> > > > that they support the ability to freeze and write value whilst frozen.
> > > >
> > > > Development done with QEMU model which will be posted shortly.
> > > >
> > > > Example:
> > > >
> > > > $ perf stat -e cxl_pmu_mem0.0/h2d_req_snpcur/ -e cpmu0/h2d_req_snpdata/ -e cpmu0/clock_ticks/ sleep 1
> > > >
> > > > Performance counter stats for 'system wide':
> > > >
> >
> > Unless I am mistaken, I don't think this output corresponds to the
> > cmdline above. I think the -a is missing.
> > I don't think you can measure CXL traffic per-thread. Please confirm.
> > Thanks.
>
> It doesn't seem to make any difference whether I include -a or not and

Hmm.. strange, I think it'd fail if you don't provide -a option
because the cxl_pmu doesn't allow to attach to a task.


> the perf man page says
>
>        -a, --all-cpus
>            system-wide collection from all CPUs (default if no target is
>            specified)
>
> However I'm not sure what target means in this case as there is no
> mention of it anywhere else in the perf-stat man page.  My guess is thread
> or process provided by -p or -t.  So default applies in the above command line.
> Doesn't hurt to be more explicit though, so I've added -a.

Sorry, the man page was not clear.  The target can be CPUs (-a or -C)
or tasks (-p or -t for existing tasks, command line argument for a
new task).  So in the above example, the target is the sleep process.

The command line argument also controls when to terminate the
profiling session.  So `perf stat -a sleep 1` will collect system-wide
profile (because of the -a option) for 1 second.

I think the default mentioned in the man page is when you run

  $ perf stat

and Ctrl-C to exit.

Thanks,
Namhyung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ