Message ID | 20250113-virtual_address_range-tests-v3-0-f4a8e6b7feed@linutronix.de (mailing list archive) |
---|---|
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 10250C02183 for <linux-mm@archiver.kernel.org>; Mon, 13 Jan 2025 13:17:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CAD3A6B009D; Mon, 13 Jan 2025 08:17:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C35566B009F; Mon, 13 Jan 2025 08:17:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 863E46B009D; Mon, 13 Jan 2025 08:17:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 5A73E6B009E for <linux-mm@kvack.org>; Mon, 13 Jan 2025 08:17:15 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 196BF1A027F for <linux-mm@kvack.org>; Mon, 13 Jan 2025 13:17:15 +0000 (UTC) X-FDA: 83002479630.03.52DB955 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf17.hostedemail.com (Postfix) with ESMTP id 389C840010 for <linux-mm@kvack.org>; Mon, 13 Jan 2025 13:17:12 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=f2ir0JQT; dkim=pass header.d=linutronix.de header.s=2020e header.b=yRWWQOaZ; spf=pass (imf17.hostedemail.com: domain of t-8ch@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=t-8ch@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736774233; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=mYupyF2Gsl9U0NrCNSWW0D+ZsnFdoZ4dytuLiu3xZBE=; b=EavZVcuI8myg541Bz2g6vTOznp51TKnwrezYGA+XYtWPmiou0Y6o0Zu6CmaJzxTFZ2ehiW 7mT0bz85I4C0iNQfr3R1qwGMVaMd9VOPHifEmtztWSMrCoFX7VDBM4HfyB7GNKl+klc9lT rUIeLrfZPMGTZGZXZy/umNdEBTrqjio= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736774233; a=rsa-sha256; cv=none; b=uhHMIsfO+1rZHRSBdY4ttTRBX5rY0JQSuM3dDXMEvsNtZ1jMue5tDnKQILFFqiSHTde/gl AyssbXkeiGK4xVnJ0b4KkfEv4NplGLN/le3kyrrGDMCFcbIMzoN0igEhHtomyhc52z8jbz dQmCItVbbpaJ7EPO3eLuKdh4+JH5138= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=f2ir0JQT; dkim=pass header.d=linutronix.de header.s=2020e header.b=yRWWQOaZ; spf=pass (imf17.hostedemail.com: domain of t-8ch@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=t-8ch@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas.weissschuh@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1736774230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mYupyF2Gsl9U0NrCNSWW0D+ZsnFdoZ4dytuLiu3xZBE=; b=f2ir0JQTCp/VDv10SQLqUVdVSd9zjTEK9VTrC16Ud6MIQfn6pDL08uguKXgmdy1e/5I71v 3qBBc32skJgKO2XedUfG3RTyaFE1QjQZxH58wCcOxFRzP5Fh9NLGFDaFN7S++FKnpkzBl2 I8fMwQXzL1L0aK2hLwZghcCDj5ZelQk6ESy+yQ8ya/sP9V716k6PedZRvjI/r1QZ/2sREY ttiPnS8jIm9yq6epO4rphWQ9lKmdOf7gxnEWuj6GBhbjw3N/gd0IqVGkCWKB7Y8ElDGlfd ajLisPPrZ/ZINQng1NGufLYA5Rb0E+57LlMRLVUrgfW/pAd3BECyc4v9Zzn+0g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1736774230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mYupyF2Gsl9U0NrCNSWW0D+ZsnFdoZ4dytuLiu3xZBE=; b=yRWWQOaZPboXBggFIJl+ThKBTYXkA1DaSPV5/bPM/1QX02IJQr0cs6Hy3VWMDuSPm4CoSv trq8fGDsYnho2OCA== Subject: [PATCH v3 0/4] selftests/mm: virtual_address_range: Reduce memory usage and avoid VM_IO access Date: Mon, 13 Jan 2025 14:15:34 +0100 Message-Id: <20250113-virtual_address_range-tests-v3-0-f4a8e6b7feed@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAPYRhWcC/43NTQqDMBCG4atI1k3JjxrtqvcoRaKZ1AHRksRgE e/e6Kp0Ubp8P4ZnVuLBIXhyyVbiIKLHaUwhTxnpej0+gKJJTQQTBeNM0YguzHpotDEOvG/ccRT AB0/rosqlKkura0WS8HRgcTn02z11jz5M7nU8i3xf/3Mjp4zKSuZa2DZXFq4DjnNw04jL2QDZ7 Sg+PM5+eyJ5ohRatFZ20rBvb9u2N6d9GsQaAQAA X-Change-ID: 20250107-virtual_address_range-tests-95843766fa97 To: Andrew Morton <akpm@linux-foundation.org>, Shuah Khan <shuah@kernel.org>, Dev Jain <dev.jain@arm.com>, Thomas Gleixner <tglx@linutronix.de>, David Hildenbrand <david@redhat.com> Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas.weissschuh@linutronix.de>, kernel test robot <oliver.sang@intel.com> X-Developer-Signature: v=1; a=ed25519-sha256; t=1736774229; l=1741; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=m0ZvOwE24LhMBfXqxaQHkAKn3VpdDyFJa05tqZYKi3o=; b=VRRAV92gYVVHFsciCiOQ8m/bK7PvHMYYwYPFWqnAQdwj6Cuar90T1/2jwy7tF1T8rhaAeHNR2 7k+uWfytxsfBA7i8QgwzMZt4UvRFoYmQ1DIspQpzv8phphiX9PllvWD X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= X-Rspamd-Queue-Id: 389C840010 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: 159ouszxwsqchxuox1wdcaeid347fujk X-HE-Tag: 1736774232-254267 X-HE-Meta: U2FsdGVkX1+QPpW/4gRmpFgQZcSsINM6lQdUFw9jpmEB2FXERE1B1dBgnnLju5clnFa69sWBC1dAwgftQHXDRMnfo8AMNOGEDOTPJ6GQAeNwp09FSjDcGA5XoG5qI/7e8NR5VvlN5+UTu6ocbDcMgp0qM2rMVNKVTULn12/1rE/n3J220K0ich7zoONuThmbbCqsyeX6HOhNjx4Xna/VwPQg+7/RsTjqYfx8KzmqLFrR9vdFIjZV2bZt8djNRVVCmWGhiFSofyIPwOQxzxsxf/zibNB7j1NW67LFLJInISyKjn9ngTN0HjYWn8tX90KwRN1gvpbBYHTdDs83XitMr6eDRVVHWvDNB6bZ1G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AQvx9cFTCrlcixigvhR0L7qK 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 |
selftests/mm: virtual_address_range: Reduce memory usage and avoid VM_IO access
|
expand
|
The selftest started failing since commit e93d2521b27f ("x86/vdso: Split virtual clock pages into dedicated mapping") was merged. While debugging I stumbled upon some memory usage optimizations. With these test now runs on a VM with only 60MiB of memory. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> --- Changes in v3: - Pick up review tags - Fix naming around PR_SET_VMA_ANON_NAME helper functions - Skip selftest if PR_SET_VMA_ANON_NAME is not supported - Check for VM_IO instead of [vvar name prefix - Link to v2: https://lore.kernel.org/r/20250110-virtual_address_range-tests-v2-0-262a2bf3c3d0@linutronix.de Changes in v2: - Drop /dev/null usage - Avoid overcommit restrictions by dropping PROT_WRITE - Avoid high memory usage due to PTEs - Link to v1: https://lore.kernel.org/r/20250107-virtual_address_range-tests-v1-0-3834a2fb47fe@linutronix.de --- Thomas Weißschuh (4): selftests/mm: virtual_address_range: mmap() without PROT_WRITE selftests/mm: virtual_address_range: Unmap chunks after validation selftests/mm: vm_util: Split up /proc/self/smaps parsing selftests/mm: virtual_address_range: Avoid reading from VM_IO mappings tools/testing/selftests/mm/config | 1 + tools/testing/selftests/mm/virtual_address_range.c | 41 ++++++++++++-- tools/testing/selftests/mm/vm_util.c | 63 +++++++++++++++++----- tools/testing/selftests/mm/vm_util.h | 1 + 4 files changed, 89 insertions(+), 17 deletions(-) --- base-commit: 7793bee8fed2027eb15219014de6fb0dc15d4a03 change-id: 20250107-virtual_address_range-tests-95843766fa97 Best regards,