Re: [PATCH 2/3 v3] mm: bug fix free page check in zone_watermark_ok

2012-07-12 Thread Michal Hocko
On Thu 12-07-12 18:05:19, Minchan Kim wrote: > Hi Michal, > > On Thu, Jul 12, 2012 at 10:19:23AM +0200, Michal Hocko wrote: > > On Thu 12-07-12 11:50:48, Minchan Kim wrote: > > > In __zone_watermark_ok, free and min are signed long type > > > while z->lowmem_reserve[classzone_idx] is unsigned

Re: [PATCH 2/3 v3] mm: bug fix free page check in zone_watermark_ok

2012-07-12 Thread Minchan Kim
Hi Michal, On Thu, Jul 12, 2012 at 10:19:23AM +0200, Michal Hocko wrote: > On Thu 12-07-12 11:50:48, Minchan Kim wrote: > > In __zone_watermark_ok, free and min are signed long type > > while z->lowmem_reserve[classzone_idx] is unsigned long type. > > So comparision of them could be wrong due to

Re: [PATCH 2/3 v3] mm: bug fix free page check in zone_watermark_ok

2012-07-12 Thread Michal Hocko
On Thu 12-07-12 11:50:48, Minchan Kim wrote: > In __zone_watermark_ok, free and min are signed long type > while z->lowmem_reserve[classzone_idx] is unsigned long type. > So comparision of them could be wrong due to type conversion > to unsigned although free_pages is minus value. Agreed on that

Re: [PATCH 2/3 v3] mm: bug fix free page check in zone_watermark_ok

2012-07-12 Thread Michal Hocko
On Thu 12-07-12 11:50:48, Minchan Kim wrote: In __zone_watermark_ok, free and min are signed long type while z-lowmem_reserve[classzone_idx] is unsigned long type. So comparision of them could be wrong due to type conversion to unsigned although free_pages is minus value. Agreed on that but

Re: [PATCH 2/3 v3] mm: bug fix free page check in zone_watermark_ok

2012-07-12 Thread Minchan Kim
Hi Michal, On Thu, Jul 12, 2012 at 10:19:23AM +0200, Michal Hocko wrote: On Thu 12-07-12 11:50:48, Minchan Kim wrote: In __zone_watermark_ok, free and min are signed long type while z-lowmem_reserve[classzone_idx] is unsigned long type. So comparision of them could be wrong due to type

Re: [PATCH 2/3 v3] mm: bug fix free page check in zone_watermark_ok

2012-07-12 Thread Michal Hocko
On Thu 12-07-12 18:05:19, Minchan Kim wrote: Hi Michal, On Thu, Jul 12, 2012 at 10:19:23AM +0200, Michal Hocko wrote: On Thu 12-07-12 11:50:48, Minchan Kim wrote: In __zone_watermark_ok, free and min are signed long type while z-lowmem_reserve[classzone_idx] is unsigned long type.

[PATCH 2/3 v3] mm: bug fix free page check in zone_watermark_ok

2012-07-11 Thread Minchan Kim
In __zone_watermark_ok, free and min are signed long type while z->lowmem_reserve[classzone_idx] is unsigned long type. So comparision of them could be wrong due to type conversion to unsigned although free_pages is minus value. It could return true instead of false in case of order-0 check so

[PATCH 2/3 v3] mm: bug fix free page check in zone_watermark_ok

2012-07-11 Thread Minchan Kim
In __zone_watermark_ok, free and min are signed long type while z-lowmem_reserve[classzone_idx] is unsigned long type. So comparision of them could be wrong due to type conversion to unsigned although free_pages is minus value. It could return true instead of false in case of order-0 check so