Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp23055pxv; Wed, 21 Jul 2021 14:23:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAgHszzCt8ik+gTyAnLrMRbQMAhks1Ll1sz0Al63ras1zKUDdbzrx2A5tu/p8T2xPQl0m6 X-Received: by 2002:a50:cb8b:: with SMTP id k11mr50812420edi.55.1626902623027; Wed, 21 Jul 2021 14:23:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626902623; cv=pass; d=google.com; s=arc-20160816; b=LZlaHk0ZnQhoUsqo5pfpG6bbgURZv6esWM4UeJ+9Uje6JPMdQgBe5lLxqyZdmZ7nGj bvgsCHYXXldkGlxSeJqnxWDERAgZ7iS4/moJNS4EKIGBY3T64hzMQCa0KWOwLo2Ro7gk KTWvpJfheHKu9DQ3WgcOwSR4EjQqc2c6D9SS831sjWkl5vIE8oBzVPRHgZcZ5oWFI/eb 5uCMxT/1RgQDzhyXBzl1ITO+55eBgUIT80xpA/PG2VCflngJRZ15JBOD0dUPf6iC8DqE 7TYeldwmJE7lMfF1JVCfozSFJ+EWGA3U6Qv3X2oYTnZcS0OryOlT5wA1eV1tnwtOYbGR Lrwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=CuYd6wdZYvHgbrGJYEOvy3p7h7bWQ5Vc0JGsJNPXwrQ=; b=MXGD3AmFCnu0D6hkYKs4sbP+BBG2z2jgIjQgseI3jzvr3WP+2tpDmLM9dlMsBnYhQN TbF05loIz4g1C+wvZnu1J0IbBiTSvKpEiIkzFCS7LMVVGnUyV5H13wK/62Lah2sYArya xNma4HMdPOVHtT/pumAr7aqHMG/denPLvDxNnNd4qRYBkLAqxjx8sS7U6hEn5rtC2gVW +cvmp3wCo1xzWGJUmwhKvozdATPf/gAfHJBAdq5ErcDpUNtB+C3RGyJJSf6bQNverFM/ pFAu3kuYsbghNIalx5SP+7hrghZmv0V+YDXjNzZB5Mw1b2MX0KQzhRlWRe5cSrhWvpLt 1CwQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=KJakeKiP; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q13si27495521ejn.153.2021.07.21.14.23.18; Wed, 21 Jul 2021 14:23:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=KJakeKiP; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229591AbhGUUkx (ORCPT + 99 others); Wed, 21 Jul 2021 16:40:53 -0400 Received: from mail-dm6nam10on2086.outbound.protection.outlook.com ([40.107.93.86]:43744 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229749AbhGUUkv (ORCPT ); Wed, 21 Jul 2021 16:40:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aVSmr1fqEWMCvAW5uUths2VZ1k1MPfsKehH4yfryGCc1t4iT8RPtG5WHHbOdQJqD8Drh6Y13OG5XvoDGdIZcD7MEaoVUDmEF5IJJ0XCaZMLT6te/exHyAV55IAc1dqldZtntca7uAIyYtYNV/Ye30PKw4oHPH7dszYVxLasPVPpJbHOXEOqWfeCt6+ld10wIwdCP4pj4gvzOVG83IWwNI9wyMpe2rSLhrmDsnqUwERlRLpBTPbT5/OOpK2wesd0d4nVHmF6gvTYCOsp0mQdes5e0GMGeYW7xPBaP9f/464ml5cCLs7rsTzD45P6T+DtsjuI0UZun+DBfS98+ncI6Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CuYd6wdZYvHgbrGJYEOvy3p7h7bWQ5Vc0JGsJNPXwrQ=; b=j0iACJhrZeczlRT6u3uJlwLyGaWPJK0RALVUD19uWEQk/Ok8N/w1ytTJcqsHBklplylYLDf1DMW58qelkKy+cJqt6cOPq50dvtS5D4ZjnKLHKAWZbW+tnSAfBF/MCN6CaJLfJvnBLT6UMc5XCBasTcZjhv4UT86FBc3R0bc4So4hl397lHK1kAA+ef9hLx2tXGq3SvZkee+NS6E8l5KsZ69mk+M/nwzsrQzK3GJoATSUcqLaV/JHHlkKjUdNif/eb2j1XIto8qpv5jj3+cRGwT3DLlbkGYFUPARIDpXCvYmUheKK4omgBJ1jlMexBKps3K7fGibo4xtDfBtbg00w3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CuYd6wdZYvHgbrGJYEOvy3p7h7bWQ5Vc0JGsJNPXwrQ=; b=KJakeKiPDPcvFzgb4b5ht0Ob9lfZ8dMVP9GIcP+fXrHoVs0WS8zXoSUTdpqyiGztIpJQ5rnDf7og2HY+4LW6FEKTNF5u55A6AgiGHMg74EuV70mCbzPSpaE/22MLG9EPv29Osb617B/lJThGlRx4tZvHss7Fu8ZamlecGt7lAsImj6nLrw4fz10zuwWiYGXmtL5hvVACnfSDeDrK+RU9vwmCebiPAcp1RuHc0x3iu5vU9ApqEuCLnwpBrHunSLYC3eIDoiF5zIbsFePUj8FV8TTHRcokqh7csqsegCYEcClNCFYmT+TREcHsgfSXgCaTchtDxcTesRuqdl9t3cyd7A== Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nvidia.com; Received: from MN2PR12MB3823.namprd12.prod.outlook.com (2603:10b6:208:168::26) by BL0PR12MB2499.namprd12.prod.outlook.com (2603:10b6:207:43::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.26; Wed, 21 Jul 2021 21:21:26 +0000 Received: from MN2PR12MB3823.namprd12.prod.outlook.com ([fe80::dcee:535c:30e:95f4]) by MN2PR12MB3823.namprd12.prod.outlook.com ([fe80::dcee:535c:30e:95f4%6]) with mapi id 15.20.4352.025; Wed, 21 Jul 2021 21:21:26 +0000 From: Zi Yan To: Huang Ying Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Keith Busch , Dave Hansen , Yang Shi , Michal Hocko , Wei Xu , David Rientjes , Dan Williams , David Hildenbrand , Greg Thelen , Oscar Salvador , Yang Shi Subject: Re: [PATCH -V11 7/9] mm/vmscan: Consider anonymous pages without swap Date: Wed, 21 Jul 2021 17:21:20 -0400 X-Mailer: MailMate (1.14r5812) Message-ID: <43FA897B-ABFC-4C52-8DFD-8BAF992BD0D4@nvidia.com> In-Reply-To: <20210721063926.3024591-7-ying.huang@intel.com> References: <20210721063926.3024591-1-ying.huang@intel.com> <20210721063926.3024591-7-ying.huang@intel.com> Content-Type: multipart/signed; boundary="=_MailMate_BF9DAD1B-67EE-4C3B-9EE0-C3C40EC9816C_="; micalg=pgp-sha512; protocol="application/pgp-signature" X-ClientProxiedBy: MN2PR14CA0028.namprd14.prod.outlook.com (2603:10b6:208:23e::33) To MN2PR12MB3823.namprd12.prod.outlook.com (2603:10b6:208:168::26) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.2.55.80] (216.228.112.21) by MN2PR14CA0028.namprd14.prod.outlook.com (2603:10b6:208:23e::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.25 via Frontend Transport; Wed, 21 Jul 2021 21:21:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f19d3676-1a25-4bf5-9daf-08d94c8d7f4c X-MS-TrafficTypeDiagnostic: BL0PR12MB2499: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9h1UoAGM3xesWWI8ytbB0VTX0ZIX5Be9XV+sFw4PsETI6Sn8RN4pOjAyNv9LGGQYVfbwoNkFGvK5Phr+qYy7BX/WZTJtfjT2byeWgPb886YaZA1PUtM2+R3B06hsXEyW4k/1HCOOk0VexUZblvdbCoeRp0Qc0omkJso4sgsBG4f2QaPdDYCKqnR4rukPLFcBYw35R3mHRWC3A+Ytd7e5gKYaMFenCYGHwWTV9u8Z03jhlz60AGu3GbDQGinXWpaYd3uqAZ5I8gnfwllWp8ZNr0uKTCPwS0VR7isCzDy5xW1ie4PHjzpazKRr07rWKKNxptWav4rmG8WynmZ0OOsv+thvBQdCBU4zYzJ9NJ/v/XPV68D0Yte5jjCdSGCvQ/ZSaOrSvCfvsmVWOkbGmL+9FA2zX7hSS+XbkqZqyqiobm1aU24v5UPPqHGDRoQ2OXvoM9CFAQ9N9Cj3QGVep15BFnPlkIjey55hKqC4EuJDP4cisoq6/qXttS3CRdp6eU8bci9kxMgyne28A1F8El+zv70Vqr9aE+3R9t2SkE4lZXET1GLWi2LYC5+ftteH3kWr393mwvc0QzuBhO1ocMuCf5jf9yQtuGwTLunk/PFHL0/F8zk1oHBz7fzIEQUF+XfJOQt+azZS9Vc/shiRTr7KmWt+AhR9L0I4mNOuqKiOxphQ9zasTaDtYab0gf2icVBPdG31UuS+puskjxa6EDju2mmTG1UShK8LTzQEgdCi9ilGL4Zv5Vk3qqoC9y7Wa/0WF0An+pnVLcIOhSabLpjD6UnUhZtIM7Eue6SJ0dLlGA7jLB0ri3hJ6dR/ED9s7tT5 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3823.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(39860400002)(136003)(346002)(376002)(396003)(5660300002)(33656002)(83380400001)(38100700002)(86362001)(478600001)(2616005)(26005)(956004)(54906003)(186003)(4326008)(966005)(7416002)(6486002)(66476007)(21480400003)(8936002)(66556008)(8676002)(16576012)(36756003)(6916009)(66946007)(235185007)(2906002)(33964004)(316002)(53546011)(72826004)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Vk1PVDc5aDVQU2xGL0VrS2tHeWZScWdWaDdhd3IvcEIwMTViamt1MlNPMDVv?= =?utf-8?B?dWFXQ0ozNys0OXpPUCs5amFkOGhMYmVoL0RxSmgyVnFMQk1VM3hrL0R2aEdX?= =?utf-8?B?RjQxeWk0TFlnQ1c5Z2ZJT0VHSG80RTRmaEJnTzJTNGUzazc3R21nUXhWeEpI?= =?utf-8?B?ZUZSenhvbDRPWEUrbVV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B?OGtOM0ZJODNUUTZoZGtkZjZLSWdoc2p2Wm1hSkN1bGVOcjlXYmM1dEkvOWJp?= =?utf-8?B?d3NxUlhtZjhxaU12eFZLdElkSFQvUTlJOVFrV2pLSVJiaEliNHVjVVlaeWl4?= =?utf-8?B?VTltODBuYXZsUWNORnBiK2lzakNCTDBEYmxGb29rb0l0aFB1bS9nak9DWUx1?= =?utf-8?B?SWY0dVF4VUZZcFJOL0djZGZVZ3d3NFo1MXh5bHNRcWdqdk9BTlJBNlFSZ3NK?= =?utf-8?B?Rnpyam5ycHFPTXpoT1dKL0cwNno4MUVLM3RFakpUM0czS1FtQUttZmVPS3VS?= =?utf-8?B?bCt3eVFhckNxTUhoWEdUdHRKTktaaTNybWhSYmtsNXh2MjR1MmF6Z1FxOXgy?= =?utf-8?B?ZVVLVGw2VUF1NE01RG93WXNXWXpqenBwSmFvY1BGV2E0cnp5cXljNS9hMzBM?= =?utf-8?B?YTlKK2hOU0FuT1kvUERSSFptV3ZEV09UeEduekhiQ3YzZysxbit5VndtTWVO?= =?utf-8?B?UWtFM3NFWWhwVnB6WG9EcnYveWRXMitlcWNKZTlTeXBpb2tqaUNZdmNPWXpF?= =?utf-8?B?amZ3UG1GSFQ4S2xKNUNualRDZHNsTWxOT2d0bFdkTTFBRTZNNGY4Y0svN2xC?= =?utf-8?B?alp2cEhQNVRxOHo5T3NSQXp1RXdTQ1NmTGRscEt6RExiN0ZqK2QxRDYvOVRa?= =?utf-8?Q?b/JcrHiici49GdPsAGc0UhWjH6rH7dkY8HOrcjS?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: f19d3676-1a25-4bf5-9daf-08d94c8d7f4c X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3823.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2021 21:21:26.0582 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: WoOwmmvpOh2EOfOoY6agRtHIp8O2VjAAvdbvo55Q6xEJ2R+y+kPSyjDexV+gwPM9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB2499 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=_MailMate_BF9DAD1B-67EE-4C3B-9EE0-C3C40EC9816C_= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 21 Jul 2021, at 2:39, Huang Ying wrote: > From: Keith Busch > > Reclaim anonymous pages if a migration path is available now that demot= ion > provides a non-swap recourse for reclaiming anon pages. > > Note that this check is subtly different from the can_age_anon_pages() > checks. This mechanism checks whether a specific page in a specific > context can actually be reclaimed, given current swap space and cgroup > limits. > > can_age_anon_pages() is a much simpler and more preliminary check which= > just says whether there is a possibility of future reclaim. > > Link: https://lkml.kernel.org/r/20210715055145.195411-8-ying.huang@inte= l.com > Cc: Keith Busch > Signed-off-by: Dave Hansen > Signed-off-by: "Huang, Ying" > Reviewed-by: Yang Shi > Cc: Michal Hocko > Cc: Zi Yan > Cc: Wei Xu > Cc: David Rientjes > Cc: Dan Williams > Cc: David Hildenbrand > Cc: Greg Thelen > Cc: Oscar Salvador > Cc: Yang Shi > Signed-off-by: Andrew Morton > --- > mm/vmscan.c | 34 ++++++++++++++++++++++++++++++---- > 1 file changed, 30 insertions(+), 4 deletions(-) LGTM. Reviewed-by: Zi Yan =E2=80=94 Best Regards, Yan, Zi --=_MailMate_BF9DAD1B-67EE-4C3B-9EE0-C3C40EC9816C_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEh7yFAW3gwjwQ4C9anbJR82th+ooFAmD4j9APHHppeUBudmlk aWEuY29tAAoJEJ2yUfNrYfqKCnkP/142QRxKYp0cxnJob46hPecYeinp/YiDrmoi JeiocVqCVW3FKctVffrfIcVh2FR1AfJfDHGfxhzx3N3FnCocDTINbHTFzxN9pxFY +Q9k2rMyKXSJh96y68o0cqyRklSpEYT62XTizVD0MhKJYSpqvndq/cexFoDTnlRw TzLtNHFg7hDqiI3v62Yj6xnoQAZLMZbRJ+rCpdzK51j4RZ+Kc6WqtF9zSI2yCtcY eRgUdAzVO3bdFMIgijgN4WFMGvYmD5zej8CNzlMGQS5jbHKKJLARV+emGiFYaQzQ OxQ6LtQkUfwruYql8t4h113iw3UmvXZh3ukPqZWOHkeFagaGaQi2CnwthFaaoWnt KnHIOGW8c33CTv/g7dHYFFwt0rDW5qo6wFnWNrdZlnGn6AgqLHpOao5H6/PJwlhH HxlUD/ekU1xLtZSUzFWky8gJHv0jHST/1zY1+KDN3IFpbRzmHp4jn4Wr4xcLAfyx wISUDnbFl4gpanyMZFbvcO7sVBWLxE8zuqB224Y8JD7nNuEdLVCnlb7MdhsfXh16 pf36TvBcU8Cla4QWgVHvpP+DDYDcEYahLI7e0UeQ/198SqBKzWEoiHZAr02Zy4AB HZ+zbk+E4d9KcPrK1y74yRkzSL2wb7pNueAJigfnxFGE1Lpk+JI4DgWtlUJog1IB hKF94YiK =ALFk -----END PGP SIGNATURE----- --=_MailMate_BF9DAD1B-67EE-4C3B-9EE0-C3C40EC9816C_=--