Re: [PATCH REPOST] CPA: Add statistics about state of direct mappingv4

From: Andi Kleen
Date: Mon May 05 2008 - 06:23:58 EST



>> +static unsigned long direct_pages_count[PG_LEVEL_NUM];
>> +
>> +void __meminit update_page_count(int level, unsigned long pages)
>
> Why __meminit ? This is used in split_large_page()

True. Can you please just remove it? I think it came when this
was still only used in early memory init.

[insert standard rant about the work:code size benefit ratio of these
fine grained section identifiers being far too high]

>> +{
>> +#ifdef CONFIG_PROC_FS
>
> Why keep an empty function when PROC_FS is disabled ?

So we don't have to add a ifdef in all the callers. Yes could probably
have an empty inline in that case in some header, but frankly that would
be a lot of code lines for saving only very minor code size in a very
unlikely CONFIG case.

-Andi

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