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

From: Dan Williams
Date: Thu Mar 23 2023 - 16:44:17 EST


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.