Re: [External] [PATCH RFC v2 06/17] RISC-V: QoS: define CBQRI resctrl resources and domains

Drew Fustini <[email protected]>
Newsgroups dev.linux.lists.acpica-devel,org.infradead.lists.linux-riscv,org.kernel.vger.linux-acpi,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <aci_hDY4JB9zNTci@gen8>
On Thu, Mar 26, 2026 at 04:32:47PM +0800, yunhui cui wrote:
> Hi Drew,
> 
> On Wed, Mar 25, 2026 at 2:49 PM Drew Fustini <[email protected]> wrote:
> >
> > On Wed, Mar 25, 2026 at 10:31:39AM +0800, yunhui cui wrote:
> > > Hi Drew,
> > >
> > > On Thu, Jan 29, 2026 at 4:28 AM Drew Fustini <[email protected]> wrote:
> > > >
> > > > Define data structures to encapsulate the resctrl resource
> > > > and domain structures.
> > > >
> > > > Co-developed-by: Adrien Ricciardi <[email protected]>
> > > > Signed-off-by: Adrien Ricciardi <[email protected]>
> > > > [fustini: rebased current upstream]
> > > > Signed-off-by: Drew Fustini <[email protected]>
> > > > ---
> > > >  arch/riscv/kernel/qos/internal.h | 27 +++++++++++++++++++++++++++
> > > >  1 file changed, 27 insertions(+)
> > > >
> > > > diff --git a/arch/riscv/kernel/qos/internal.h b/arch/riscv/kernel/qos/internal.h
> > > > index ff2c7eff50be..c0402dd06cfa 100644
> > > > --- a/arch/riscv/kernel/qos/internal.h
> > > > +++ b/arch/riscv/kernel/qos/internal.h
> > > > @@ -65,6 +65,11 @@
> > > >  #define CBQRI_BC_ALLOC_CTL_OP_READ_LIMIT   2
> > > >  #define CBQRI_BC_ALLOC_CTL_STATUS_SUCCESS  1
> > > >
> > > > +int qos_resctrl_setup(void);
> > > > +void qos_resctrl_exit(void);
> > > > +int qos_resctrl_online_cpu(unsigned int cpu);
> > > > +int qos_resctrl_offline_cpu(unsigned int cpu);
> > > > +
> > > >  /* Capacity Controller hardware capabilities */
> > > >  struct riscv_cbqri_capacity_caps {
> > > >         u16 ncblks; /* number of capacity blocks */
> > > > @@ -125,4 +130,26 @@ struct cbqri_controller {
> > > >         bool mon_capable;
> > > >  };
> > > >
> > > > +struct cbqri_resctrl_res {
> > > > +       struct rdt_resource     resctrl_res;
> > > > +       struct cbqri_controller controller;
> > > > +       u32 max_rcid;
> > > > +       u32 max_mcid;
> > > > +};
> > > > +
> > > > +struct cbqri_resctrl_dom {
> > > > +       struct rdt_domain_hdr       resctrl_dom_hdr;
> > > > +       struct rdt_ctrl_domain  resctrl_ctrl_dom;
> > > > +       struct rdt_mon_domain   resctrl_mon_dom;
> > > > +       u64 cbm;
> > > > +       u64 rbwb;
> > > > +       u64 *ctrl_val;
> > > > +       struct cbqri_controller *hw_ctrl;
> > > > +};
> > > > +
> > >
> > > Can we trim down some fields? For example:
> > >  struct cbqri_resctrl_res {
> > >         struct rdt_resource     resctrl_res;
> > > -       struct cbqri_controller controller;
> > >         u32 max_rcid;
> > >         u32 max_mcid;
> > >  };
> > >
> > >  struct cbqri_resctrl_dom {
> > > -       struct rdt_domain_hdr       resctrl_dom_hdr;
> > >         struct rdt_ctrl_domain  resctrl_ctrl_dom;
> > >         struct rdt_mon_domain   resctrl_mon_dom;
> > > -       u64 cbm;
> > > -       u64 rbwb;
> > >         u64 *ctrl_val;
> > >         struct cbqri_controller *hw_ctrl;
> > >  };
> >
> > Can you explain why you don't think these are needed??
> 
> The functionality works well without those fields, feel free to try.

Thanks for pointing this out. I have removed them.

> Btw, when do you plan to send the next revision?

The current branch is based on 6.19 so I need to rebase. I have
addressesd most of the feedback so far except for tracking default
closid/rmid for a cpu. I am thinking I should send a new version as it
has been a long time and describe the open items that I have not solved
yet.

Thanks,
Drew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.