Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754215AbdCBHhQ (ORCPT ); Thu, 2 Mar 2017 02:37:16 -0500 Received: from out4435.biz.mail.alibaba.com ([47.88.44.35]:19390 "EHLO out4435.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751274AbdCBHhL (ORCPT ); Thu, 2 Mar 2017 02:37:11 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03273;MF=hillf.zj@alibaba-inc.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---.7jqJiNP_1488440085; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "'Minchan Kim'" , "'Andrew Morton'" Cc: , , , "'Johannes Weiner'" , "'Michal Hocko'" , "'Shaohua Li'" References: <1488436765-32350-1-git-send-email-minchan@kernel.org> <1488436765-32350-4-git-send-email-minchan@kernel.org> In-Reply-To: <1488436765-32350-4-git-send-email-minchan@kernel.org> Subject: Re: [RFC 03/11] mm: remove SWAP_DIRTY in ttu Date: Thu, 02 Mar 2017 15:34:45 +0800 Message-ID: <079901d29327$77698f60$663cae20$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQK+RVUTwVZ5vency8v/tFJ9ezzQswEnhxFrn6CEeBA= Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 449 Lines: 14 On March 02, 2017 2:39 PM Minchan Kim wrote: > @@ -1424,7 +1424,8 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma, > } else if (!PageSwapBacked(page)) { > /* dirty MADV_FREE page */ Nit: enrich the comment please. > set_pte_at(mm, address, pvmw.pte, pteval); > - ret = SWAP_DIRTY; > + SetPageSwapBacked(page); > + ret = SWAP_FAIL; > page_vma_mapped_walk_done(&pvmw); > break; > }