On Fri, 2024-08-30 at 09:40 -0700, Haitao Huang wrote: > From: Kristen Carlson Accardi <kristen@xxxxxxxxxxxxxxx> > > The misc cgroup controller (subsystem) currently does not perform > resource type specific action for Cgroups Subsystem State (CSS) events: > the 'css_alloc' event when a cgroup is created and the 'css_free' event > when a cgroup is destroyed. > > Define callbacks for those events and allow resource providers to > register the callbacks per resource type as needed. This will be > utilized later by the EPC misc cgroup support implemented in the SGX > driver. > > The SGX callbacks will need to access the 'struct misc_cg'. Pass > 'struct misc_cg' to the callbacks but not the 'struct misc_res' because > the latter doesn't have a pointer pointing back to 'struct misc_cg'. > > Link: https://lore.kernel.org/lkml/op.2kdw36otwjvjmi@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/ > > Signed-off-by: Kristen Carlson Accardi <kristen@xxxxxxxxxxxxxxx> > Co-developed-by: Haitao Huang <haitao.huang@xxxxxxxxxxxxxxx> > Signed-off-by: Haitao Huang <haitao.huang@xxxxxxxxxxxxxxx> > Reviewed-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx> > Reviewed-by: Tejun Heo <tj@xxxxxxxxxx> > Tested-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx> > --- > Acked-by: Kai Huang <kai.huang@xxxxxxxxx>