Re: [RFC 08/11] mm: make ttu's return boolean

2017-03-08 Thread John Hubbard
On 03/08/2017 10:37 PM, Minchan Kim wrote: >[...] I think it's the matter of taste. if (try_to_unmap(xxx)) something else something It's perfectly understandable to me. IOW, if try_to_unmap returns true, it means it did unmap successfully. Otherw

Re: [RFC 08/11] mm: make ttu's return boolean

2017-03-08 Thread Minchan Kim
Hi John, On Tue, Mar 07, 2017 at 11:13:26PM -0800, John Hubbard wrote: > On 03/01/2017 10:39 PM, Minchan Kim wrote: > >try_to_unmap returns SWAP_SUCCESS or SWAP_FAIL so it's suitable for > >boolean return. This patch changes it. > > Hi Minchan, > > So, up until this patch, I definitely like the

Re: [RFC 08/11] mm: make ttu's return boolean

2017-03-08 Thread John Hubbard
On 03/01/2017 10:39 PM, Minchan Kim wrote: try_to_unmap returns SWAP_SUCCESS or SWAP_FAIL so it's suitable for boolean return. This patch changes it. Hi Minchan, So, up until this patch, I definitely like the cleanup, because as you observed, the return values didn't need so many different va

[RFC 08/11] mm: make ttu's return boolean

2017-03-01 Thread Minchan Kim
try_to_unmap returns SWAP_SUCCESS or SWAP_FAIL so it's suitable for boolean return. This patch changes it. Cc: "Kirill A. Shutemov" Cc: Naoya Horiguchi Signed-off-by: Minchan Kim --- include/linux/rmap.h | 4 ++-- mm/huge_memory.c | 4 ++-- mm/memory-failure.c | 22 ++---