Re: [PATCH v2 02/12] sched/isolation: Introduce housekeeping notifier infrastructure

Thomas Gleixner
2026-04-14T21:25:51Z

On Mon, Apr 13 2026 at 15:43, Qiliang Yuan wrote:
>
> +int housekeeping_register_notifier(struct notifier_block *nb)
> +{
> + return blocking_notifier_chain_register(&housekeeping_notifier_list, nb);
> +}
> +EXPORT_SYMBOL_GPL(housekeeping_register_notifier);
> +
> +int housekeeping_unregister_notifier(struct notifier_block *nb)
> +{
> + return blocking_notifier_chain_unregister(&housekeeping_notifier_list, nb);
> +}
> +EXPORT_SYMBOL_GPL(housekeeping_unregister_notifier);

As I said before, notifiers are a horrible interface especially for
things where most callers are built-in. Especially providing proper
ordering of the callbacks is a badly defined mechanism as demonstrated
by the now eliminated CPU hotplug notifiers.

> +int housekeeping_update_notify(enum hk_type type, const struct cpumask *new_mask)
> +{
> + struct housekeeping_update update = {
> + .type = type,
> + .new_mask = new_mask,
> + };
> +
> + return blocking_notifier_call_chain(&housekeeping_notifier_list, HK_UPDATE_MASK, &update);
> +}
> +EXPORT_SYMBOL_GPL(housekeeping_update_notify);

Why is this exported? Are random modules allowed to invoke this?