Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2075603ybh; Sun, 15 Mar 2020 18:32:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vucy0yAUTdvgF9AyTjxAK4izOad2FkIKWr1the+Tp5xhSDHK7J3ygcDMRzHeoM9Dl0vbkkB X-Received: by 2002:aca:c4c5:: with SMTP id u188mr1821347oif.139.1584322340383; Sun, 15 Mar 2020 18:32:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584322340; cv=none; d=google.com; s=arc-20160816; b=0JiROa6dJRhoBcZAzLsjXxToo4FDpbH3xo1ss0e7VAKJc5bx/FEi6vjVSLa32O/3oZ Bc6GdV0UFQMkzhlqWeVLc+8IGbpkj3neUzKxQTzIHBUNvIj/JrecLOkleWYVvkG7Mcq7 0CnY3UggXacotzz/KE0OT5QfSOel/sVdvJcgfpmPDppTg2JlreV7wm4IyrSe/Bmm5UlK hdKPKtIqr8Bls/b5jVGnvV/PSAduf+KtBGQaC1PYF2FmQRd+5ToZLMqYyn6Ct+D8xUwD ujNIn2RqiBtb+v90TCMA0lZiSIi4TbnHGmy3ElqGALGMufbghz079L6UvPDfymIIsFqa +vkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=glY1vNaNHO9IkigIY+qYitieOpe4QvHTzsdCqrAmRi8=; b=oXmk4ha9k1wr1rUxeWkFZ5PljfVyW7QJZ0aoVTRwjZ5fJ480urSqJUkUVeM3iH+yRy 3dWaG4rBZ+nG30hDYXlSb4id/Y5cJQQ73J7XRSZu6rXHxjdEzZVlUQL/YKHaM4lp6JE/ ltQBgyHyDezZYS+oIIQhqeVeaKzYlLaBxnWOnvkSp1ohiB0easuI3gH7/9uudz5U8n/k yvIH3e4/HGKsTUuLgixd9zeUNtG/UcU5+MXCVJJ7wBn75P2EMTSDUUDV75Ebo/4P6oIu ivfy1pOMPG1xnb3b+RUxUHLsq5gIANsy9TnZ/HQ2FhWJicUIGKz7IwNOCPijnB0K1nmX 2kmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 96si9427526oty.198.2020.03.15.18.32.08; Sun, 15 Mar 2020 18:32:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729396AbgCPBVj (ORCPT + 99 others); Sun, 15 Mar 2020 21:21:39 -0400 Received: from mga11.intel.com ([192.55.52.93]:9713 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729300AbgCPBVj (ORCPT ); Sun, 15 Mar 2020 21:21:39 -0400 IronPort-SDR: 4EyZJ+cxFBdJDAAOU34OBUABX19u56JYAw7yyJB5QklT+6mIRLv1/53yjIdMjHYbQcyg1R6aFv of3bLCotttNA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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