Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5711240rdb; Wed, 13 Dec 2023 18:00:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2OwlUMxh33ALexCRW2US2Sf8GScKXape4VI5uv/awMo8UcfzZ5jvHlO+MbbBuemTpWJjP X-Received: by 2002:a05:6359:5d25:b0:170:17eb:7c53 with SMTP id ps37-20020a0563595d2500b0017017eb7c53mr7071574rwb.38.1702519256973; Wed, 13 Dec 2023 18:00:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702519256; cv=pass; d=google.com; s=arc-20160816; b=YE7Nuc8ZSVfiImb3JA2Q7HWZDHSLd/1b4/CY3c+440xsB7WU1JsJp6/NULZ9cnA0+7 nNnYjYF/jx5+ORpsUn6XgzyostdljMUGva1ujYdT64ptkQSLbqan+ypnbu4yuchoMbWE FmmEE0QEmDn3tbLYdSszX+zt6VTFKD+GP21FtW2i/ID0zenLYc8vf88u5QRyftgImcH/ vU+OUeeXtGu2mEaqObh/+mNhaq/cShGXX1jNju/s1rix97xdKZGiubXLM7O+GXfYtmQA yPIi5QzaJTkY3EwpKiVXxizXn0bb9/7+bBCHPgkh6S/biPn5s2BRiFgoISHZNXVXuLUF mFOA== 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=Y82Nd/YJx9qdkMAGHqRyRRsCkFlY4IgWXddrILjk7b8=; fh=XO5N0W98WRSOhm3sAysMnSSmWSN+PiY6WRJfAL20E1s=; b=Dho29UFsagxcpEOWYR7uNcpEtrP8vJqYor3q8wA/YcGhCqkgvfBYzOoFK09/hQK5AX 7hqenYupdq0CwNxpoXseJvfiTpKBNMIX7TUBg/gLIYHeovEiaZ4nFJQYLw0MBQsTxEyh d3dvexKNrmkY49bDEGeZgmr6QLV31vOTk6B2Q14K6hHCl5vcLQnE4yaUPxLt6hOZyC6l zadmfiXEGTnqKb+oNsjzVqnYJ4ClpQP202i46CyG1Y650tSP0ZPih9KcciqdNZgTqmnu aJRIPEwLhaVTg4wiwoz1decmfsXCQfU3sdWzGth5P+7igQfjAP72Qe04nr2V7OjjtU4I P4ug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Jrw2Cmwp; 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 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id c32-20020a630d20000000b0059b79bf220csi10414414pgl.662.2023.12.13.18.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 18:00:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Jrw2Cmwp; 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 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 70B5E807FD7B; Wed, 13 Dec 2023 18:00:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234147AbjLNCAM (ORCPT + 99 others); Wed, 13 Dec 2023 21:00:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjLNCAL (ORCPT ); Wed, 13 Dec 2023 21:00:11 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2138.outbound.protection.outlook.com [40.107.117.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3912085; Wed, 13 Dec 2023 18:00:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FCR5A9OqoDwJEDRPSyMOy1Bb0BaIutvs0JKvYznb3I7n/T8/M0J4pywp2eLptZbjcfRxYIUhaeTPRS2xEcDyAA70xUWDC28reMfzA9+0p9E7Kp1xb79Sri9xsJlEakxmMs+HfQ/lumBdtzdG7dy53QE7JHAgw3cI7OEmXtD+pNfHUiOB8KQCvV2cFWzsxq/vvnL+tWktGz2L0pQFo4koF2VpiwODHwDaR4RQnDJQLZAT8fj2aRt/sp1NMsaEZFxr4v2V8XHrjFJ0jHmrlp6UXvvaed64gCVEwuD5k05YH4niNOPsamo8Hht7Z2nvcw3iu6GbaZb7QRleODPtm2mp0w== 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=Y82Nd/YJx9qdkMAGHqRyRRsCkFlY4IgWXddrILjk7b8=; b=A5kFEvME5JaE4kL7rLdsSASob4fPBNoK61alFxRNPGYzBT38bhjQPFuiKRqOd1JODF9zH3nyECa1v51rLtprNWEdailhg9TDV7JbWrnAsR6I+YU7QW6E5wasouT1vwtrm8Us6lZ1IxnNOSgQyCswYNHnlHaxCc9mPijoSa4bnlaRyu97IbmYddYF4TJuxEPZlOatg/bUelEjty2MtPgXYAzvc0DwcfwrAUPa7GySYEYcEDygL7aNYaviA7qO5uawz/xatprdhc9dzwaBu70moX2VItqc8/dAmT7X27sgzSrhzx4FLg5rKnxLq5suyVnf0QMHCJ3tnemsgsLp1CERNg== 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=Y82Nd/YJx9qdkMAGHqRyRRsCkFlY4IgWXddrILjk7b8=; b=Jrw2CmwpCzoecRzH6ue10BbZGoDWB3ZterBaWrpH469bRfuEITGpdJJNjDGlfoSQB5ZuJ/mnXwWMJT8Lv1vQDB25SE6EQ75FrQ0WAYE7cOluTUnGJsdaaKl6SJCcESW2YbTVAvDIHPqVKzIVfJ9swMiWuF9Ma8SHHjEP5MI6l0AOpCBaaOgcZXFXYms+GMZgv9xH9Qp2o1RYLKDwvaOJztHnUseCHMUtbYpjlXQOH9+xbPGXHtPAr4v/usbCDmhL0TccsfqsKjc3E9iSEmLghLzlUKGvUYmI1v6fRp4/9ORWinPwNbyWoiZH/97u3ss24a3kTkYft7bxjfZ2+uS9cQ== 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 SI6PR06MB7562.apcprd06.prod.outlook.com (2603:1096:4:21c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26; Thu, 14 Dec 2023 02:00:11 +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.7091.022; Thu, 14 Dec 2023 02:00:11 +0000 Message-ID: Date: Thu, 14 Dec 2023 10:00:02 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V4 1/2] mm: add defines for min/max swappiness To: Dan Schatzberg Cc: Johannes Weiner , Roman Gushchin , Yosry Ahmed , Huan Yang , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Tejun Heo , Zefan Li , Jonathan Corbet , Michal Hocko , Shakeel Butt , Muchun Song , Andrew Morton , David Hildenbrand , Matthew Wilcox , Chris Li , Kefeng Wang , Yue Zhao , Hugh Dickins References: <20231213013807.897742-1-schatzberg.dan@gmail.com> <20231213013807.897742-2-schatzberg.dan@gmail.com> <86984d9b-c955-4b06-9097-2a757b1bacfe@vivo.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: SI1PR02CA0007.apcprd02.prod.outlook.com (2603:1096:4:1f7::6) To PUZPR06MB5676.apcprd06.prod.outlook.com (2603:1096:301:f8::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PUZPR06MB5676:EE_|SI6PR06MB7562:EE_ X-MS-Office365-Filtering-Correlation-Id: 8c17c09c-c7be-4ab9-10e8-08dbfc48673f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V7PqWeog9BnIO8SseitkBlvIYc7GPyoQz31Lub450X/iUMukE+sR1iZJ35JfwJbthckDKJuX0ZQpN9Dd0YEIt5ahRWMYQ3EzSWRaV5jZhFWJFgJ2nnrDxqsdz9+PItnntLkdeglJgP1mqkO22EavlBzonfw2RUQdTMucHfRMrjbAzrscPqTAH/hrtEqdf2T7iMkFD8KNqzR9nqhgcMsA1UbDJeyJvAmmYN0Z9hUgSGAyRDUkywideIZ9zLKpG4S4nveF7C1yJEZPexgbJ45PLzuc9t2JkloasmC0zDjnK4dfxPeTCzJJBVvdMH6pczTGUw4mYzhYtUiP/BO487Lj5c/yscHQ1wbJF3pdHga5p7/D6H4mOJw5rJvqdBlkrCbUwKjObmOorzDiOhH/2aMAikhb9ZYLz99dDmMYvir/euQv/0MaRq/vSCRUBFUFmC+Lsy1KfNkiDvWzVwwwt3XJLDwtrXBdUJnjNQwv6QiiheEU1nFkrQjACo0QVbeC3zSpnhluoZfxqgrU1tGltpPN1uU0UlFXv3jecLOCtRsdTEfdXZ76P6d+e9BGldnjoKLt4n2BEbpUqD1fJQB4NH7oIfchWTxiBZHkbUweLjovQGcmCrksnf91H2rXYr8xZLQKuCnBPxOh74lIvi6AD02q7N7VPOqdGGUKOtwprPgqlHhHzjLpJ/xrpN3YfeyWX2IQBBBT55yzSVJaPhaatmrZCGc+BOo6XWEOXdmI2ydjstcmPHrtwc3OU2MQnWC7J9dW 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)(39860400002)(396003)(346002)(376002)(366004)(136003)(230273577357003)(230922051799003)(230173577357003)(451199024)(1800799012)(64100799003)(186009)(26005)(83380400001)(6506007)(52116002)(2616005)(6512007)(38100700002)(4326008)(5660300002)(7416002)(8936002)(41300700001)(8676002)(2906002)(966005)(6486002)(478600001)(6666004)(316002)(54906003)(66946007)(66476007)(6916009)(66556008)(36756003)(31696002)(38350700005)(31686004)(45980500001)(81742002)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YVpTNjNFWHpvbEFvVERGSGdmcW1tUGhJaW1MUHY4Qzh3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ES3JLT1R1alFmVjlQLy9CUDlpRXBnUlZOSkxpOVBtcllPajFFMGYz?= =?utf-8?B?K2x2R0t2eGhmRzVkYThXS2Q1T3gzWWhwdjJhSTkzRDBoUVNnMFBrR3IzK3A5?= =?utf-8?B?T0srN0w5bE05NFpQQzFEUWNJUmM4a3RuRlR4L1NCV3VQSDZNZjROeUpPZlRy?= =?utf-8?B?WTBhemNyQldDRkk4bzdHYU1QdG9ldzZOZUZVMTU3V3hzRENJaWNzVnlKVzB3?= =?utf-8?B?T0JRVU9Gd3JBZTI3aHRkWFBad3llaFVSL1NhZmJsZDBCeHFXUXBLYjZPQVB5?= =?utf-8?Q?kA2yxE5vZkk4LsM0CzYh2NsNW?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c17c09c-c7be-4ab9-10e8-08dbfc48673f X-MS-Exchange-CrossTenant-AuthSource: PUZPR06MB5676.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2023 02:00:10.5242 (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: iVE252FprsM52cLzBXfYdEoTmZgJMUz2GVP3D7uqgKK+u0eGuF3n+fsXkzYB54wud7VlV+RuO31O1uPjg+smAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI6PR06MB7562 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 pete.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 (pete.vger.email [0.0.0.0]); Wed, 13 Dec 2023 18:00:33 -0800 (PST) 在 2023/12/14 0:41, Dan Schatzberg 写道: > [Some people who received this message don't often get email from schatzberg.dan@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > On Wed, Dec 13, 2023 at 09:58:26AM +0800, Huan Yang wrote: >> 在 2023/12/13 9:38, Dan Schatzberg 写道: >>> [????????? schatzberg.dan@gmail.com ????????? https://aka.ms/LearnAboutSenderIdentification,????????????] >>> >>> We use the constants 0 and 200 in a few places in the mm code when >>> referring to the min and max swappiness. This patch adds MIN_SWAPPINESS >>> and MAX_SWAPPINESS #defines to improve clarity. There are no functional >>> changes. >>> >>> Signed-off-by: Dan Schatzberg >>> --- >>> include/linux/swap.h | 2 ++ >>> mm/memcontrol.c | 2 +- >>> mm/vmscan.c | 10 +++++----- >>> 3 files changed, 8 insertions(+), 6 deletions(-) >>> >>> diff --git a/include/linux/swap.h b/include/linux/swap.h >>> index f6dd6575b905..e2ab76c25b4a 100644 >>> --- a/include/linux/swap.h >>> +++ b/include/linux/swap.h >>> @@ -407,6 +407,8 @@ extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, >>> >>> #define MEMCG_RECLAIM_MAY_SWAP (1 << 1) >>> #define MEMCG_RECLAIM_PROACTIVE (1 << 2) >>> +#define MIN_SWAPPINESS 0 >>> +#define MAX_SWAPPINESS 200 >> Do MAX_SWAPPINESS apply for all swapppiness? If so, maybe better change >> swappiness sysctl define: >> ``` >> sysctl.c: >> >> { >> .procname = "swappiness", >> .data = &vm_swappiness, >> .maxlen = sizeof(vm_swappiness), >> .mode = 0644, >> .proc_handler = proc_dointvec_minmax, >> .extra1 = SYSCTL_ZERO, >> .extra2 = SYSCTL_TWO_HUNDRED, >> }, >> >> ``` >> >> Here hard code swappiness in [0, 200], and now add a new define. > Yes, MAX_SWAPPINESS is a hard limit. I'm not sure what you're > proposing here - the SYSCTL_ZERO and SYSCTL_TWO_HUNDRED values are a I mean, MAX_SWAPPINESS and SYSCTL_TWO_HUNDRED  all limit swappiness, but  are different definitions. If swappiness change 200 into 400, you need to change here extra2 and your MAX_SWAPPINESS. It's wierd. > little different than the defines I added. I think most of the value > is just consistently using the defines in the core mm code. > >> And many other code hard reference 200 into max value of swappiness, like: >> >> ``` >> memcontrol.c: >> static int mem_cgroup_swappiness_write(struct cgroup_subsys_state *css, >> struct cftype *cft, u64 val) >> { >> struct mem_cgroup *memcg = mem_cgroup_from_css(css); >> >> if (val > 200) >> return -EINVAL; >> >> if (!mem_cgroup_is_root(memcg)) >> memcg->swappiness = val; >> else >> vm_swappiness = val; >> >> return 0; >> } > This one is already fixed in my patch.