> > /* 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? 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