Re: [PATCH 25/25] ipc: don't use [delayed_]work_pending()

From: Borislav Petkov
Date: Mon Dec 24 2012 - 14:32:52 EST


On Mon, Dec 24, 2012 at 11:07:23AM -0800, Tejun Heo wrote:
> And that's broken. It seems trivial but it really isn't and trying to
> optimize things like that in cold paths is just a bad idea. Not enough
> people will pay attention to them and they will stay subtly broken for
> a very long time. So, having "not doing anything in code which isn't
> necessary in code" as priority in cold paths is likely to hurt you.
> A better one would be "doing straight-forward and simple thing with
> acceptable overhead".

Ok, understood. I have only one question: how do you make sure
schedule_work() is used only in cold paths?

Btw, there's __cancel_delayed_work() which is not used anywhere and it
could be deleted AFAICT.

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/