[CRIU] [PATCH 3/3] plugins: Use new plugins engine

Cyrill Gorcunov gorcunov at gmail.com
Tue Mar 4 10:19:38 PST 2014


On Tue, Mar 04, 2014 at 10:00:39PM +0400, Pavel Emelyanov wrote:
> > +#define run_plugin_hooks(__hook, ...)					\
> > +({									\
> > +	cr_plugin_desc_t *d;						\
> > +	plugin_desc_t *this;						\
> > +	int __ret = -ENOTSUP;						\
> > +									\
> > +	list_for_each_entry(this, &cr_plugins_list, list) {		\
> > +		d = cr_plugin_desc_from(this);				\
> > +		if (d->max_hooks >= (unsigned int)__hook ||		\
> > +		    !d->hooks[__hook])					\
> 
> Can we avoid this if (!hook) continue; looking? Most of the plugins
> are expected to provide only 2 callbacks out of all possible (7 now).
> Thus this loop is even now 70% empty, but things will get worse.

Yeah, will rework.


More information about the CRIU mailing list