Re: [PATCH] mempolicy: reduce references to the current

From: Minchan Kim
Date: Fri Apr 15 2011 - 01:41:52 EST


On Fri, Apr 15, 2011 at 1:33 PM, Namhyung Kim <namhyung@xxxxxxxxx> wrote:
> Remove duplicated reference to the 'current' task using a local
> variable. Since refering the current can be a burden, it'd better
> cache the reference, IMHO. At least this saves some bytes on x86_64.
>
> Â$ size mempolicy-{old,new}.o
>   text  Âdata  Âbss   dec   hex filename
> Â Â25203 Â Â2448 Â 9176 Â 36827 Â Â8fdb mempolicy-old.o
> Â Â25136 Â Â2448 Â 9184 Â 36768 Â Â8fa0 mempolicy-new.o
>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx>

Hi Namhyung,

The patch looks good to me. :)
But I have a nitpick. "curr" is rather awkward to me.
We have been used "tsk" and "p" instead of "curr" for task_struct.
But I don't like "p" since it has no meaning. So for consistency,
could you change it with "tsk"?

Thanks.
--
Kind regards,
Minchan Kim
--
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/