Re: [PATCH] x86, mm: Avoid step_size overflow and add comments

2013-08-21 Thread Ingo Molnar
* Yinghai Lu wrote: > Current code "Current code has two problems:" > 1. shift step_size directly, and this could have overflow problem >after we shift step_size several times. The most important piece of information is not explained: under what circumstances can this happen currently,

Re: [PATCH] x86, mm: Avoid step_size overflow and add comments

2013-08-21 Thread Ingo Molnar
* Yinghai Lu ying...@kernel.org wrote: Current code Current code has two problems: 1. shift step_size directly, and this could have overflow problem after we shift step_size several times. The most important piece of information is not explained: under what circumstances can this

[PATCH] x86, mm: Avoid step_size overflow and add comments

2013-08-20 Thread Yinghai Lu
Current code 1. shift step_size directly, and this could have overflow problem after we shift step_size several times. 2. use MACRO to have shift to set to 5, but there is not explanation about selection. We can fix them with: 1. Add get_new_step_size(), and check overflow by comparing

[PATCH] x86, mm: Avoid step_size overflow and add comments

2013-08-20 Thread Yinghai Lu
Current code 1. shift step_size directly, and this could have overflow problem after we shift step_size several times. 2. use MACRO to have shift to set to 5, but there is not explanation about selection. We can fix them with: 1. Add get_new_step_size(), and check overflow by comparing