On Thu, 13 Oct 2022 15:40:47 -0400
Gregory Price <[email protected]> wrote:
> > > /* For now, no memory side cache, plausiblish numbers */
> > > - *dslbis_nonvolatile1 = (CDATDslbis) {
> > > + *dslbis1 = (CDATDslbis) {
> > > .header = {
> > > .type = CDAT_TYPE_DSLBIS,
> > > - .length = sizeof(*dslbis_nonvolatile1),
> > > + .length = sizeof(*dslbis1),
> > > },
> > > - .handle = nonvolatile_dsmad,
> > > + .handle = dsmad_handle,
> > > .flags = HMAT_LB_MEM_MEMORY,
> > > .data_type = HMAT_LB_DATA_READ_LATENCY,
> > > .entry_base_unit = 10000, /* 10ns base */
> > > .entry[0] = 15, /* 150ns */
> >
> > If we are going to wrap this up for volatile / non-volatile
> > we probably need to pass in a reasonable value for these.
> > Whilst not technically always true, to test the Linux handling
> > I'd want non-volatile to report as longer latency.
> >
>
> Here's a good question
>
> Do we want the base unit and entry to be adjustable for volatile and
> nonvolatile regions for the purpose of testing? Or should this simply
> be a static value for each?
We definitely want a 'default' value if nothing is provided.
It might be useful to allow it to be adjusted, but lets add that when
we have a use for it (perhaps testing some stuff in kernel where the
values matter enough to make them controllable).
>
> Since we need to pass in (is_pmem/is_nonvolatile) or whatever into the
> cdat function, we could just use that to do one of a few options:
> 1) Select from a static value
> 2) Select a static value and apply a multiplier for nvmem
> 3) Use a base/value provided by the use and apply a multiplier
> 4) Make vmem and pmem have separately configurable latencies
For now 1 is fine I think.
I've just pushed out a doe-v9 tag and cxl-2022-10-14 branch to
gitlab.com/jic23/qemu Also advanced the base tree to current QEMU mainline.
Note that if anyone is playing with the switch cci device and mainline kernel
you'll currently need to revert
https://lore.kernel.org/linux-pci/[email protected]/
Jonathan