lkml.org 
[lkml]   [2022]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 17/26] cgroup/misc: Add notifier block list support for css events
    From
    Date
    On Mon, 2022-11-14 at 12:42 -1000, Tejun Heo wrote:
    > Hello,
    >
    > On Fri, Nov 11, 2022 at 10:35:22AM -0800, Kristen Carlson Accardi
    > wrote:
    > > +/**
    > > + * register_misc_cg_notifier() - Register for css callback events
    > > + * @nb: notifier_block to register
    > > + *
    > > + * Context: Any context.
    > > + */
    > > +int register_misc_cg_notifier(struct notifier_block *nb)
    > > +{
    > > +       return
    > > blocking_notifier_chain_register(&misc_cg_notify_list, nb);
    > > +}
    > > +EXPORT_SYMBOL_GPL(register_misc_cg_notifier);
    > > +
    > > +/**
    > > + * unregister_misc_cg_notifier() - unregister for css callback
    > > events
    > > + * @nb: notifier_block to unregister
    > > + *
    > > + * Context: Any context.
    > > + */
    > > +int unregister_misc_cg_notifier(struct notifier_block *nb)
    > > +{
    > > +       return
    > > blocking_notifier_chain_unregister(&misc_cg_notify_list, nb);
    > > +}
    > > +EXPORT_SYMBOL_GPL(unregister_misc_cg_notifier);
    >
    > So, I'm not necessarily against this but wonder whether it'd be more
    > straightforward to add sth like struct misc_res_ops which contains
    > the
    > optional callbacks and then have an array of pointers to the structs
    > which
    > are initialized / registered somehow. What do you think?
    >
    > Thanks.
    >

    Makes no difference to me TBH - I believe they will be functionally
    equivalent and from a downstream user perspective equally as easy to
    use, so whatever you think is easiest for you to maintain.

    \
     
     \ /
      Last update: 2022-11-15 00:10    [W:4.147 / U:0.464 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site