From patchwork Mon Dec 4 18:48:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roesch X-Patchwork-Id: 13478938 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 DE8F4C4167B for ; Mon, 4 Dec 2023 18:48:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7AA126B00E6; Mon, 4 Dec 2023 13:48:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 732DD6B00EB; Mon, 4 Dec 2023 13:48:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5FA646B00ED; Mon, 4 Dec 2023 13:48:34 -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 4FAA46B00E6 for ; Mon, 4 Dec 2023 13:48:34 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 24EA91A0331 for ; Mon, 4 Dec 2023 18:48:34 +0000 (UTC) X-FDA: 81530021748.27.4C324A0 Received: from 66-220-144-178.mail-mxout.facebook.com (66-220-144-178.mail-mxout.facebook.com [66.220.144.178]) by imf08.hostedemail.com (Postfix) with ESMTP id 4E3CA160014 for ; Mon, 4 Dec 2023 18:48:32 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=none; spf=neutral (imf08.hostedemail.com: 66.220.144.178 is neither permitted nor denied by domain of shr@devkernel.io) smtp.mailfrom=shr@devkernel.io; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701715712; 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:references; bh=pvX3GecqC8/WqHpBNmLdWUSP77ivV2mX1f1bCH1Oksk=; b=leSWbxMSRzr2AHduq/mggPyXO+mehm+6ChKkw/p46Py7W1lFwLtfVrlU7xGGBLWf1KKvYx xdVCG+QqENjGb66Qdb5n4Cdyzs18ZKVuH4h5EG3qMG/M2xAEfCwPyVnKLGdQHDoZ2KYy+K /h2vOCTp1uBPS1sZ1aRGedkOiw9l3D4= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none; spf=neutral (imf08.hostedemail.com: 66.220.144.178 is neither permitted nor denied by domain of shr@devkernel.io) smtp.mailfrom=shr@devkernel.io; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701715712; a=rsa-sha256; cv=none; b=hWCtCjeNptGe3eq4AuTv+RC4pta0n+2OprQ1UQQC0+i/lBtezZO5hoM1l+yE76MqEBSxh2 AMuu8ES9vfkgSoiA/SmPxe2h4Vyc9teC8i261yzKqIB7SdXo5Vr/Wmn8oAwDxqDc8gPDYX BJCegDy9AzjCGkGky36llcIfxTyHmkg= Received: by devbig1114.prn1.facebook.com (Postfix, from userid 425415) id 0AF39105A5B32; Mon, 4 Dec 2023 10:48:20 -0800 (PST) From: Stefan Roesch To: kernel-team@fb.com Cc: shr@devkernel.io, david@redhat.com, oliver.sang@intel.com, linux-mm@kvack.org, ltp@lists.linux.it, pvorel@suse.cz, liwang@redhat.com Subject: [PATCH v3 0/2] KSM: support smart-scan feature Date: Mon, 4 Dec 2023 10:48:15 -0800 Message-Id: <20231204184817.3570465-1-shr@devkernel.io> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-Rspamd-Queue-Id: 4E3CA160014 X-Rspam-User: X-Stat-Signature: nbwqwgyghhxkfp5twwbgj76bbkcuyqu7 X-Rspamd-Server: rspam01 X-HE-Tag: 1701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Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This patch series makes two changes: - Disable the smart-scan feature for ksm01 - ksm04 This is necessary to make sure that the volatile metrics have the expected counts. - Add a new test for the smart-scan feature The new test verifies that the smart-scan feature skips pages when it has been enabled for a VMA. Versions: - V3: - Disable smart scan for ksm05 and ksm06 - add ksm07 to runtest/mm - change documentation format in header of ksm07.c - Move function create_memory_for_smartscan() to ksm07.c - Rename create_memory_for_smartscan() to create_memory() - V2: - Disable smart_scan in the test setup structure - Remove the changes in create_same_memory() - Add the new testcase ksm07 for the smart scan test Stefan Roesch (2): mem: disable KSM smart scan for ksm tests add ksm test for smart-scan feature runtest/mm | 1 + testcases/kernel/mem/.gitignore | 1 + testcases/kernel/mem/ksm/ksm01.c | 2 + testcases/kernel/mem/ksm/ksm02.c | 2 + testcases/kernel/mem/ksm/ksm03.c | 2 + testcases/kernel/mem/ksm/ksm04.c | 2 + testcases/kernel/mem/ksm/ksm05.c | 2 + testcases/kernel/mem/ksm/ksm06.c | 2 + testcases/kernel/mem/ksm/ksm07.c | 131 +++++++++++++++++++++++++++++++ 9 files changed, 145 insertions(+) create mode 100644 testcases/kernel/mem/ksm/ksm07.c base-commit: 8c89ef3d451087ed6e18750bd5eedd10e5ab3d2e