Message ID | 20231019134211.329-3-justinjiang@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp391688vqb; Thu, 19 Oct 2023 06:43:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8OugXd+jfZ3sHUfao7VEIbGzHYxJIeEpOITd2u7Ez/ngc146ubJX4G+ij6DqyMEMqRgiw X-Received: by 2002:a05:6359:b97:b0:143:96ac:96ec with SMTP id gf23-20020a0563590b9700b0014396ac96ecmr2199150rwb.25.1697722983647; Thu, 19 Oct 2023 06:43:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697722983; cv=pass; d=google.com; s=arc-20160816; b=ZR4Wy4grvE3BpZ9gYnUiuP2NcOM8OjUG73thR5gzln4S2Vl8LZHpAER7qBiOF9458/ 4rLcz/w73kfrgrGZ9z2O4wT9rL1j9D0JztFNl6Hogh0r7qb+mD5W7DWW75alMGeXEkyq O6zHVVxXGf5nQN+MZiGmLTpm3RxHnd6wmGON2i+C68m+XHwkg2GiH7BGYPbjX2cQCb0m EYh/C8TxQoBSVZ9OVsWWt1NjJxfQRlwZWf8Y9SGOukfXAd1bQ1SV74LGdHcObkMYJW/2 CJkBBe0IYx2gBJW8l5u0Pi3j2lv9uXPEb/SA9kJqRaozCTo54Pt7pwdBlqO/fyJ2bQSy YHwg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=G+W6fmJ72ArZzY33LmCyBv0xsV450yR0iejgRMpA4iw=; fh=c2eYxmN/YNr2ouhP31X3BrePKjLzNfOQt6lh5667ppQ=; b=EjVr92ZYj+BfMgAz2vFKkHcNNkSulbw1EiyGKtZ6cmRS6nu0hkpsYN27Hkncef443A nVdfeibkZOzLB/xaZkpxZVThzXeFDyjiCFWMQkL3jbwmMNsRNSajadZhqg6VNBAZo6mG EfldgLgSCf+rNJwI6szbhXueO7jvBOlbDLb/OUSwttXZnWHSQNyBvrvGig37bHuC0oQ2 XwO3S0EM8gM3NdleoQ05lU1KiWp3qEsgV3XHvkFkeDigCfRT8T2sRnd8+MKj1yb+5K4D bIAWkqKvwb0q9RgMWOaPkCT3WtUkoQvS92S/E59amfOiVkSq0fn4wBQ1BRaRIl7ThtAA sKKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qD+xncfi; 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:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id e16-20020aa798d0000000b0068e26ca7f00si6088845pfm.39.2023.10.19.06.43.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 06:43:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qD+xncfi; 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:2 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 agentk.vger.email (Postfix) with ESMTP id A31F4819D1DF; Thu, 19 Oct 2023 06:43:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346107AbjJSNmq (ORCPT <rfc822;lkml4gm@gmail.com> + 25 others); Thu, 19 Oct 2023 09:42:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346091AbjJSNmj (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 19 Oct 2023 09:42:39 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2098.outbound.protection.outlook.com [40.107.255.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73B2511F for <linux-kernel@vger.kernel.org>; Thu, 19 Oct 2023 06:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iHr84kSY07B+RSsphp5Ux0rn81eNb0ZCbK9Sn8gj915f+JwS0HzaIbCK2ULFFJzIfioZC49FKTXfObH74y1y9xWV5zRvtyjBJ2sMI5RqpU26CFHzEcCM7mO+jVqOISb6R+mWaG8YUWIsmTvilqVMpvxyFPFgEfZEFZx//monmzyijYA1/BlJu2ReSGaDS4O9m/CkCzZBa4yO5+OXfaFWDwEmsqsCywfS77itiJ4rX0l2vZgzXLOpCX0zRY+FXTBI2L0gKq8vhCo0sFtT2zCw+mINZO2ylETeG+E3vUrcdDCxGgDDoj+5nGo7NEomeNW5VuB8NlM4m0EDs8y1xmQWKg== 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=G+W6fmJ72ArZzY33LmCyBv0xsV450yR0iejgRMpA4iw=; b=mC64egYSKqv+/EvIFy7tGJsAD52Mu9lL2i/mZITg20Ey5lqnSLLiaf1Y78/U1gl6Mjm5JJBl0m4tSASDqwQFR/X4a04QfS627zo5Hms+bHAsnrQ+s2pUDB5zQ9Dwx8qZB3B8/P1MA5ZwHjvCXN7n/kJgHy9Yais0PUz8UWSIOnM4VbiFEb3OADtwUKwfqgxCd2cT9xwWz7N683wpD/Yv4KFQwSNpTXWatdf9Q80S0MN1Rlo0CkgACIjhbgHrkN5upvHbWq+gMB/o9RDEjpZ1JVgUVYq74sRNUVt+92tZphzoli+6JG3EbQjmjiCVViUFrPIvIGhg7Ioe1NWPuclr4w== 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=G+W6fmJ72ArZzY33LmCyBv0xsV450yR0iejgRMpA4iw=; b=qD+xncfiUk/9CmKZ/LpYvkfmwljnn/MWxnGJn0bxoOqd8ZjRt2Rd8LTsSX9FwijGHjEp07GA4QRQKelhbyWwNLy72x728Y9aSvmhUUXll+KhhcPF+kb2yDCw0gIWqxL60Og7ArFLcL66I0MxAhH545EYXQeYNiLS5WC0j/Ls0C+zw0yf1dWoiUnMo5sIeYcq0IaJrUoYjqwPtD72fFa6VE0an1XhjacYwL5xfT14x6bJ5mI8uc38O7+a+ziTWhOAElcCf4hRa6hc0uile0GTbxcyQiaYFQvslThy5hwkBJZ1UH2zkAhNZN1ENas41GRTrL3xN4nPhbjjbILz2ygBQA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) by KL1PR0601MB4100.apcprd06.prod.outlook.com (2603:1096:820:24::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.24; Thu, 19 Oct 2023 13:42:26 +0000 Received: from JH0PR06MB6849.apcprd06.prod.outlook.com ([fe80::32d4:1209:6b36:86e5]) by JH0PR06MB6849.apcprd06.prod.outlook.com ([fe80::32d4:1209:6b36:86e5%7]) with mapi id 15.20.6907.025; Thu, 19 Oct 2023 13:42:26 +0000 From: Zhiguo Jiang <justinjiang@vivo.com> To: Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Zhiguo Jiang <justinjiang@vivo.com> Subject: [PATCH v2 2/2] mm:vmscan: the ref clean dirty folio skip unmap Date: Thu, 19 Oct 2023 21:42:11 +0800 Message-ID: <20231019134211.329-3-justinjiang@vivo.com> X-Mailer: git-send-email 2.41.0.windows.3 In-Reply-To: <20231019134211.329-1-justinjiang@vivo.com> References: <20231019134211.329-1-justinjiang@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0141.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::21) To JH0PR06MB6849.apcprd06.prod.outlook.com (2603:1096:990:47::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: JH0PR06MB6849:EE_|KL1PR0601MB4100:EE_ X-MS-Office365-Filtering-Correlation-Id: 863f265c-b576-482c-42c0-08dbd0a93ae4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o85Ct6fU1hRIJlr4fvQgZ4xljBU6ZeMbcJOWw3UWvRHQxZU2BTYcwF+TFSDM7w6WfGAdUeWCnnC7Q4iLxBxqC1CX+WJTgfvVLqcs6ylH1XiJyqnRPXKMoE1ue+TpfUI1+X7GHJ3VH/qANNnWxzO82U5hR9E3HPs1eikVQDRHO87uOFuxmwlN6zsaVQ04gWLVcG+yWF0WlgICZXVa21glkFZc4PxSAI54e6UXOGc4uGUQp69YjWZCGF5E1Vhw2JPp7heWrZhp0UkN6ymygcCV/nzo8dELABQ5yCTPGSMlM6QSUFeV6TtIyP2iBOmhMmd4bPRaSMNGLdqzsjR41XsWjyDGSM5p2TLvaJandXp4ShbH2arohIc4r0O+D0fJCLzfBXIXbZsB4cIvGXWJ7ENpcNZ8iiQ8F5azMxi8PDu2wwd9jB8Yd346SEZUANsSw6mv3jqCb0o7+bwTU7Nd+h7oI8LsuafrcM4xa1K9NE3WhbJDFsVeQDReYG17qAQxnm0JuiFD/v0cT4hSwoMCPT/eUkGvbTnSvJqLpsUqzu8pnZNCwHfLXWQZsCrNXQpiMqvVMRC8LgC9g2jsgII+1NeY39UU3Zw3YIM3vih9Ut8CnZFuABmrKR3unC6/+gXTx4bEOSxEz+DzYUE1wBy88+0ilw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:JH0PR06MB6849.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(376002)(136003)(366004)(39860400002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(8676002)(52116002)(6666004)(2616005)(1076003)(6506007)(107886003)(26005)(66476007)(478600001)(316002)(66946007)(8936002)(4326008)(66556008)(6486002)(83380400001)(38100700002)(6512007)(2906002)(86362001)(41300700001)(5660300002)(4744005)(38350700005)(36756003)(14143004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vxuWMr/qkh4P3rDyBNzchSrKLXEPXnT26oCMHv1XUzAtgWlqAYT+DitUl/0/rV8puTI8+NtJZkEuPOdB6yD/OmamNZaX7ChGg8GdfN8hxCr7Jk7hCmS/p6YLvISP5QfJ3nS+PxOHV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wkIj4shkzd+hXbdDrJ21OF5M8poI5t6DF7NgKTpRt+iG4lky1lPOSMrCicnrFQXqSS8QNQPo/5Bi24yUPG9UuM/KQjtS+K7vwNSEOh8cGS2dVQD5MCOA8Fv5S+jB80dn6CSVKUj6Z1oGo6rbWpdSEY2tlXVKFmD2jLxjIvdWjzs0FPLM1veZ/kW9YMnkbXXknq4rq/H4NR3hfvKKKWPGqAHc84Gmf9XOIF2+n5mfCUWDenMhq6LKwAXtSNM/cJhJqxgumohDG5Uev1gxlsBzRwiJx3Ui7yIQM3DU4ONDWAYbfgKECT5FEXxwssJstM/BlFViBC5hP3JfiTseXnVPsOB+PtHMYtgQ1dIJlCvCy5+PLCKtlIIsaAGEsEzCzhE7 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 863f265c-b576-482c-42c0-08dbd0a93ae4 X-MS-Exchange-CrossTenant-AuthSource: JH0PR06MB6849.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2023 13:42:26.0515 (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: I2oQnwRFw01JwdmNEf2Q5NOLVoVehcOzW/SYCZoYsqrfydReH3QCkOJmsTdbUL2iFgPlnxFGGu+4m7alQdft+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB4100 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 19 Oct 2023 06:43:01 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780191575107486977 X-GMAIL-MSGID: 1780191575107486977 |
Series |
mm: the dirty folio unmap redundantly
|
|
Commit Message
Zhiguo Jiang
Oct. 19, 2023, 1:42 p.m. UTC
If the dirty folio in folio_list which is inactive file lru is
FOLIOREF_RECLAIM_CLEAN, the dirty folio can skip unmap in advance
to reduce recyling time.
Signed-off-by: Zhiguo Jiang <justinjiang@vivo.com>
---
Changelog:
v1->v2:
1. The dirty folio in folio_list wich FOLIOREF_RECLAIM_CLEAN skip
unmap in advance.
mm/vmscan.c | 3 +++
1 file changed, 3 insertions(+)
Comments
On Thu, Oct 19, 2023 at 09:42:11PM +0800, Zhiguo Jiang wrote: > +++ b/mm/vmscan.c > @@ -1225,7 +1225,10 @@ static unsigned int shrink_folio_list(struct list_head *folio_list, > stat->nr_ref_keep += nr_pages; > goto keep_locked; > case FOLIOREF_RECLAIM: > + break; > case FOLIOREF_RECLAIM_CLEAN: > + if (dirty) > + goto activate_locked; Why activate_locked and not keep_locked?
在 2023/10/20 11:29, Matthew Wilcox 写道: > On Thu, Oct 19, 2023 at 09:42:11PM +0800, Zhiguo Jiang wrote: >> +++ b/mm/vmscan.c >> @@ -1225,7 +1225,10 @@ static unsigned int shrink_folio_list(struct list_head *folio_list, >> stat->nr_ref_keep += nr_pages; >> goto keep_locked; >> case FOLIOREF_RECLAIM: >> + break; >> case FOLIOREF_RECLAIM_CLEAN: >> + if (dirty) >> + goto activate_locked; > Why activate_locked and not keep_locked? Hi, This is a mistake, should be keep_locked.
diff --git a/mm/vmscan.c b/mm/vmscan.c index e067269275a5..e587dafeef94 100755 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1225,7 +1225,10 @@ static unsigned int shrink_folio_list(struct list_head *folio_list, stat->nr_ref_keep += nr_pages; goto keep_locked; case FOLIOREF_RECLAIM: + break; case FOLIOREF_RECLAIM_CLEAN: + if (dirty) + goto activate_locked; ; /* try to reclaim the folio below */ }