Message ID | 20240704043132.28501-40-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 3EA14C30653 for <linux-mm@archiver.kernel.org>; Thu, 4 Jul 2024 04:33:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9BE6E6B00C9; Thu, 4 Jul 2024 00:32:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F4CC6B00CA; Thu, 4 Jul 2024 00:32:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F8E06B00CB; Thu, 4 Jul 2024 00:32:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 43F546B00C9 for <linux-mm@kvack.org>; Thu, 4 Jul 2024 00:32:43 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id ED1C880A47 for <linux-mm@kvack.org>; Thu, 4 Jul 2024 04:32:42 +0000 (UTC) X-FDA: 82300799364.05.7A1E45E Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by imf06.hostedemail.com (Postfix) with ESMTP id C6DAE180017 for <linux-mm@kvack.org>; Thu, 4 Jul 2024 04:32:40 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=hwqDJNVK; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=LSnnQJXR; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=hwqDJNVK; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=LSnnQJXR; spf=pass (imf06.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720067536; 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:dkim-signature; bh=OwRMEygtt9hYpWc9+hDgMaQcaULG8MqCO3fZe7sMmEA=; b=jen2RjZGpVmoxD59/tJDFAKQ21V+PBoeHi2mz4c6wPIan9k40vkBslHSZhyg4ffC1Dx0Eq oVylsoWE86WnBitQ4UBjh14ns11hSpXSfEGSk9NvzNli6LR5l0ilUpE/+o95rZbARsYO2m F4m0O0Ipve7L8aCOehX7FdWUjALQpf8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720067536; a=rsa-sha256; cv=none; b=Ak3jlmRtvMHWifo7OqlkSDCK/ICIAMsC4LOaB8wZc9111ATD7kw3cWxwJBs51QPPVMQN/M pvego9+QbG7Ptn279e9qlNe/5B71MqBttA0pouHhixo0GjO2YX4kiggFFtdirNocH/l5a3 c0We20Euhn6Jw02Bx4OJFf86lBbxmJI= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=hwqDJNVK; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=LSnnQJXR; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=hwqDJNVK; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=LSnnQJXR; spf=pass (imf06.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.130 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de Received: from imap1.dmz-prg2.suse.org (unknown [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-out1.suse.de (Postfix) with ESMTPS id 9876421C10; Thu, 4 Jul 2024 04:32:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1720067559; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OwRMEygtt9hYpWc9+hDgMaQcaULG8MqCO3fZe7sMmEA=; b=hwqDJNVK/CCOylYSLTwWXUVICQyx83G/knpDrCzGjHxZsYrpDDVMSCB321NNI98Hf7c5Fe fliGr2rF4bdqNm4A5diMwERQGXRj6hZTmNR2Bkz1zFSjM3T+0O/7G2l+AXTUcqMyvnhuqU fHH0ZeRfPHMYS1U4b1g+F9jlmYWgAqw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1720067559; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OwRMEygtt9hYpWc9+hDgMaQcaULG8MqCO3fZe7sMmEA=; b=LSnnQJXRLmy1Y92nnMR+gbafnAKL4iJ1SAKvsbEP0jdZUQgWseUiTP/YO4XvsimDx5/+i6 QWKNbAFvKiCbi8AA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1720067559; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OwRMEygtt9hYpWc9+hDgMaQcaULG8MqCO3fZe7sMmEA=; b=hwqDJNVK/CCOylYSLTwWXUVICQyx83G/knpDrCzGjHxZsYrpDDVMSCB321NNI98Hf7c5Fe fliGr2rF4bdqNm4A5diMwERQGXRj6hZTmNR2Bkz1zFSjM3T+0O/7G2l+AXTUcqMyvnhuqU fHH0ZeRfPHMYS1U4b1g+F9jlmYWgAqw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1720067559; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OwRMEygtt9hYpWc9+hDgMaQcaULG8MqCO3fZe7sMmEA=; b=LSnnQJXRLmy1Y92nnMR+gbafnAKL4iJ1SAKvsbEP0jdZUQgWseUiTP/YO4XvsimDx5/+i6 QWKNbAFvKiCbi8AA== 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 6F2E913889; Thu, 4 Jul 2024 04:32:38 +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 SEcAFuYlhmbnDAAAD6G6ig (envelope-from <osalvador@suse.de>); Thu, 04 Jul 2024 04:32:38 +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 39/45] mm/madvise: Make madvise_cold_test_walk skip hugetlb vmas Date: Thu, 4 Jul 2024 06:31:26 +0200 Message-ID: <20240704043132.28501-40-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-Stat-Signature: ykwucmpm4pbo8s6tsuborqd5yb9ufyfr X-Rspamd-Queue-Id: C6DAE180017 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1720067560-296674 X-HE-Meta: U2FsdGVkX1+qhtQ3CcPdM4z5Vh1OOeUDgtwXLNpPbeZXSi3qI7EThmOTfk5+6DjdUkgGEHp+QwALe5KvScIBo3kgwtQNchp6S0xyaipSxo+RnVO5YiEiwOoWcmgG+7k6OpCvpbQsITH9Bx1tedWSo/00yYVMNRdHJE4qYJRYtmS1g6vX9YJ/tKYYicX7qEuJiTfkapCPZliVt+r0L3DVgb+v9vmpDG8uvOHEPNgKYAhIGkMwmGV8Nk5OjAXufFsJKuk7SQuF33eyIPS2BR5LZB2KDfFaRjm5NUI0erXd4tYEHBBcvM8mGvpIYmD1eKCK+6H0U9m3w2EouCW/4YwOM5dU7ps8rbV0YwFPh0i2OS34O1QBARQpI2vNZIPvqi/tGdMiz1eE5NCeAFB80OR9WjHba0bYZjS0kxpFMRgaM81L0kgS9GK8bppqbocMK/djgjhBOQlmzYb3FAhXSp54urr2DfVwe84OQUAn2v/IoU94E9UGIIUobWF3tYaDL4EthFLG14wKebQsYhhzR1SxPj0QkqFc6g7SBwVFJpyifU5Bt3XQoCohNnKeSPKJ2Q7vf3oQqjx2JpT8qcxEmwMiBE4FGkkdGI2W2BkbLTpR8+UJrUWq4OeS/xwbmZyBQ8FTYe21hDFE1ec8RbU/a6QjBZvnmTLK9LwKJOSjpYp2q85lVFzFZ8G8FtxwmK523m0CTirICHzhMKJgz6buTfoHQ1pFh/Ssgy+awjm1fVZsPaZI+Rw6VtL1Q4tcp0E8t3AS/pQhiWIvejBXifMuoh+jQArALZWFPEW0ktMQsFaXyLiY89dGWNHJho3SvvO+1Csy7HfnOtWF85ZHLC+SDtlBcEGDzemM/v6znp+7dafQVz3rZPy9Q0eXmqxIuDMtQlj42Fb9Pzterk8G6vCOVxZVg3DajoyVWOqN0URSG7NuneQkHjiICFYJxikpus923D06dK9cOkQN1Do8k9cDxU1 Y7ecChdl QPZTT0xKBQmb5Sylmo9Hp9FUbZY9+Pn5rKbQaJeaTgucyIxrM8ra5Zwx0blfiwtaeZRPZV4NtCDggrD/Kg1LTzmtxELzrkKZw6XGHLhT3fy2cEMetg/NDoyjeyVx+mhE4aSNTrnLdAQacmS6YOlH9IIv7e/gqilzJiEKV7AaW3+EPF/QNF95L6Kks4hFyVDXQABxQnPJWhBptvtYvFDd+m1emdEAZiRRHxsbz6EvlMXrp9n1U9Z8/w4YBTKPhw1YBUIb5KV+0egOsr+CgxSDKeWYYBA== 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/madvise.c b/mm/madvise.c index 4c7c409e8b4a..e60311636c4c 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -565,8 +565,20 @@ static int madvise_cold_or_pageout_pte_range(pmd_t *pmd, return 0; } +static int madvise_cold_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 cold_walk_ops = { .pmd_entry = madvise_cold_or_pageout_pte_range, + .test_walk = madvise_cold_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/madvise.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)