Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751563AbdCCDRE (ORCPT ); Thu, 2 Mar 2017 22:17:04 -0500 Received: from LGEAMRELO11.lge.com ([156.147.23.51]:42071 "EHLO lgeamrelo11.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbdCCDRD (ORCPT ); Thu, 2 Mar 2017 22:17:03 -0500 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 165.244.249.23 X-Original-MAILFROM: minchan@kernel.org X-Original-SENDERIP: 10.177.223.161 X-Original-MAILFROM: minchan@kernel.org Date: Fri, 3 Mar 2017 12:01:58 +0900 From: Minchan Kim To: Anshuman Khandual CC: Andrew Morton , , , , Johannes Weiner , Michal Hocko , "Kirill A . Shutemov" Subject: Re: [RFC 01/11] mm: use SWAP_SUCCESS instead of 0 Message-ID: <20170303030158.GD3503@bbox> References: <1488436765-32350-1-git-send-email-minchan@kernel.org> <1488436765-32350-2-git-send-email-minchan@kernel.org> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB01/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/03 12:01:59, Serialize by Router on LGEKRMHUB01/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/03/03 12:01:59, Serialize complete at 2017/03/03 12:01:59 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1354 Lines: 41 On Thu, Mar 02, 2017 at 07:57:10PM +0530, Anshuman Khandual wrote: > On 03/02/2017 12:09 PM, Minchan Kim wrote: > > SWAP_SUCCESS defined value 0 can be changed always so don't rely on > > it. Instead, use explict macro. > > Right. But should not we move the changes to the callers last in the > patch series after doing the cleanup to the try_to_unmap() function > as intended first. I don't understand what you are pointing out. Could you elaborate it a bit? Thanks. > > > > Cc: Kirill A. Shutemov > > Signed-off-by: Minchan Kim > > --- > > mm/huge_memory.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > > index 092cc5c..fe2ccd4 100644 > > --- a/mm/huge_memory.c > > +++ b/mm/huge_memory.c > > @@ -2114,7 +2114,7 @@ static void freeze_page(struct page *page) > > ttu_flags |= TTU_MIGRATION; > > > > ret = try_to_unmap(page, ttu_flags); > > - VM_BUG_ON_PAGE(ret, page); > > + VM_BUG_ON_PAGE(ret != SWAP_SUCCESS, page); > > } > > > > static void unfreeze_page(struct page *page) > > > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org