Message ID | 20240704043132.28501-39-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 A3B09C30653 for <linux-mm@archiver.kernel.org>; Thu, 4 Jul 2024 04:33:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3784D6B00C7; Thu, 4 Jul 2024 00:32:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3022E6B00C8; Thu, 4 Jul 2024 00:32:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0DE976B00C9; Thu, 4 Jul 2024 00:32:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id DFB1B6B00C7 for <linux-mm@kvack.org>; Thu, 4 Jul 2024 00:32:41 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 9B405120A39 for <linux-mm@kvack.org>; Thu, 4 Jul 2024 04:32:41 +0000 (UTC) X-FDA: 82300799322.06.DB36416 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf30.hostedemail.com (Postfix) with ESMTP id 874C880022 for <linux-mm@kvack.org>; Thu, 4 Jul 2024 04:32:39 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=wu38pd2U; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=3vLpc8uy; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=wu38pd2U; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=3vLpc8uy; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf30.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=1720067541; a=rsa-sha256; cv=none; b=5FOxk7kAXuF6UavtL8zZ4u2Pd9zC/qkOQu0GO27eN6rTgkGLfHOJsimFGqm9Cq8BrUTEHo hEomZ9ci39zGGCeXQFwZ3UOL8ub4l+lVgGNP7H6LsZMNiZez5CvFlf7B/TTxGV/Lzho09f RYN/238UqeFuP0wnu2M2GngPnKhrEo8= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=wu38pd2U; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=3vLpc8uy; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=wu38pd2U; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=3vLpc8uy; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf30.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=1720067541; 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=Lrt/KcsLV9mhSUC002LaYTg+7UaG25OX7K0/IX8flZ0=; b=DOtu9wuigE/JLOJzMoSO+UzlgqG2fQ1v9ogr2QAk5rXlLGWS7zfoCyiI+cFD3nWG0yHuva r6srObnM+grO8uTRj+1BDxxAl3bbgrzWC3B2ugV+pleVKmjoaIzW+A3JvP99Sx0kKugTgA bQssrbahfP73yd0uLcgBluSITx46M9E= 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-out2.suse.de (Postfix) with ESMTPS id 4E4831FCF7; Thu, 4 Jul 2024 04:32:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1720067558; 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=Lrt/KcsLV9mhSUC002LaYTg+7UaG25OX7K0/IX8flZ0=; b=wu38pd2Ur04WQggmlopkDml4wHinDJSRhnDrkpQt+PtRYgYO79418P+xobCSITpMNuUGJr N+r3hCiv4ga0bzDDG6Hf5y+011wgZlCP9rDrAInPoWk4nEgL/L2Ryqm/Fs6j9r+hmIMepL jQdzslJTtqTqyHqPiP2tBLeURFlt62k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1720067558; 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=Lrt/KcsLV9mhSUC002LaYTg+7UaG25OX7K0/IX8flZ0=; b=3vLpc8uy3DMDbdMeN7hpDSFZj9ThV9qGHZSesmupuyJqz3PIjoXBK+9NW6fTTC/h3zsQFl 1ol0a9rc5zXXd3CQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1720067558; 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=Lrt/KcsLV9mhSUC002LaYTg+7UaG25OX7K0/IX8flZ0=; b=wu38pd2Ur04WQggmlopkDml4wHinDJSRhnDrkpQt+PtRYgYO79418P+xobCSITpMNuUGJr N+r3hCiv4ga0bzDDG6Hf5y+011wgZlCP9rDrAInPoWk4nEgL/L2Ryqm/Fs6j9r+hmIMepL jQdzslJTtqTqyHqPiP2tBLeURFlt62k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1720067558; 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=Lrt/KcsLV9mhSUC002LaYTg+7UaG25OX7K0/IX8flZ0=; b=3vLpc8uy3DMDbdMeN7hpDSFZj9ThV9qGHZSesmupuyJqz3PIjoXBK+9NW6fTTC/h3zsQFl 1ol0a9rc5zXXd3CQ== 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 370FC13889; Thu, 4 Jul 2024 04:32:37 +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 4F+tCOUlhmbnDAAAD6G6ig (envelope-from <osalvador@suse.de>); Thu, 04 Jul 2024 04:32:37 +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 38/45] mm/madvise: Make swapin_test_walk skip hugetlb vmas Date: Thu, 4 Jul 2024 06:31:25 +0200 Message-ID: <20240704043132.28501-39-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-Queue-Id: 874C880022 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: ebrzutst861q7p59xiqeqi6ckxb7nyaq X-HE-Tag: 1720067559-117566 X-HE-Meta: U2FsdGVkX19OoUfpJWg94CrmYpxnbTv2in05FRhzFoqkZaQiB2w61HsYiHIY2q8GacpHle7tYn+L4YhkEQGBzTkEIKuBEQ9i+HtHyPbq/Rr5fhl/fwbVQu12z4aIvHMrng5dirxlgT+Y+T7Jv/1EB23mbt41g59WLCbxaJIBm1cja2XbyCL6kNVijRkPlAekrhcyK8shiO8Rt/ZN1UROTNb6Pe2+xsPyB/iXYeOmh8MHnwDmuwz7VFtzgciscQEBURZAD5nOBZb4AG7qniQuhqBP+jEzICfySo7o4E9k8NSWg4/nqxaRGQrGMZBTZVS5N9eEjFeI766q8Xs77WTa4etmJmYxUFjaWmDN18Y/p8OZeTTrOROVk0pV8ihJJOlGtq6WVvh0c+lXIBHlg1H12HvvPSkD3KVpT/OTgmhwzB6MnkoPzdDqisiXN/9IRGKwx/a1aN1Rc0Jjg6tZ4NQdzAuvDgerM5CbDcjbLxRKJ1c+DoPhDyg514SZKnENY7tSDnha9kXb/29Fr1xaimF4jd0rw1TQusrWhbaoyxAv5SMDn6/eGYfFwmkyuRXkz5p74xUic3w/g2DaBbXVzkMzjw+jqNoG1HtH9+dSJvNCWQf1KZho2c+S/yrxlb4eVRe4OVQzmuuRf20ndxos32IQwqzIeT2AjJ31P7403zBO6+DnhRXIVR/xlSlhLZXKiD9BpV/iCMfjk9weiBFxeTIagbELkQMR14oJyCPGqNdJKBya71W/rZ8Nsf2wh+2FsFqorjlFXzVpYM6gvQ0TvX8WlyX297EwrsJx4JSBFdCL93h14pq/MgwXiNGzKml97MuRf6KzXUePVz5Vhbmk4YQ2JKouGxeUM0UOHTREmGiV9fgqezROdm6xYBrzlA91LFipZd1TFOONOc7tPEc4v8iIz5ddtCGXV0W/Cvp7VBo2UgdZC79jxA50iYeNgUc9u56sGpN9hSBZ8HPxvqx2eUX JK9W23yr lxcVgsQJCJH38Ip18AocwtOrcSJg94DxtVrMzULHTwyS2yUShf8xyoNZgN8wTiHhAeyE5s/o2n7ybpizw6UC3JeX4kYwpcfBnXavRG4ZW6quMtQ5iVTmgT7vHtGj20IfIMhcF3kLboyONkmF0hPUlV25duO4Gy7XGe7w+MP+PNHRS2ceFD4JGw4T3Ec/4O9jNJgOm1i33fA0pMJGTOBnNZ3dr/3ShC6E/b+/CSKq3rdPqbp2YQjOuAaQrZ9cfM5zPJyZ7c1TwBRnWlJqYchKBcrcWvQ== 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 96c026fe0c99..4c7c409e8b4a 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -212,8 +212,20 @@ static int swapin_walk_pmd_entry(pmd_t *pmd, unsigned long start, return 0; } +static int swapin_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 swapin_walk_ops = { .pmd_entry = swapin_walk_pmd_entry, + .test_walk = swapin_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(+)