Re: [PATCH] mm: align up min_free_kbytes to multipy of 4

2019-06-11 Thread Michal Hocko
On Tue 11-06-19 12:16:35, Chengang (L) wrote: > Hi Michal > > > >On Sun 09-06-19 17:10:28, ChenGang wrote: > >> Usually the value of min_free_kbytes is multiply of 4, and in this > >> case ,the right shift is ok. > >> But if it's not, the right-shifting operation will lose the low 2 > >> bits,

Re: [PATCH] mm: align up min_free_kbytes to multipy of 4

2019-06-11 Thread Chengang (L)
Hi Michal >On Sun 09-06-19 17:10:28, ChenGang wrote: >> Usually the value of min_free_kbytes is multiply of 4, and in this >> case ,the right shift is ok. >> But if it's not, the right-shifting operation will lose the low 2 >> bits, and this cause kernel don't reserve enough memory. >> So it's

Re: [PATCH] mm: align up min_free_kbytes to multipy of 4

2019-06-11 Thread Chengang (L)
Hi Wei Yang >On Sun, Jun 09, 2019 at 05:10:28PM +0800, ChenGang wrote: >>Usually the value of min_free_kbytes is multiply of 4, and in this case >>,the right shift is ok. >>But if it's not, the right-shifting operation will lose the low 2 bits, >But PAGE_SHIFT is not always 12. You are

Re: [PATCH] mm: align up min_free_kbytes to multipy of 4

2019-06-10 Thread Michal Hocko
On Sun 09-06-19 17:10:28, ChenGang wrote: > Usually the value of min_free_kbytes is multiply of 4, > and in this case ,the right shift is ok. > But if it's not, the right-shifting operation will lose the low 2 bits, > and this cause kernel don't reserve enough memory. > So it's necessary to align t

Re: [PATCH] mm: align up min_free_kbytes to multipy of 4

2019-06-09 Thread Wei Yang
On Sun, Jun 09, 2019 at 05:10:28PM +0800, ChenGang wrote: >Usually the value of min_free_kbytes is multiply of 4, >and in this case ,the right shift is ok. >But if it's not, the right-shifting operation will lose the low 2 bits, But PAGE_SHIFT is not always 12. >and this cause kernel don't reserv