From patchwork Tue Dec 5 18:09:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roesch X-Patchwork-Id: 13480548 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 71CE5C10F05 for ; Tue, 5 Dec 2023 18:10:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 005F96B007E; Tue, 5 Dec 2023 13:10:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EF8A66B0081; Tue, 5 Dec 2023 13:10:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE7466B0083; Tue, 5 Dec 2023 13:10:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id CE22C6B007E for ; Tue, 5 Dec 2023 13:10:08 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A24021401D0 for ; Tue, 5 Dec 2023 18:10:08 +0000 (UTC) X-FDA: 81533553696.01.D34A368 Received: from 66-220-144-178.mail-mxout.facebook.com (66-220-144-178.mail-mxout.facebook.com [66.220.144.178]) by imf26.hostedemail.com (Postfix) with ESMTP id 0071E14002D for ; Tue, 5 Dec 2023 18:10:06 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; dmarc=none; spf=neutral (imf26.hostedemail.com: 66.220.144.178 is neither permitted nor denied by domain of shr@devkernel.io) smtp.mailfrom=shr@devkernel.io ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701799807; 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=M8SyXVyWx9HzdPi4l5iO/6FNzy9T9MGtokJHK3+WGoA=; b=c6HfyjW4iburxEDzXCmhlwDMYQTsicESyfG8xp1C1KJ/Sb2FXWbcftvp2UKBOyBa4beaYY bExnuzEBR/bwtKPuJziHPAmuSVWVf1n+cIj5Go9BodaM18qHDun9pCkaep3aJwCHwjRZWl LunFlr8Y5OOmP0ehLcTuEAHolC13WsM= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; dmarc=none; spf=neutral (imf26.hostedemail.com: 66.220.144.178 is neither permitted nor denied by domain of shr@devkernel.io) smtp.mailfrom=shr@devkernel.io ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701799807; a=rsa-sha256; cv=none; b=s224hEYzYwsDs8zCchP0VqT8W7ZBASn0CsPi3M7l2p9s3HiFxZsU4jhjqMhJgF0zlFXk1N hPDKHHWSSk0SRcAAG6syZbxTVdp4a/wQfi67DW2pUFsRbJsO4weFCKlPDpmGs5p6COulsv pke4/mEQindU2HW6F/WIFRXv9BofVtM= Received: by devbig1114.prn1.facebook.com (Postfix, from userid 425415) id A3F201067A2EC; Tue, 5 Dec 2023 10:09:54 -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 v4 0/2] KSM: support smart-scan feature Date: Tue, 5 Dec 2023 10:09:50 -0800 Message-Id: <20231205180952.3843711-1-shr@devkernel.io> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: 1z4djxozdeoj3md1by9gfgkjq4neuy4n X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 0071E14002D X-HE-Tag: 1701799806-807618 X-HE-Meta: U2FsdGVkX19pU5Q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ack.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: - V4: - no changes to first patch - Changed header documentation - Fixed includes - Renamed create_memory() to verify_ksm(), orignal verify_ksm() has been removed - Remove loop in verify_ksm - Remove wait at the end - Call madvise at the end of the function - Remove needs_fork - 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 *** BLURB HERE *** 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 | 113 +++++++++++++++++++++++++++++++ 9 files changed, 127 insertions(+) create mode 100644 testcases/kernel/mem/ksm/ksm07.c base-commit: 8c89ef3d451087ed6e18750bd5eedd10e5ab3d2e