Re: [PATCH v2 8/9] perf metrics: Add has_optane literal

From: Ian Rogers
Date: Fri Mar 24 2023 - 03:16:20 EST


On Thu, Mar 23, 2023 at 1:44 PM Dan Williams <dan.j.williams@xxxxxxxxx> wrote:
>
> Liang, Kan wrote:
> >
> >
> > On 2023-03-23 3:20 p.m., Ian Rogers wrote:
> > > Add literal so that if optane memory isn't installed we can record
> > > fewer events.
> >
> > I think we call it pmem (Persistent Memory) everywhere in the Linux
> > code. Maybe we should use #has_pmem instead?
>
> That makes sense especially because has_optane implies more precision
> than the the check is performing. In general Optane is probably the
> widest deployed NVDIMM type, but this check will succeed with battery
> backed NVDIMMs and emulated PMEM in VMs which I think is perfectly ok
> for making a default event record decision.

Thanks, I'll change this in v3.

Ian