From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E34D7C18E5B for ; Mon, 16 Mar 2020 01:21:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AFDDB20663 for ; Mon, 16 Mar 2020 01:21:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFDDB20663 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4962E6B0003; Sun, 15 Mar 2020 21:21:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4457A6B0006; Sun, 15 Mar 2020 21:21:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35C526B0007; Sun, 15 Mar 2020 21:21:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0088.hostedemail.com [216.40.44.88]) by kanga.kvack.org (Postfix) with ESMTP id 1B9B66B0003 for ; Sun, 15 Mar 2020 21:21:41 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id C4B1E180ACEEB for ; Mon, 16 Mar 2020 01:21:40 +0000 (UTC) X-FDA: 76599473160.30.sheet81_65e4f9755db15 X-HE-Tag: sheet81_65e4f9755db15 X-Filterd-Recvd-Size: 3356 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Mon, 16 Mar 2020 01:21:40 +0000 (UTC) IronPort-SDR: cEmyI/e3tCdXa8shgpAFXv19nZe70lhDL7NoFna82/yLegS/W7fvh39eflhQ2vY+DIWhQKJy8+ rIhw0UW/9o6w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2020 18:21:38 -0700 IronPort-SDR: ZXwYIRpgEy8sv4KL07auN1zyi9Gi7bYlBzkAlfgyM+k1GnTAs/2Eo9/TLYOv9K/BJ3bbFKNaSr zP5X/m2uCAcg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,558,1574150400"; d="scan'208";a="390540021" Received: from yhuang-dev.sh.intel.com (HELO yhuang-dev) ([10.239.159.23]) by orsmga004.jf.intel.com with ESMTP; 15 Mar 2020 18:21:34 -0700 From: "Huang\, Ying" To: Wei Yang Cc: Mika Penttil?? , Andrew Morton , , , Dave Hansen , David Hildenbrand , "Mel Gorman" , Vlastimil Babka , Zi Yan , Michal Hocko , Peter Zijlstra , Minchan Kim , Johannes Weiner , Hugh Dickins Subject: Re: [RFC 2/3] mm: Add a new page flag PageLayzyFree() for MADV_FREE References: <20200228033819.3857058-1-ying.huang@intel.com> <20200228033819.3857058-3-ying.huang@intel.com> <20200315081854.rcqlmfckeqrh7fbt@master> <92d4b0fe-f592-8da6-0282-2ea8a015b247@nextfour.com> <20200315122217.45mioaxzuulwvx2f@master> Date: Mon, 16 Mar 2020 09:21:34 +0800 In-Reply-To: <20200315122217.45mioaxzuulwvx2f@master> (Wei Yang's message of "Sun, 15 Mar 2020 12:22:17 +0000") Message-ID: <87pnddrt5t.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Wei Yang writes: > On Sun, Mar 15, 2020 at 10:54:03AM +0200, Mika Penttil?? wrote: >> >> >>On 15.3.2020 10.18, Wei Yang wrote: >>> On Fri, Feb 28, 2020 at 11:38:18AM +0800, Huang, Ying wrote: >>> > From: Huang Ying >>> > >>> > Now !PageSwapBacked() is used as the flag for the pages freed lazily >>> > via MADV_FREE. This isn't obvious enough. So Dave suggested to add a >>> > new page flag for that to improve the code readability. >>> I am confused with the usage of PageSwapBacked(). >>> >>> Previously I thought this flag means the page is swapin, set in >>> swapin_readahead(). While I found page_add_new_anon_rmap() would set it too. >>> This means every anon page would carry this flag. Then what is this flag >>> means? >>> >>> >> >>But not all PageSwapBacked() pages are anon, like shmem. >> > > Yes, while it looks shmem is the only exception. Another exception is the pages freed lazily via MADV_FREE. > I am still struggling to understand the meaning of this flag. You can use `git blame` to find out the commit which introduces this flag. Which describes why this flag is introduced. Best Regards, Huang, Ying >> >>--Mika