Re: [PATCH] sysfs/file: move NULL checks to where they make senseand can occur

From: Tejun Heo
Date: Tue Mar 09 2010 - 02:39:23 EST


Hello,

On 03/05/2010 07:46 PM, Andrà Goddard Rosa wrote:
> ... avoiding checking for NULL 2 times in a row when we already have a page.
>
> It decreases code size:
> text data bss dec hex filename
> 4246 48 4136 8430 20ee fs/sysfs/file-BEFORE.o
> 4214 48 4136 8398 20ce fs/sysfs/file-AFTER.o
>
> Signed-off-by: Andrà Goddard Rosa <andre.goddard@xxxxxxxxx>

Nacked-by: Tejun Heo <tj@xxxxxxxxxx>

For this level of micro optimization to be meaningful, the code path
should be *really* *really* hot, which none of sysfs code pats are.
Whatever is easier to the eyes wins.

Thanks.

--
tejun
--
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/