Message ID | 20231204102027.57185-2-ryan.roberts@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2665658vqy; Mon, 4 Dec 2023 02:21:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IERonUfceEttd9Xmmwb8UvZ6GwB3k7r/EWWT84YVINwtz38ETBBKolz0LlnlDOCcjeg5ltz X-Received: by 2002:a05:6a00:148d:b0:6ce:2731:e86a with SMTP id v13-20020a056a00148d00b006ce2731e86amr5311032pfu.49.1701685264850; Mon, 04 Dec 2023 02:21:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701685264; cv=none; d=google.com; s=arc-20160816; b=qwWWTxzonbkE1XDz9GemVq3obUXh01So5ofNoiRVnjdGOYqXNhgCK/HIWwUwrnfZbp XAeIF9bTFxlDtn5AEo7k+lWq7OMeIh70iMdyhuQV7eGVaV18um/qSDu1D4hx+3sAXsg3 gWpnxelUnhhVitfbQL9Ut35ssPCiyqcSG56R0mKtPVSjrq19osrw+BNAf6uxVvQElCUZ GkBJYattChxSVk3f5tHCPo4biJJCJv5/tolRkos7TFdMFXnAlX6tpDhEWKtZpJfikplW m4bTZfSVNICnHjCrsGJgqG0s6nk/TqmYyp3euj9Zdzfpx3lujdyaGHImQNmQE8BlpZdM Yqag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CJPAGE1/3ISw+ze65bWQIzZEE2gBo8Dj89YFaGopP8Q=; fh=dGb51qHWul9YcYD2Zkvz1BCqvYAFqBQHUAINwPQyDXE=; b=YkIayjnW+raDHujBW7lS5oImQKQweFwLuxWLvSmTC5IxBTO6ez6YIv70K0KM498GYM F4AODaOPhVQjO5ydAZqcuIAVmYylvu9Lx8BKVi2aF4p3GYDupa1TaUWtBRwrtF8NprD6 mPzzJU1Db20WeP0v2B3U4XEst42MEOF9zDLIb0hrBieR1xU4JhNrb9pLb1++udRCPuDO ctLvYUVjswBAuXMnIDEgyGsfCgLGrc7ezW+FDqTDcGwmNeCHX22KUhLpX3RutODMkWP8 fsHBqMy6CelBo+l13PWt0vkEDsLxIGPsdozfoBVGutOsZ3vpnu6vP0HaqE4l9T06CFx0 u6iA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id d3-20020a63ed03000000b005bd04d27b69si7564586pgi.725.2023.12.04.02.21.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 02:21:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E060B80784E2; Mon, 4 Dec 2023 02:21:01 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234817AbjLDKUw (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Mon, 4 Dec 2023 05:20:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343832AbjLDKUt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 4 Dec 2023 05:20:49 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EB450E6 for <linux-kernel@vger.kernel.org>; Mon, 4 Dec 2023 02:20:54 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E434C1684; Mon, 4 Dec 2023 02:21:41 -0800 (PST) Received: from e125769.cambridge.arm.com (e125769.cambridge.arm.com [10.1.196.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B24C13F6C4; Mon, 4 Dec 2023 02:20:51 -0800 (PST) From: Ryan Roberts <ryan.roberts@arm.com> To: Andrew Morton <akpm@linux-foundation.org>, Matthew Wilcox <willy@infradead.org>, Yin Fengwei <fengwei.yin@intel.com>, David Hildenbrand <david@redhat.com>, Yu Zhao <yuzhao@google.com>, Catalin Marinas <catalin.marinas@arm.com>, Anshuman Khandual <anshuman.khandual@arm.com>, Yang Shi <shy828301@gmail.com>, "Huang, Ying" <ying.huang@intel.com>, Zi Yan <ziy@nvidia.com>, Luis Chamberlain <mcgrof@kernel.org>, Itaru Kitayama <itaru.kitayama@gmail.com>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, John Hubbard <jhubbard@nvidia.com>, David Rientjes <rientjes@google.com>, Vlastimil Babka <vbabka@suse.cz>, Hugh Dickins <hughd@google.com>, Kefeng Wang <wangkefeng.wang@huawei.com>, Barry Song <21cnbao@gmail.com>, Alistair Popple <apopple@nvidia.com> Cc: Ryan Roberts <ryan.roberts@arm.com>, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Barry Song <v-songbaohua@oppo.com> Subject: [PATCH v8 01/10] mm: Allow deferred splitting of arbitrary anon large folios Date: Mon, 4 Dec 2023 10:20:18 +0000 Message-Id: <20231204102027.57185-2-ryan.roberts@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231204102027.57185-1-ryan.roberts@arm.com> References: <20231204102027.57185-1-ryan.roberts@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 04 Dec 2023 02:21:02 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784346327984653697 X-GMAIL-MSGID: 1784346327984653697 |
Series |
Multi-size THP for anonymous memory
|
|
Commit Message
Ryan Roberts
Dec. 4, 2023, 10:20 a.m. UTC
In preparation for the introduction of anonymous multi-size THP, we would like to be able to split them when they have unmapped subpages, in order to free those unused pages under memory pressure. So remove the artificial requirement that the large folio needed to be at least PMD-sized. Reviewed-by: Yu Zhao <yuzhao@google.com> Reviewed-by: Yin Fengwei <fengwei.yin@intel.com> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Barry Song <v-songbaohua@oppo.com> Signed-off-by: Ryan Roberts <ryan.roberts@arm.com> --- mm/rmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/rmap.c b/mm/rmap.c index de9426ad0f1b..2a1e45e6419f 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1518,11 +1518,11 @@ void page_remove_rmap(struct page *page, struct vm_area_struct *vma, __lruvec_stat_mod_folio(folio, idx, -nr); /* - * Queue anon THP for deferred split if at least one + * Queue anon large folio for deferred split if at least one * page of the folio is unmapped and at least one page * is still mapped. */ - if (folio_test_pmd_mappable(folio) && folio_test_anon(folio)) + if (folio_test_large(folio) && folio_test_anon(folio)) if (!compound || nr < nr_pmdmapped) deferred_split_folio(folio); }