From patchwork Fri Jan 10 13:05:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 13934559 Return-Path: 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 DFD1FE7719C for ; Fri, 10 Jan 2025 13:06:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 418556B009B; Fri, 10 Jan 2025 08:06:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C7D66B009E; Fri, 10 Jan 2025 08:06:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 268EC6B00A0; Fri, 10 Jan 2025 08:06:19 -0500 (EST) 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 0910C6B009B for ; Fri, 10 Jan 2025 08:06:19 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B79D9160A37 for ; Fri, 10 Jan 2025 13:06:18 +0000 (UTC) X-FDA: 82991565636.04.08DAC01 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf27.hostedemail.com (Postfix) with ESMTP id D78A140015 for ; Fri, 10 Jan 2025 13:06:16 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b="y6R/VRrv"; dkim=pass header.d=linutronix.de header.s=2020e header.b=zIwLeQlH; spf=pass (imf27.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=1736514377; 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=hr6uhuBMBGWM5gCFEu7lA3MvYpepc6DeWCXpBbX8k8U=; b=5VkrnjKoaBP3Qau4MA5Hl7TtYtb9tw+GQdpl5YByCYpt5xYUAiFhmdM0f1cMXdNjZ6RsJr qbpAPOvLdtGJk1ppJOA0P5+KrLa7qiK2ee5fuk6UTPDn/EyRrosS2f/FinmopIJ9H80VDs zpnALgd54rmbN07DAK8UnBSbec59dwY= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b="y6R/VRrv"; dkim=pass header.d=linutronix.de header.s=2020e header.b=zIwLeQlH; spf=pass (imf27.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736514377; a=rsa-sha256; cv=none; b=wURsiO0ohK694X8TeI37Oi/qae5t9RWmwhXCgMGHH0XeY3Q1/aWyxDMNJ5afC+U0XJTNPa XSnBpW1bbShPMtCUxOVFOZQyR7qn+Q7SO1x2GFXfN+a2JZOZ5uO725U/XdV2z4b50y8NfQ T5bRfCr3PJawaHc9GWciEdvKGCi+3a0= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1736514374; 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=hr6uhuBMBGWM5gCFEu7lA3MvYpepc6DeWCXpBbX8k8U=; b=y6R/VRrvBuUbBCwqYt1vy+AblejtqeTeIATftwuhB05oxyehbDT5Nu8zcuLU1bN7aRkxUg HtQw8v1Y+5jbRGJCMq0I0U4q3Gsm72IR61aVqtvYvYldl0G27V6OJ4kzN054WpewbOEUZ3 FW9FR3kXgEfUkj1BiNQb+VRR/zBdhqH5AWG+0C9QEvSrRgiTSxK1qjvoEeQlVPjE2e1rpX J/vN91ULKrQGt1Fpsrm2ioc+hlF13d2qDlaR0xzpHxDSv9HmVyuxF2TYhr/IHO6VJVK23m 1iZ6uizCOKFYTgagImTW1MNHShGPC3w6SUyFOLZ+2548a8zhHBQ9GEZdK6x+4w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1736514374; 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=hr6uhuBMBGWM5gCFEu7lA3MvYpepc6DeWCXpBbX8k8U=; b=zIwLeQlHVlCdEsUilfgbRnxBL2G3jpoalSJDa4O4dHHh9JPJCmy+1NNbyTHZTlo14wDYMn ZYtxLh0Om0uaIBBA== Subject: [PATCH v2 0/3] selftests/mm: virtual_address_range: Reduce memory usage and avoid VVAR access Date: Fri, 10 Jan 2025 14:05:49 +0100 Message-Id: <20250110-virtual_address_range-tests-v2-0-262a2bf3c3d0@linutronix.de> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAC0bgWcC/42NWwqDMBBFtyL5bkqMj9h+dR9FJG0mdUBimYnBI u69qSvo5zlczt0EAyGwuBabIEjIOIcM+lSI52jDCyS6zEIr3ahSGZmQ4mKnwTpHwDzQMYrAkeW l6erKtK23FyNy4U3gcT3q9z7ziBxn+hxnqfzZ/7qplEpWXVVb7R+18XCbMCyR5oDr2YHo933/A uHfB5TKAAAA X-Change-ID: 20250107-virtual_address_range-tests-95843766fa97 To: Andrew Morton , Shuah Khan , Dev Jain , Thomas Gleixner , David Hildenbrand Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , kernel test robot X-Developer-Signature: v=1; a=ed25519-sha256; t=1736514373; l=1221; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=Sm0PwuQVte7XgbVjXyiHOsXJPFjpuw/9FI9ZkNuRORk=; b=0MGnfl/mOOpYHNMAN/TGe0wEWb8OEbo+Wd8yCQEVr/8tilq6PHxZS2/XtQpyjXGH7/HZDzQFu T3UYHV4OGPwBtVBoPAkfXpidwHxsPuiEwQ+lcsBOcBJup31Xju9PBPt X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: D78A140015 X-Rspam-User: X-Stat-Signature: pmhd7fg6t7dmpibfje31oug976nmpsds X-HE-Tag: 1736514376-682577 X-HE-Meta: U2FsdGVkX1/Ru5ihMBOB6jrQ5AuR89Nr2vZCxTBZfzV3yXpEBVxPOVUm0526n8+PSQXpP/pg45OaL1/MO4MSdYpvoFP5mekRmaa09tqslzPhv/qRREyTtWE6oD4Z95d8rwAw8W53uKYO7jdcFm1aikW5OcnQJDzRzJv528OOnC3RRE/eOOfj3gNMDCfK4o8VJtZHjA0uEUM/YhiB2hwLBkwjqZUo/YUEefaGpZqh8oHZnTydfKApW536tg4u8rXZ6IukzReW7FSempmPkxhsb5sn4C61BcgX+YAHIVza7EVOIlI+njahLlVkvrfE70pnCPOV3Jb7W95W4/dta344L2RoUPlAfO3qCK751m+FW+JUo0bjV2ACEZ7Z6BeR2qa5m0IfbnxP9QPECVy2flr+6ncKlxrBzUFvsfUukzFWFouDqtwPCAgtmlhA3GhD1PR+wG+gOlE4zQPxDOt9jPxyCU62zobeNOueaORIT2neBT6/Q/cL0MNc53USLAlkr0PhAESZTcCC+obe5lHqTE92sE7Jtl3L6CSKwjb2WYdhUB06XKJhvl4M4g7UvworrJMvuS+qY2cTmPo1WfSsV6uXe0cgZYzUD0+uqdXxHO0fqJli7bifQ7rpZeH8WeZ1MKLG4rbPKohfjuDqiSMhjsFcRa9FPisOEHfyy3yVmjdqztVim1yhGlBRYxxQ9ZkTxOB9GEM/cRB3lyezb33xsnwXalfm/eQOBzs2IrcIdZpDMMyeGRowXdJngv55L4QXv8+l6p4BN+y1jo+7f9gY6CBym3BSF/70vLaQFhrbZqOnqK6gSFqzzk+D132v3Pdv9kKNs0UrGKMqjIrC/UQTf2vi+VajxaS6pf+V9Yg95DUvqsVAj7IDLyNS/MjiQjfRSsQNZOEV/NkprBeVXMUWl+pfVwJgstoWEUq260zyuGikow0FuxwK6PweRdwlQ5wuzh+H86urGuCCyBD3LuGW3Ks rNpVWdgl FuhTUpbgiepJlAYNJZRwTiuOV5qDbRGNu+bdlzXe7a+vMjejHaM7kuHPp5AL2Wqxmwt9Z3HmXI0X9WRbBYocjIfAWQO/zbS3GQlmoZ4Kt8fMsALXZ5G8zxaWwaA/gs10/S5iS/UMD35aOKov+5dvYSfa0N7SmO8VHUrAKo3mNdNn7wqWM7YFbnNWT6685UFPjBVMCpRIOj9WCoaPok+avpUszM1kQmThV95szNsc5/ObLMfZqSVq+arZwQoBMMkr0T/0m3wHkEGlb8Z8dpbTJ4TY0ZQOw8+TiBF/7DmJwX9r2dKtYsH0CCAk/9gxitimmSFbJu5ZDI9ATjM7tsoXJ/svNBLIDAtByvHzDWnR6Oa8wuTO0KIgfHQ0o+sNCXWIUEe+wVnl9jYPJeWFzTQavex0R7rfxhiAJuV044SNW4zoxaZweJs2U6E7QzA7k8rqETsSKUw7bOEmqiXZnndA1+J3tD4SC8Br4S2My 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: List-Subscribe: List-Unsubscribe: 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 --- 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 (3): selftests/mm: virtual_address_range: mmap() without PROT_WRITE selftests/mm: virtual_address_range: Unmap chunks after validation selftests/mm: virtual_address_range: Avoid reading VVAR mappings tools/testing/selftests/mm/config | 1 + tools/testing/selftests/mm/virtual_address_range.c | 34 +++++++++++++++++++--- 2 files changed, 31 insertions(+), 4 deletions(-) --- base-commit: 32af4d2269d20fe2f8d32aaa456cad8e40abd365 change-id: 20250107-virtual_address_range-tests-95843766fa97 Best regards,