[ofa-general] ib_create_fmr_pool do INIT_HLIST_NODE only if cache is enabled

chas williams - CONTRACTOR chas at cmf.nrl.navy.mil
Tue Mar 18 08:58:44 PDT 2008


perhaps not.  conditional branches are slow.

In message <f3b32c250803171706s42098969o20c3c8e089a06c04 at mail.gmail.com>,"subbu
 kl" writes:
>Only thing is it may save very few machine cycles :)
>
>~subbu
>
>--- fmr_pool.orig.c 2008-03-05 11:29:20.000000000 -0600
>+++ fmr_pool.mod.c  2008-03-17 17:05:04.000000000 -0500
>@@ -321,7 +321,9 @@
>      fmr->pool             = pool;
>      fmr->remap_count      = 0;
>      fmr->ref_count        = 0;
>-     INIT_HLIST_NODE(&fmr->cache_node);
>+
>+     if (params->cache)
>+       INIT_HLIST_NODE(&fmr->cache_node);
>
>      fmr->fmr = ib_alloc_fmr(pd, params->access, &fmr_attr);
>      if (IS_ERR(fmr->fmr)) {



More information about the general mailing list