Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp744291rdb; Thu, 30 Nov 2023 18:14:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOHuFKMYP7MARhli47dNjk9FVj+D4d6ViB68TH7Q6LLcVIZ08mP1vPjSoCH4+zaWbgLN5l X-Received: by 2002:a05:6a00:a0b:b0:6be:559:d030 with SMTP id p11-20020a056a000a0b00b006be0559d030mr25373172pfh.19.1701396856349; Thu, 30 Nov 2023 18:14:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701396856; cv=pass; d=google.com; s=arc-20160816; b=QAaBGUntgdcWde0XJ7QOvwVPKpKvleRGcyYhjxAr+7al3RSBrAiBdB1ncW+sxWUiSl u5dg/mik3JwzAanwXN3K0tZTetKxOGZH6EQ1YJAEnIOfK/rERYJ9ner8HmAiH0w2uB09 i4/CTt9KiUlCQQQZ+yWFEMr6Uj0Ol5781msdsLfElhZD+EhIl0miJ6EpSuBRcxu2KCBw PbIdOidGm8hQEeaIh0SztUWbtTDDxhrhYprMxSeYHVHskMUkMixLPcKCtsC2/jhoB3Bz UoumPC1WmWfZrFvJOwqIrSnPzUOBe2J7GEUeYiwQzJ5VxfC/9acPqXLhW5gSTQutlNMZ TO5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:subject:user-agent:date :message-id:dkim-signature; bh=lvY2NvlvqTAames2zA9gKuIi5NWGpocv4rnlEWye6+c=; fh=aUB/loZFFO2OnR+GYH2HKI0sP10W1nfKfexcTvhSJHw=; b=Os5ZRZQxVxJQ2+/n29yNiM+ZtTBpdT5Hpr4cHx8hvRuQRYd11b8/VS55I4nkC7IpeX +6hDSj62uGBh0ul4FLu2TIkBPyxeIzNFMtlvSNo8hdM7W6KgBjZUzGqtgJ7lkrPlYYQX Gwhi2FdescGuAvNA/LgerAwuOiabRHesELy/z/gkhk4PZ7I9JGP9HIvaDTxXFq3z1iDP V9mb1cyuuBxm0yVdmyDi3CIrY48Fw3mmiFoZs9J0vqesAZ2LbCnAS4t6BR7U2VrJb1C3 41pRTIgE8AxvA4gm1FB1ueC4I2DnNmR6em666v6d+Mcuhb+0194lcyuL2+LNMCSN5LBX T0Qg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ic6YaAEH; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id 69-20020a630048000000b005898e5f41f8si2532587pga.53.2023.11.30.18.14.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 18:14:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ic6YaAEH; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id C858A80B19D6; Thu, 30 Nov 2023 18:14:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229904AbjLACN6 (ORCPT + 99 others); Thu, 30 Nov 2023 21:13:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbjLACN5 (ORCPT ); Thu, 30 Nov 2023 21:13:57 -0500 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2108.outbound.protection.outlook.com [40.107.255.108]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10A3E112; Thu, 30 Nov 2023 18:14:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B8eyqaLDqoLAuruXvTpTgd2qSu8HiQOMTJm8iAdtvQ7ehZZAubjj0L32rF+u0g2PfCUFiQl/DxU9+cQ8H6MEWDAONoWDPdAfsgo5tSpd1E5700Qd6sNiApLyHi6QLUIzuaiOVXvt4boOKXmuyxtTxopwqD2z0E27wN3gKHLL8bmrPh1GsSOWni8d5tPRTgLCl4CUdyjDZUc29CA5tMgPlY+Rzt4vCm1uUNb/SCb1RqOwfE7AL28nwQDG1NvbXOur4fp9Wr3NET7MkHsAEs2HMxuXa7aWx/JoOYGs+772oNfnCuQC2dT4Qimf8T2JrgONZ6IMWhuxTWPO31OQOqnhIQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lvY2NvlvqTAames2zA9gKuIi5NWGpocv4rnlEWye6+c=; b=KWmkdOTJ+sjhYrdKfkVf7J9WjEM6LvZP2Bj5q4rCBekalRIlnKf4dlbh6bpjBbFFRgX5B0NAzZNA54QIn4txqrle+N3DUkwngaNgp6/qUNiP+CtRzxbIpt+Wn7vg/hRmZDrEaA608W2KLLc7P+DuxKAaF8IxB8wGKf5XDfcjr1ELUaY8s62sN+EKZ/tyZZBV91bh+pwRGOzxVvH6gJdq3I3rY/AfqyUvmVBRBce9bmpsg7PxYaSNQAI7O01Pqj+RAlLrL2xmqBx7+xZIupEFKBL7SO/5T2pS1Ks86eJQYez24Y0q65BDHN5NL80Ajr9X+WXNNgxjbpSKYCv36JfxTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lvY2NvlvqTAames2zA9gKuIi5NWGpocv4rnlEWye6+c=; b=ic6YaAEHEnLkh3eT8cqqa76KDXpbwJsxeV2Tny1pUEaobxs5F7eXYQRK5SEu56nk/iRPgqUF64PclSgK1bLUjuDWgzdaa/h7k2uiuMKJwtIP765OibIOcp7OQodrXDTJmiSDRhpnLDO1JKeucdf8rXyNgNSCQlQenO9cdCNVE0e/msmBdpKzUI6240h9SqcOxF5yFNve33M9OKrmS1eE8wBLPx+4nxv0od5Z8V7FlZOm0KMy/CklznwJjpwiJS6yriz9g2WlAjVPKtjj/7DwF1o/EvwMYCfyqFygYen6DhyWHulqJVavzaaHd2K0f4dYpZf7Xw7PxPbLFF+kvJX9hw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from PUZPR06MB5676.apcprd06.prod.outlook.com (2603:1096:301:f8::10) by SI2PR06MB4609.apcprd06.prod.outlook.com (2603:1096:4:142::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.27; Fri, 1 Dec 2023 02:13:56 +0000 Received: from PUZPR06MB5676.apcprd06.prod.outlook.com ([fe80::d754:7b3:dc4c:6b48]) by PUZPR06MB5676.apcprd06.prod.outlook.com ([fe80::d754:7b3:dc4c:6b48%7]) with mapi id 15.20.7046.027; Fri, 1 Dec 2023 02:13:56 +0000 Message-ID: Date: Fri, 1 Dec 2023 10:13:50 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] mm: add swapiness= arg to memory.reclaim To: Yosry Ahmed Cc: Dan Schatzberg , Johannes Weiner , Roman Gushchin , Huan Yang , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Shakeel Butt , Muchun Song , Andrew Morton , David Hildenbrand , Matthew Wilcox , Huang Ying , Kefeng Wang , Peter Xu , "Vishal Moola (Oracle)" , Yue Zhao , Hugh Dickins References: <20231130153658.527556-1-schatzberg.dan@gmail.com> <20231130153658.527556-2-schatzberg.dan@gmail.com> From: Huan Yang <11133793@vivo.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG3P274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:be::18) To PUZPR06MB5676.apcprd06.prod.outlook.com (2603:1096:301:f8::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PUZPR06MB5676:EE_|SI2PR06MB4609:EE_ X-MS-Office365-Filtering-Correlation-Id: 3c7aa811-c018-4375-352c-08dbf2132bba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 02asBQPUeTYmKv7MChC9iiXZjeVVo+/fpV88hYREV94AYzVW/OEkhBDJCPwc2V4F5n+XwssSnOtGccgawtY0sZ9zLpPaN2lcxSnRDW5wtGJzQsL7hAoiKS+mtWhMVNpAdv2RzXAu55IYN5ZLlvYxz9/CUOGBvCTx1PFW2PnLibVGvjncIltw21N2eAxwTvwD1loiCGMN+3wi3wu2WO/k/2qhdFA95jmaKIS6/mN/htkdIeAYVmw2e61s38JxiGrZHWcrtO69lbFJOEmLDMQh0Y0I4/oW91p0NBAU+W5hvsvn/ch/wAfgFCEFFH1IdWhmWjd/GZV7mp+/m7Jp4DxxXQKVbp7jpwM7CpIqKwVHo+3rOM2ygsiy7x87eUsLZ1ST32OnMqqbt0GZjpFxFc3yGJYrINCpRe0mpucWcJKz5urUWujmaTl+UrRUnWxg6Eu6F8yEsYKOd9wVFzetQxeq/C8sw4ss6a8rlzglKhkZpPEs+HoZK99ApXKFYF+aNe4n6E1KKuIGFtpRgiXQSBcXaAe/V7GL1gNbmp2ocBduDtmhP+O+Jm71jZvH9uaIVOSLEliXZsRv7/oYX6wCV1dSq0ysK64Twm+1BxoELKsPU+NRHJZ+6oUvIb1OpP2oc0kBDM9AWL7blvU7Mi5Z2pxqaf3fFj497/c+tO7RSYUaaWhWYMrxHT9QNgStPg6JPUrh9KopCtbipm3ptp2NsXNPiw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PUZPR06MB5676.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(346002)(136003)(396003)(366004)(39860400002)(230922051799003)(186009)(451199024)(64100799003)(1800799012)(316002)(66476007)(66556008)(66946007)(6916009)(54906003)(6486002)(478600001)(6666004)(5660300002)(7416002)(38350700005)(41300700001)(36756003)(38100700002)(2906002)(31696002)(4326008)(8676002)(8936002)(2616005)(31686004)(26005)(6506007)(52116002)(6512007)(83380400001)(81742002)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?emtZOXZ0VUtKaDRESkZFU2l3WHhoZ251K3l2NEJhZlczejRGeDlEYlhhUkNQ?= =?utf-8?B?YzBvazNOeGhNRWJYTmY5L0lLMEJ0c3ZhOHdiV2RMa1dvdzE3d2ZCMzZlZ1Vl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cXJrRzV4WFdjcVVaVGdn?= =?utf-8?B?T0VSNmhyUGVCTWFkdTNpYWlSMWwzbTRrNjhXbUN2NWVMbXdiTitLRnpmYVhr?= =?utf-8?B?bSt6NjliLy9UK1liL1AyUkFMRkdQYlVKVkRvaFIxTDRUVCtZY0dlYUNpK1F1?= =?utf-8?B?UTNRNUJYWmUxc2h6L2ttUFBTYTJ5N2FkVWhpWkoveGdkNEFsZDRJNTllc3Bj?= =?utf-8?Q?qdqvsbBY7Bc2bK9fJruRmKqI6?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c7aa811-c018-4375-352c-08dbf2132bba X-MS-Exchange-CrossTenant-AuthSource: PUZPR06MB5676.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2023 02:13:55.6412 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mPFklL2qL54FWxO6CWlt/+O+y3ms7nrQoF9+kedEZO8XKI7ZktZzoQFJNHriI11Wa2OOc5OwVYVxAH2xFzkEpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4609 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 30 Nov 2023 18:14:13 -0800 (PST) 在 2023/12/1 10:05, Yosry Ahmed 写道: >> @@ -2327,7 +2330,8 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc, >> struct pglist_data *pgdat = lruvec_pgdat(lruvec); >> struct mem_cgroup *memcg = lruvec_memcg(lruvec); >> unsigned long anon_cost, file_cost, total_cost; >> - int swappiness = mem_cgroup_swappiness(memcg); >> + int swappiness = sc->swappiness ? >> + *sc->swappiness : mem_cgroup_swappiness(memcg); >> >> Should we use "unlikely" here to indicate that sc->swappiness is an unexpected behavior? >> Due to current use case only apply in proactive reclaim. > On a system that is not under memory pressure, the rate of proactive > reclaim could be higher than reactive reclaim. We should only use > likely/unlikely when it's obvious a scenario will happen most of the > time. I don't believe that's the case here. Not all vendors will use proactive interfaces, and reactive reclaim are a normal system behavior. In this regard, I think it is appropriate to add "unlikely". > >> u64 fraction[ANON_AND_FILE]; >> u64 denominator = 0; /* gcc */ >> enum scan_balance scan_balance; >> @@ -2608,6 +2612,9 @@ static int get_swappiness(struct lruvec *lruvec, struct scan_control *sc) >> mem_cgroup_get_nr_swap_pages(memcg) < MIN_LRU_BATCH) >> return 0; >> >> + if (sc->swappiness) >> + return *sc->swappiness; >> >> Also there. >> >> + >> return mem_cgroup_swappiness(memcg); >> } >> >> @@ -6433,7 +6440,8 @@ unsigned long mem_cgroup_shrink_node(struct mem_cgroup *memcg, >> unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *memcg, >> unsigned long nr_pages, >> gfp_t gfp_mask, >> - unsigned int reclaim_options) >> + unsigned int reclaim_options, >> + int *swappiness) >> { >> unsigned long nr_reclaimed; >> unsigned int noreclaim_flag; >> @@ -6448,6 +6456,7 @@ unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *memcg, >> .may_unmap = 1, >> .may_swap = !!(reclaim_options & MEMCG_RECLAIM_MAY_SWAP), >> .proactive = !!(reclaim_options & MEMCG_RECLAIM_PROACTIVE), >> + .swappiness = swappiness, >> }; >> /* >> * Traverse the ZONELIST_FALLBACK zonelist of the current node to put >> -- >> 2.34.1 >> >> My previous patch attempted to ensure fully deterministic semantics under extreme swappiness. >> For example, when swappiness is set to 200, only anonymous pages will be reclaimed. >> Due to code in MGLRU isolate_folios will try scan anon if no scanned, will try other type.(We do not want >> it to attempt this behavior.) >> How do you think about extreme swappiness scenarios? > I think having different semantics between swappiness passed to > proactive reclaim and global swappiness can be confusing. If it's > needed to have a swappiness value that says "anon only no matter > what", perhaps we should introduce such a new value and make it > supported by both global and proactive reclaim swappiness? We could > support writing "max" or something similar instead of a special value > to mean that. Yes, use other hint more suitable for this scenario. However, from this patch, it seems that this feature is not supported. Do you have a demand for this scenario? > > Writing such value to global swappiness may cause problems and > premature OOMs IIUC, but that would be misconfiguration. If we think > that's dangerous, we can introduce this new value but make it valid > only for proactive reclaim for now.