From patchwork Mon Nov 27 17:45:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roesch X-Patchwork-Id: 13470059 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 895CCC4167B for ; Mon, 27 Nov 2023 17:45:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1E25D6B02C6; Mon, 27 Nov 2023 12:45:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 192356B02C7; Mon, 27 Nov 2023 12:45:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0A9686B02C9; Mon, 27 Nov 2023 12:45:36 -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 EF17C6B02C6 for ; Mon, 27 Nov 2023 12:45:35 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id BC97F1A059C for ; Mon, 27 Nov 2023 17:45:35 +0000 (UTC) X-FDA: 81504461430.26.DA92C5A Received: from 66-220-144-179.mail-mxout.facebook.com (66-220-144-179.mail-mxout.facebook.com [66.220.144.179]) by imf04.hostedemail.com (Postfix) with ESMTP id 34EBC4002B for ; Mon, 27 Nov 2023 17:45:33 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=none; dmarc=none; spf=neutral (imf04.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=1701107134; a=rsa-sha256; cv=none; b=sCuNu3UDi14IhMGBaPfPElvibpxYA+1rIZBGmF6fbVLJK2ZBG9gX7H1vX7aP6Q90rhcsjL 47sb07zRxde4UY0Zl6UOLblgWfZEw3ByQCPTgu3IjJAWXQSVIFf4WGHgaaRPIvH65cJ7fS kuSSzF7MSlYN1A/cRzdFboE5YIADLrs= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=none; dmarc=none; spf=neutral (imf04.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=1701107134; 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=UAa5G8OMyiEjoncYd+2oY2nzsKICHazu77SxUsDagvM=; b=QmFFU1MLYVex2DHgAV3sL6xhg+0f7+TDxc4lK/rJVPZYZHoSITqC3Y9gRKyHHO67fK58xF ofhTxMZ9bL+4cZlRcxLOLNXTS1Ja9sCbtldnxFTdBY/xrdn+q7Uv8e+bf407OVjqwijZDM i3vp0bPdNGWo+Kza9JLQ4ypG1ZO3y6Q= Received: by devbig1114.prn1.facebook.com (Postfix, from userid 425415) id 6E796FF95F2B; Mon, 27 Nov 2023 09:45:19 -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 Subject: [PATCH v1] mem: disable KSM smart scan for ksm tests Date: Mon, 27 Nov 2023 09:45:17 -0800 Message-Id: <20231127174517.2369593-1-shr@devkernel.io> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 34EBC4002B X-Stat-Signature: mpqjrnnpx7m3rws95mup9cnex819jz77 X-Rspam-User: X-HE-Tag: 1701107133-865640 X-HE-Meta: U2FsdGVkX1/xf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1fgx6X4q28 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000029, 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 disables the "smart scan" KSM feature to make sure that the volatile count remains at 0. Signed-off-by: Stefan Roesch Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202311161132.13d8ce5a-oliver.sang@intel.com Signed-off-by: Stefan Roesch --- testcases/kernel/mem/lib/mem.c | 4 ++++ 1 file changed, 4 insertions(+) base-commit: 8c89ef3d451087ed6e18750bd5eedd10e5ab3d2e diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c index fbfeef026..ef274a3ac 100644 --- a/testcases/kernel/mem/lib/mem.c +++ b/testcases/kernel/mem/lib/mem.c @@ -454,6 +454,9 @@ void create_same_memory(int size, int num, int unit) {'a', size*MB}, {'a', size*MB}, {'d', size*MB}, {'d', size*MB}, }; + /* Disable smart scan for correct volatile counts. */ + SAFE_FILE_PRINTF(PATH_KSM "smart_scan", "0"); + ps = sysconf(_SC_PAGE_SIZE); pages = MB / ps; @@ -526,6 +529,7 @@ void create_same_memory(int size, int num, int unit) tst_res(TINFO, "stop KSM."); SAFE_FILE_PRINTF(PATH_KSM "run", "0"); + SAFE_FILE_PRINTF(PATH_KSM "smart_scan", "1"); final_group_check(0, 0, 0, 0, 0, 0, size * pages * num); while (waitpid(-1, &status, 0) > 0)