I see, that in many places all pre-checks are done in negative form
with resulting return or jump out. In this case, if function was called,
what likely() path is?
that one or this?
==
if (system_state == SYSTEM_RUNNING) {
old_shift = cur_pid_hash->shift;
new_shift = ilog2(nr_pids * 2 - 1);
if (new_shift != old_shift && mutex_trylock(&dyn_pidhash.resize_mutex)) {
==
> + old_shift = cur_pid_hash->shift;
> + new_shift = ilog2(nr_pids * 2 - 1);
/* hope this repetition is needed by design */
...
> + mutex_unlock(&dyn_pidhash.resize_mutex);
}
What is more efficient in general sense,
as opposed to s,3,2,1,0 Optimized?
Thanks.
____
-