Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-16 Thread Chen Gang
On 7/13/16 15:53, Michal Hocko wrote: > On Wed 13-07-16 00:50:12, Chen Gang wrote: >> >> >> On 7/12/16 15:48, Michal Hocko wrote: >>> On Tue 12-07-16 03:47:42, Chen Gang wrote: >>> [...] In our case, the 2 output size are same, but under x86_64, the insns are different. After uses bool,

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-16 Thread Chen Gang
On 7/13/16 15:53, Michal Hocko wrote: > On Wed 13-07-16 00:50:12, Chen Gang wrote: >> >> >> On 7/12/16 15:48, Michal Hocko wrote: >>> On Tue 12-07-16 03:47:42, Chen Gang wrote: >>> [...] In our case, the 2 output size are same, but under x86_64, the insns are different. After uses bool,

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-13 Thread Michal Hocko
On Wed 13-07-16 00:50:12, Chen Gang wrote: > > > On 7/12/16 15:48, Michal Hocko wrote: > > On Tue 12-07-16 03:47:42, Chen Gang wrote: > > [...] > >> In our case, the 2 output size are same, but under x86_64, the insns are > >> different. After uses bool, it uses push/pop instead of branch, for

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-13 Thread Michal Hocko
On Wed 13-07-16 00:50:12, Chen Gang wrote: > > > On 7/12/16 15:48, Michal Hocko wrote: > > On Tue 12-07-16 03:47:42, Chen Gang wrote: > > [...] > >> In our case, the 2 output size are same, but under x86_64, the insns are > >> different. After uses bool, it uses push/pop instead of branch, for

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-12 Thread Chen Gang
On 7/12/16 15:48, Michal Hocko wrote: > On Tue 12-07-16 03:47:42, Chen Gang wrote: > [...] >> In our case, the 2 output size are same, but under x86_64, the insns are >> different. After uses bool, it uses push/pop instead of branch, for me, >> it should be a little better for catching. > > The

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-12 Thread Chen Gang
On 7/12/16 15:48, Michal Hocko wrote: > On Tue 12-07-16 03:47:42, Chen Gang wrote: > [...] >> In our case, the 2 output size are same, but under x86_64, the insns are >> different. After uses bool, it uses push/pop instead of branch, for me, >> it should be a little better for catching. > > The

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-12 Thread Chen Gang
On 7/12/16 15:15, Vlastimil Babka wrote: > On 07/11/2016 09:47 PM, Chen Gang wrote: >> >> >> In our case, the 2 output size are same, but under x86_64, the insns are >> different. After uses bool, it uses push/pop instead of branch, for me, >> it should be a little better for catching. > > You

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-12 Thread Chen Gang
On 7/12/16 15:15, Vlastimil Babka wrote: > On 07/11/2016 09:47 PM, Chen Gang wrote: >> >> >> In our case, the 2 output size are same, but under x86_64, the insns are >> different. After uses bool, it uses push/pop instead of branch, for me, >> it should be a little better for catching. > > You

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-12 Thread Michal Hocko
On Tue 12-07-16 03:47:42, Chen Gang wrote: [...] > In our case, the 2 output size are same, but under x86_64, the insns are > different. After uses bool, it uses push/pop instead of branch, for me, > it should be a little better for catching. The code generated for bool version looks much worse.

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-12 Thread Michal Hocko
On Tue 12-07-16 03:47:42, Chen Gang wrote: [...] > In our case, the 2 output size are same, but under x86_64, the insns are > different. After uses bool, it uses push/pop instead of branch, for me, > it should be a little better for catching. The code generated for bool version looks much worse.

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-12 Thread Vlastimil Babka
On 07/11/2016 09:47 PM, Chen Gang wrote: On 7/11/16 08:26, Minchan Kim wrote: On Sat, Jul 09, 2016 at 11:55:04PM +0800, cheng...@emindsoft.com.cn wrote: From: Chen Gang For pure bool function's return value, bool is a little better more or less than int. And

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-12 Thread Vlastimil Babka
On 07/11/2016 09:47 PM, Chen Gang wrote: On 7/11/16 08:26, Minchan Kim wrote: On Sat, Jul 09, 2016 at 11:55:04PM +0800, cheng...@emindsoft.com.cn wrote: From: Chen Gang For pure bool function's return value, bool is a little better more or less than int. And return boolean result directly,

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-11 Thread Chen Gang
On 7/11/16 08:26, Minchan Kim wrote: > On Sat, Jul 09, 2016 at 11:55:04PM +0800, cheng...@emindsoft.com.cn wrote: >> From: Chen Gang >> >> For pure bool function's return value, bool is a little better more or >> less than int. >> >> And return boolean result directly,

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-11 Thread Chen Gang
On 7/11/16 08:26, Minchan Kim wrote: > On Sat, Jul 09, 2016 at 11:55:04PM +0800, cheng...@emindsoft.com.cn wrote: >> From: Chen Gang >> >> For pure bool function's return value, bool is a little better more or >> less than int. >> >> And return boolean result directly, since 'if' statement is

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-10 Thread Minchan Kim
On Sat, Jul 09, 2016 at 11:55:04PM +0800, cheng...@emindsoft.com.cn wrote: > From: Chen Gang > > For pure bool function's return value, bool is a little better more or > less than int. > > And return boolean result directly, since 'if' statement is also for > boolean

Re: [PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-10 Thread Minchan Kim
On Sat, Jul 09, 2016 at 11:55:04PM +0800, cheng...@emindsoft.com.cn wrote: > From: Chen Gang > > For pure bool function's return value, bool is a little better more or > less than int. > > And return boolean result directly, since 'if' statement is also for > boolean checking, and return

[PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-09 Thread chengang
From: Chen Gang For pure bool function's return value, bool is a little better more or less than int. And return boolean result directly, since 'if' statement is also for boolean checking, and return boolean result, too. Signed-off-by: Chen Gang

[PATCH] mm: migrate: Use bool instead of int for the return value of PageMovable

2016-07-09 Thread chengang
From: Chen Gang For pure bool function's return value, bool is a little better more or less than int. And return boolean result directly, since 'if' statement is also for boolean checking, and return boolean result, too. Signed-off-by: Chen Gang --- include/linux/migrate.h | 4 ++--