[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6f7afaa6811cbda30d12c38d73d4b261ab733a9f.camel@linux.intel.com>
Date: Mon, 14 Nov 2022 15:10:05 -0800
From: Kristen Carlson Accardi <kristen@...ux.intel.com>
To: Tejun Heo <tj@...nel.org>
Cc: jarkko@...nel.org, dave.hansen@...ux.intel.com,
linux-kernel@...r.kernel.org, linux-sgx@...r.kernel.org,
cgroups@...r.kernel.org, Zefan Li <lizefan.x@...edance.com>,
Johannes Weiner <hannes@...xchg.org>, zhiquan1.li@...el.com
Subject: Re: [PATCH 17/26] cgroup/misc: Add notifier block list support for
css events
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.
Powered by blists - more mailing lists