Message ID | 20240704043132.28501-44-osalvador@suse.de (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2CECC3065C for <linux-mm@archiver.kernel.org>; Thu, 4 Jul 2024 04:33:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7543E6B00CE; Thu, 4 Jul 2024 00:32:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6D1946B00CF; Thu, 4 Jul 2024 00:32:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 522846B00D0; Thu, 4 Jul 2024 00:32:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 2D6BC6B00CE for <linux-mm@kvack.org>; Thu, 4 Jul 2024 00:32:48 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id DF868A3D40 for <linux-mm@kvack.org>; Thu, 4 Jul 2024 04:32:47 +0000 (UTC) X-FDA: 82300799574.14.64DA18F Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf02.hostedemail.com (Postfix) with ESMTP id E81B28001E for <linux-mm@kvack.org>; Thu, 4 Jul 2024 04:32:45 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf02.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720067546; a=rsa-sha256; cv=none; b=wExYjLbbWYkKwv5UQC/197AHGMxZ9k+9+qRVXl66BzMdK2m/jRJ75/ayvMiVIUBj6i5ojT WKVnWJHUb2t4lxDc8Uva12cGQqlcFdwLvdZtULacOiQcB7m0qgnuEns4Yf7vuXRgUdUkif 8KxJOw32cQzBU1e4d+9pL/UaQkalXxE= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf02.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720067546; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kK41s/CyBLAGFygZDMCjq8VuA+rrMM/fx7eQHYvrz/w=; b=72jjobuYfCxxjHuETXefPlCAmMiZ0W7YEs5bE4bgFLx/Gt3DTUc790PXYcJcgniGBrtUdD tEZv6eo08SbNDCggOe+ZtBbNn/02k6NO6Isuw59RLHBOFn7wVvMj74O1z0F3FfF6EryuCs FXI4Fvgmi4qGNIfTePfpofwba+CGuDo= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A41351FCFB; Thu, 4 Jul 2024 04:32:44 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8D0C513889; Thu, 4 Jul 2024 04:32:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 2IqsHeslhmbnDAAAD6G6ig (envelope-from <osalvador@suse.de>); Thu, 04 Jul 2024 04:32:43 +0000 From: Oscar Salvador <osalvador@suse.de> To: Andrew Morton <akpm@linux-foundation.org> Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Peter Xu <peterx@redhat.com>, Muchun Song <muchun.song@linux.dev>, David Hildenbrand <david@redhat.com>, SeongJae Park <sj@kernel.org>, Miaohe Lin <linmiaohe@huawei.com>, Michal Hocko <mhocko@suse.com>, Matthew Wilcox <willy@infradead.org>, Christophe Leroy <christophe.leroy@csgroup.eu>, Oscar Salvador <osalvador@suse.de> Subject: [PATCH 43/45] mm/memcontrol: Make mem_cgroup_count_test_walk skip hugetlb vmas Date: Thu, 4 Jul 2024 06:31:30 +0200 Message-ID: <20240704043132.28501-44-osalvador@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240704043132.28501-1-osalvador@suse.de> References: <20240704043132.28501-1-osalvador@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: E81B28001E X-Stat-Signature: pjtxduede9a5id9znkgg5y1r7nb6na6u X-Rspam-User: X-HE-Tag: 1720067565-913941 X-HE-Meta: U2FsdGVkX1/nNmEMW7LiY+281YvkKOoo8tOMDCh8XX9HnlZ1/gmiqWfa8eWj6UPbUttHV/FnUfRDAxkT/t+NiwiBTI36cuYpv4DsQhqTXPH/wPhxJLW7Y5loSBlY0oKRySrMiB9TKyBgGXyuOCA0QYZv7VMrE6TGSsqJGXSTa/ibfWfimvq74XFTLXJoiTsVv1KEAfZW6kanI7xfGi2FaU6V7UDe1mqRC3C3aBvuQVJxnbtDLR79loVcbMMQm/zan+Pguh+/wCEyhnTtMtFmY+WUmtCCJf+6hFXykgWYm0EivwG6WXXrAH01k0uRxHSVGyD5WoKhFcCbml3QbdHw75qu/u5uvQl8CoXlbw1femn1GV0xF2VNzaAk7qHTktZbYMKb92OO7QU5MjklS3i6V9o9clVajrddvwMUpSiwxsd7749Hl+uQxm3CB2+fOJI0fJxLmyizMx4ocXpZEgSqdnM9/OpZvomYQv1wWDEHcE1728VtcBj3DpSk5GVntKml3EjQu16rvlWYvh2qpdwEki3nCjZ5wiyANBDtKmoZ4b2KkDNGCsqZY1b9NR/e12V8PIx36mcLJZoOZKO/ayIInNeRurhtGZjZrpNSXWoNSVghm92qceZmlYGkNo739xGkWndAJjzEE+reL2CkhSeoUlUHookQfLtx/UndYdaMsI6nbBAvWB1LKnvKywmA3b4xbQO/+bcbx4TQS1b/GS8I/oS0PPeUHs4+mmClJBv70AUSRjkoSHu96dp5rHa4JdzWdVp+VVMPQ3iHUr/gKDcyylekqvUzU9oeoPCfC7Y+PA7z/tNLIRzQ2yMi/nqHlTHqtkG16Hy2ovsfNUPWRnbqpvEb8jIgSY2buhTSCTMQe7NdrGOZ9gRZXUUv9lKSgaigLnEsmmriFZJ+lU+4PJVZQkd3Q83ENfDwhrdhppr4leUcEe47kWzYbe2sjo7LU0Z++gdgDXG45aZtgeMV0oz hnf7udIu BNvOZW7Ha10pAE9qtMjjfvcnrEoYYSnz/8rkQ97VORZ+jwVZG475YYLKfTEUMDq8gvAEsOGDIhYV/R1ZiiTLVG4uCfkZmx+UEPFHWUFd5tEQUSKC40EQBhCtRXwIwPzSyIjlutj3tVMj7ex/FKlIDdK+OumW/g7nyW8SMbKNjdHwZYi8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
hugetlb pagewalk unification
|
expand
|
diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c index 542922562cf9..cd8ad1a7f170 100644 --- a/mm/memcontrol-v1.c +++ b/mm/memcontrol-v1.c @@ -1039,8 +1039,20 @@ static int mem_cgroup_count_precharge_pte_range(pmd_t *pmd, return 0; } +static int mem_cgroup_count_test_walk(unsigned long start, unsigned long end, + struct mm_walk *walk) +{ + struct vm_area_struct *vma = walk->vma; + + if (is_vm_hugetlb_page(vma)) + return 1; + + return 0; +} + static const struct mm_walk_ops precharge_walk_ops = { .pmd_entry = mem_cgroup_count_precharge_pte_range, + .test_walk = mem_cgroup_count_test_walk, .walk_lock = PGWALK_RDLOCK, };
Skip hugetlb vmas as we are not interested in those. Signed-off-by: Oscar Salvador <osalvador@suse.de> --- mm/memcontrol-v1.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)