Re: [PATCH] x86: mm: accurate the comments for STEP_SIZE_SHIFT macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/18/2013 12:13 PM, Yinghai Lu wrote:
>>
>> No, it doesn't.  This is C, not elementary school  Now I'm really bothered.
>>
>> The comment doesn't say *why* (PUD_SHIFT-PMD_SHIFT)/2 or any other
>> variant is correct, furthermore I suspect that the +1 is misplaced.
>> However, what is really needed is:
>>
>> 1. Someone needs to explain what the logic should be and why, and
>> 2. replace the macro with a symbolic macro, not with a constant and a
>>    comment explaining, incorrectly, how that value was derived.
> 
> yes, we should find out free_mem_size instead to decide next step size.
> 
> But that will come out page table size estimation problem again.
> 

Sorry, that comment is double nonsense for someone who isn't intimately
familiar with the code, and it sounds like it is just plain wrong.

Instead, try to explain why 5 is the correct value in the current code
and how it is (or should be!) derived.

	-hpa



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]