From patchwork Fri Dec 1 21:09:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roesch X-Patchwork-Id: 13476397 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 2210FC10DCE for ; Fri, 1 Dec 2023 21:09:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9E59D6B04FA; Fri, 1 Dec 2023 16:09:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 995536B04FD; Fri, 1 Dec 2023 16:09:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 688066B04F8; Fri, 1 Dec 2023 16:09:52 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 44F836B04F9 for ; Fri, 1 Dec 2023 16:09:52 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1D840120329 for ; Fri, 1 Dec 2023 21:09:52 +0000 (UTC) X-FDA: 81519491424.30.6146AB1 Received: from 66-220-144-179.mail-mxout.facebook.com (66-220-144-179.mail-mxout.facebook.com [66.220.144.179]) by imf13.hostedemail.com (Postfix) with ESMTP id 766FE20007 for ; Fri, 1 Dec 2023 21:09:49 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=none; dmarc=none; spf=neutral (imf13.hostedemail.com: 66.220.144.179 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=1701464989; 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=mIbaP/Bla3/dZXw4X1AYftqLO5zIbjcqPILoTMneCb8=; b=DvusRPtuiAmmmDWFVZmMQXBylhPY1QgilnNnj5XnGwGhVXyB914iBf05lVA23PwV+k3toM VJhsm6m3hosfBpFuw8s0vt7i7bToGN4VmjoNikNdNMiVMjbOplGrujh6DTbipiPdlqrDms zqW/5DNOBvJxyswUn/ObIURw5B8SaBg= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=none; dmarc=none; spf=neutral (imf13.hostedemail.com: 66.220.144.179 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=1701464989; a=rsa-sha256; cv=none; b=t94mEGaEkH+YxgE3rwVXLRIU6uQLMxLiSS8t3EFgJ1NxmUqO0TEx5xxRipTPiJ3G5f4SPe r+MDjgGyAaHJN1wf/F/Pq6kM0QedsjbA/22LgLXLF2PMUy28+5p1/LVL85NK1uOTNgJb+u i56qIlzMyw53vpvdtkxqyLCVzJEa8LY= Received: by devbig1114.prn1.facebook.com (Postfix, from userid 425415) id 3AB9410340463; Fri, 1 Dec 2023 13:09:33 -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 v2 0/2] KSM: support smart-scan feature Date: Fri, 1 Dec 2023 13:09:28 -0800 Message-Id: <20231201210930.2651725-1-shr@devkernel.io> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-Rspamd-Queue-Id: 766FE20007 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: qm7za4ecya39non7do1unzbw7s7m64x8 X-HE-Tag: 1701464989-920307 X-HE-Meta: U2FsdGVkX18AOAjyyqMsvWxV/I2B3k5flVEG34SBksZnOePWHNWO56ckAqbz7/1bf/MDIXL1CP3AQRLQYOZLctBW+l313BtvQVzXrwCV0U+75zmEXtnyORoCqMqkMzkpbleDXrxL5FYddmJZP+H71DXk0H5aagxkuh6FU65DufW2jDLA2VDmqAS/OeFPIK9WOcaHZdtr1q7kj5L6zZiHvqfKHn70vKElRivYpN7Dpat2AF3jGMlSjJno06FZtho6e8cK3q30jFBuURQWvwjpU8DjmVM1WYkcM/ypV9Kr8uS4Ac9WYeYwHrURHYShB/rKo1ZnXeZv+E1aEoFviQKXnUFoPcZlNUH2aBhiK5xTJUjpR4m1xaDTjJYzlD96vbCd94qQGX+GO8f9u2r8HgefTaKzpvqwZB/z+WSdOfyWYkcR/B1UuTfbdHLxzFUzu0h8aZU4suuy34aM9OfQ6IK4laFtUf/Uly90q5cKVREZr8ybiQPIClc8dNVzcclXSK5JI8FTp+ReCGTePzzj4i7oldiydSuMV0iL0QQwXpBTPLxxffxe3YKgx3gNcGfmsZ+GbmWssfRkbadfdqUc1g4Jk6dx+BcYYjL+UjVtIzo9oAE3chSt30tpF9WkvKDB43KCbnlIPDweps79IlejLAFEBkQMIwHYK9HQ1WQE2oUSnoU8aNfnHEp/l/YQm2f3zxwYXnQOwW1h7jtRDeIw4+3yzAZaNqhi+O2MF2sLk9BxcCSwjwYtJO9L87xNrtUugb2AMP7h9X+a0P/P20igudpGy2NZYfvDR8f2qSkBIp7NCTCH+SRTDgaeAnR1z3lrvQ5785xFA/IjHieHt9mh+7ewBs0Ghm7BePW2/NVleW+UEjuBw9oGvEKLMCw3CeU659S7ynJTu/lv+SdBcZX07ZQcoM4x9mD6mm8Roma22ZQp4DFGjriu9XiXFv9sgOPzmudPKGPi/neBp9L2LTR7ybj wZm7gyov orFGRgnh8PIF5WXw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000255, version=1.2.4 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: - 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 testcases/kernel/mem/.gitignore | 1 + testcases/kernel/mem/include/mem.h | 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/ksm07.c | 69 +++++++++++++++++++++++++++++ testcases/kernel/mem/lib/mem.c | 70 ++++++++++++++++++++++++++++++ 8 files changed, 149 insertions(+) create mode 100644 testcases/kernel/mem/ksm/ksm07.c base-commit: 8c89ef3d451087ed6e18750bd5eedd10e5ab3d2e