lkml.org 
[lkml]   [2013]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: mm: accurate the comments for STEP_SIZE_SHIFT macro
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





\
 
 \ /
  Last update: 2013-03-18 21:44    [W:0.047 / U:4.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site