Messages in this thread | | | Date | Mon, 8 Apr 2024 20:24:35 -0700 | Subject | Re: [PATCH v1 22/31] x86/resctrl: Make resctrl_arch_pseudo_lock_fn() take a plr | From | Reinette Chatre <> |
| |
Hi James,
On 3/21/2024 9:50 AM, James Morse wrote: > resctrl_arch_pseudo_lock_fn() has architecture specific behaviour, > and takes a struct rdtgroup as an argument. > > After the filesystem code moves to /fs/, the definition of struct > rdtgroup will not be available to the architecture code. > > The only reason resctrl_arch_pseudo_lock_fn() wants the rdtgroup is > for the CLOSID. Embed that in the pseudo_lock_region as a hw_closid,
Above creates expectation that the new member will be named hw_closid, but that is not what the code does.
> and move the definition of struct pseudo_lock_region to resctrl.h. > > Signed-off-by: James Morse <james.morse@arm.com>
..
> diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h > index 6705d7960dfd..3de5bc63ace0 100644 > --- a/include/linux/resctrl.h > +++ b/include/linux/resctrl.h > @@ -25,6 +25,45 @@ int proc_resctrl_show(struct seq_file *m, > /* max value for struct rdt_domain's mbps_val */ > #define MBA_MAX_MBPS U32_MAX > > +/** > + * struct pseudo_lock_region - pseudo-lock region information > + * @s: Resctrl schema for the resource to which this > + * pseudo-locked region belongs > + * @closid: The closid that this pseudo-locked region uses > + * @d: RDT domain to which this pseudo-locked region > + * belongs > + * @cbm: bitmask of the pseudo-locked region > + * @lock_thread_wq: waitqueue used to wait on the pseudo-locking thread > + * completion > + * @thread_done: variable used by waitqueue to test if pseudo-locking > + * thread completed > + * @cpu: core associated with the cache on which the setup code > + * will be run > + * @line_size: size of the cache lines > + * @size: size of pseudo-locked region in bytes > + * @kmem: the kernel memory associated with pseudo-locked region > + * @minor: minor number of character device associated with this > + * region > + * @debugfs_dir: pointer to this region's directory in the debugfs > + * filesystem > + * @pm_reqs: Power management QoS requests related to this region > + */ > +struct pseudo_lock_region { > + struct resctrl_schema *s; > + u32 closid; > + struct rdt_domain *d; > + u32 cbm; > + wait_queue_head_t lock_thread_wq; > + int thread_done; > + int cpu; > + unsigned int line_size; > + unsigned int size; > + void *kmem; > + unsigned int minor; > + struct dentry *debugfs_dir; > + struct list_head pm_reqs; > +}; > + > /** > * struct resctrl_staged_config - parsed configuration to be applied > * @new_ctrl: new ctrl value to be loaded
Reinette
| |