From patchwork Fri Jul 28 06:01:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Jain X-Patchwork-Id: 13331224 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 14CB1C001DF for ; Fri, 28 Jul 2023 06:01:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2E5EE6B0072; Fri, 28 Jul 2023 02:01:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2939E6B0074; Fri, 28 Jul 2023 02:01:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 15D236B0075; Fri, 28 Jul 2023 02:01:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 070A06B0072 for ; Fri, 28 Jul 2023 02:01:46 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id BD512C08DA for ; Fri, 28 Jul 2023 06:01:45 +0000 (UTC) X-FDA: 81059974170.08.3527638 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2080.outbound.protection.outlook.com [40.107.93.80]) by imf19.hostedemail.com (Postfix) with ESMTP id 466D61A0008 for ; Fri, 28 Jul 2023 06:01:41 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=uETzK9Wt; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf19.hostedemail.com: domain of Ayush.Jain3@amd.com designates 40.107.93.80 as permitted sender) smtp.mailfrom=Ayush.Jain3@amd.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690524101; 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=H8k5sm2gmo/Nz50bnBBKQQIabGJ3btvovva/VqkeocM=; b=LEVTEQuQxvN76ByxDdmgbBHtBOs3TlAVYX500006Hjms1fa9g9u4y5l9LIuYKdB9rt5rT3 mgTJT0VAO/GQ/RXeN742tfFQwy2L18Nl3OcvPPRfQ812BpCIMVm4Ui1emRleeEAWfLSEa2 6MUOsksYt56B28WjIFsGk/lIMKrAIZM= ARC-Authentication-Results: i=2; imf19.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=uETzK9Wt; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf19.hostedemail.com: domain of Ayush.Jain3@amd.com designates 40.107.93.80 as permitted sender) smtp.mailfrom=Ayush.Jain3@amd.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1690524101; a=rsa-sha256; cv=pass; b=VYj/hspdfrOnA3s6Mt2dgYcTOQmwmXnTM9XpUFPSZZZztu1NpF67q4PdmIYhk1Y3lHMUa+ ezFpTGY2tUyFGCURE/Vt5IoADGPXGywpwZH1FKEX1Ht5d22uB9D2vDO1X/Jkj6t6rIiD7P LIrWF08Zvrb5GNZPndt3QlPhdrwA8zw= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hwPpoi0mJFzBbAvr/tWkfPfS+K6vmjuUlx+Cw4AIlak3vgil1C7Kn8iOz2KKsId9xhZVwr+1NdezoKEVmI5fN/95Dmt05+Y6wXy7ajPVYfuFcSZD5bR7PQa1EfjQAalZNzjDT6Rtfg+7neRJmhym1pVoNKoXLfpCV1snQOho8myQ54nxhqFJGhgGVSJ0PqCoz9tuvmxwOWTWYqjO1k4UxTF3/enxHIyj776YUHtCJLo7k9GK67P2kEyKgZ2N6s3+xYhWqHNNPVjoqBHwQG6fBjMAAYP28PZblwJgqUkRV4bhWQW3XYDSmbL3bIR+49Zgi6/XNka/YFTnhLuKPjkKeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=H8k5sm2gmo/Nz50bnBBKQQIabGJ3btvovva/VqkeocM=; b=cAHZhwD4OSIhKXNQr7atMw2PsmUEB4/UHbvaVJU7KZYWKxYVAZpEIcyzHZnWnMzdTM1eEupXRxG0TRtnvEsMHW5c62DojqFC1DOPHAqiQGHCLBsKneVxSPsh1ufng/ttrIrag428M8wk6Ud8xwnc+2l2LF3MhzIALqQ5DkviRncFVaa0vK/lvQyodBsIR2O649rsE9kAyOsjtdl7cyb3+s7ZTHscrFq5NhHXxWwBZMLNNt9c5Mnjgy2NUOdNwizMbBbTC9g3i+FalscDplHi9dVyMvxkL+rC/xW/H4jY3LRUpWq0cIyICrKl4brSouEUt7M2y04gG34BlJwV2hT4iw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linux-foundation.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H8k5sm2gmo/Nz50bnBBKQQIabGJ3btvovva/VqkeocM=; b=uETzK9WtggVDmb21tByEbRHr5mtStWQXqS/FUg2NlbknkYm3KxIDcM59T1ByzhoEBZ/9fiWeP0FF8YNlZZtXK5nO1OgJbRgR2ipfOUajXr/YXH89N7OELABTqzQfnyzk+TG7REIq3hq+8QBrOuPfagKpu9BsvkKmxhIoCesPCrQ= Received: from CY8PR19CA0046.namprd19.prod.outlook.com (2603:10b6:930:6::10) by MW4PR12MB7431.namprd12.prod.outlook.com (2603:10b6:303:225::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.24; Fri, 28 Jul 2023 06:01:38 +0000 Received: from CY4PEPF0000E9D5.namprd05.prod.outlook.com (2603:10b6:930:6:cafe::c6) by CY8PR19CA0046.outlook.office365.com (2603:10b6:930:6::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29 via Frontend Transport; Fri, 28 Jul 2023 06:01:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000E9D5.mail.protection.outlook.com (10.167.241.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6631.22 via Frontend Transport; Fri, 28 Jul 2023 06:01:38 +0000 Received: from BLR-PF38F8CF.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 28 Jul 2023 01:01:33 -0500 From: Ayush Jain To: , , , , , CC: , , , , , Ayush Jain Subject: [PATCH 1/2] selftests: mm: ksm: Fix incorrect evaluation of parameter Date: Fri, 28 Jul 2023 11:31:08 +0530 Message-ID: <20230728060109.4403-1-ayush.jain3@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D5:EE_|MW4PR12MB7431:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a035107-a299-46bf-7543-08db8f301b53 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CsVB1NNIwYbkBb8Dzw9odCc5Ni/j6O11QeUb/LPoS4gf4TjNS/u0kFxqcw60C9qZtpi67oT5r0EOQADSYIbopHbRbZm3LsJdy14B0qLvpEx3kjLUgR2rDeBSuFCSJiazgnLzdQrXz3lsooqV6U6CWxk+wOnmId7Yp8MmDCcSlWfpIKDhqFhjugNTnoZGU7X4LDnSV5FmboamZ+Kg5vBDQFMAjDaue77FoqbsV9NX37vjdQySWjEeYKoTHUctTZM5e+LKmb+GvmjU8km6jyM9dcA6+zFAfiCGx+29JHGnR6TbiCDWhIjse9aOBFu0kcKfti1zYYPJUSuVDL+dIuagQ7Na6Tn/1rRAZ3JkXstySNsuvSstgnRHN7/9IXIL/BU/g2uGeSBBKiuLyej0JTqvB8H+dTAU8ElyLUdyoQ0DXxi2sd0bkwhmCGOE5zeSq9Me3j0M+bVYA6/n1u7Stxl4i2g1xzdOBxTHb/ioWKQpB7guwz8FWNqvRZJc9HH9Iso5Jw97VJmjycWHvKDqjRQwusggZXxL7jcZpSZ0zPdPcNrZehHLZ2mIQz5KTmDq211scXAaln5F4rkGAMSJ23MCFpBZOP8xIDajwVP8Yo0sQEfpI6q7PNdGHgW/FpJQwyH6fla97zqdXx9gKt2VyrlZPc2BhxhKKSYX/kLJgFJFJkGr+0PYHMiCxRB54ufbDPQa9N2BedpI9Nw1oJlQrD+VIuB+JtOlrN1CkEk7RkJMQIU9f8AmukfPSAsZhD9dhPvqvIM+NF05lu9sd74DsMdKUQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(39860400002)(396003)(136003)(82310400008)(451199021)(46966006)(36840700001)(40470700004)(336012)(1076003)(26005)(186003)(316002)(478600001)(70586007)(16526019)(6636002)(70206006)(4326008)(41300700001)(86362001)(7696005)(8936002)(8676002)(6666004)(54906003)(110136005)(36756003)(5660300002)(426003)(2616005)(2906002)(36860700001)(47076005)(83380400001)(40460700003)(82740400003)(356005)(40480700001)(81166007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2023 06:01:38.1619 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3a035107-a299-46bf-7543-08db8f301b53 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D5.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7431 X-Rspamd-Queue-Id: 466D61A0008 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: kmnog5qjhkp9a8jo9jxhumobzb3445a9 X-HE-Tag: 1690524101-74699 X-HE-Meta: U2FsdGVkX1+1WZ7reFz8Ch4L1q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N4M6pALS7cwDnhZmhVSGJPR3eXa0c0TvYYfboMK0vaYej8iVdaToC/ue8HQNxsb13cabA2PaQHcJw0F5UbNXH7J65DyEbnYgtbeyfEpB4dFo9vmroYar5X+x5YsNniwR/jVVIfrkBJz5lRK5D0GG814RuDGE7FcX17dWU93WiaroFdqPFaBuHOmxt+l8F0jB8bbUsJ7bZqstDbQWnpEChoD1xBqEnO5xhMclAjCWGeuTZSpqAwfYtyU1U+1vs5mHajFBVEB4fET5Y7g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.009411, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: A missing break in kms_tests leads to kselftest hang when the parameter -s is used. In current code flow because of missing break in -s, -t parses args spilled from -s and as -t accepts only valid values as 0,1 so any arg in -s >1 or <0, gets in ksm_test failure This went undetected since, before the addition of option -t, the next case -M would immediately break out of the switch statement but that is no longer the case Add the missing break statement. ----Before---- ./ksm_tests -H -s 100 Invalid merge type ----After---- ./ksm_tests -H -s 100 Number of normal pages: 0 Number of huge pages: 50 Total size: 100 MiB Total time: 0.401732682 s Average speed: 248.922 MiB/s Fixes: 9e7cb94ca218 ("selftests: vm: add KSM merging time test") Signed-off-by: Ayush Jain Reviewed-by: David Hildenbrand --- tools/testing/selftests/mm/ksm_tests.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/mm/ksm_tests.c b/tools/testing/selftests/mm/ksm_tests.c index 435acebdc325..380b691d3eb9 100644 --- a/tools/testing/selftests/mm/ksm_tests.c +++ b/tools/testing/selftests/mm/ksm_tests.c @@ -831,6 +831,7 @@ int main(int argc, char *argv[]) printf("Size must be greater than 0\n"); return KSFT_FAIL; } + break; case 't': { int tmp = atoi(optarg); From patchwork Fri Jul 28 06:01:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Jain X-Patchwork-Id: 13331225 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 853A4C0015E for ; Fri, 28 Jul 2023 06:02:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CCF0A6B0075; Fri, 28 Jul 2023 02:02:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C7F3E6B0078; Fri, 28 Jul 2023 02:02:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B20B36B007B; Fri, 28 Jul 2023 02:02:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id A27EE6B0075 for ; Fri, 28 Jul 2023 02:02:09 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 68C30160CC1 for ; Fri, 28 Jul 2023 06:02:09 +0000 (UTC) X-FDA: 81059975178.09.8E06017 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by imf24.hostedemail.com (Postfix) with ESMTP id 64264180004 for ; Fri, 28 Jul 2023 06:02:06 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=2fmYc3DK; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=amd.com; spf=pass (imf24.hostedemail.com: domain of Ayush.Jain3@amd.com designates 40.107.236.41 as permitted sender) smtp.mailfrom=Ayush.Jain3@amd.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1690524126; a=rsa-sha256; cv=pass; b=rZnNL8rDCuu+Sphpo5c5VwO5gReZ5XauuJPLJuIMd80Zc+icO7zyaG4OACHW1VRuYk29oQ gthxHiRFi397CyKEWcpd4WRz/0YToKsFWZAbucZvhn5ZXCJXPjEoGMDhEHyvcJhZaj+IAN 6BZgwyoC6GF5FN7gplqyBxFShdXeb4A= ARC-Authentication-Results: i=2; imf24.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=2fmYc3DK; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=quarantine) header.from=amd.com; spf=pass (imf24.hostedemail.com: domain of Ayush.Jain3@amd.com designates 40.107.236.41 as permitted sender) smtp.mailfrom=Ayush.Jain3@amd.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690524126; 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:in-reply-to:references:references:dkim-signature; bh=MIxQ7ohbWGeT/zbGGsdB8KghSqMQ6lQ95nvT+1vVung=; b=MM+Z2FXzz1Oo9OJSDKvkoddNFIWqnntT0garG6FxIzo1Rdiz8ixsNev3ZrQRZ8XFmYF+Jn LpAz46pjIKtnxXfGkl8ntEfbw7Fkk6ZND4sWoaaXgOs1hqywGQYLDxepdt6YlOT8WuBmOF NYFi/cBOpRHzo5ecU2LEDL64v1r9JOE= ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l3uOyAU7paj4htTqe4uZbykKU3HWCsRM2lmxBuRXy8rqczEWcjERHpjnpGjMBMIg+UjP8YDPGChemj8EGfaCciv8LGOCZc1IPngzRHDPSQYgE9mxH0yQYy/VTEyW5ueZj2wbd9nygCrfrKfNQUy6cojy86Uxx+xoWFRYExAtrDH5fq1W41e8TCnoVg9i8vO+aEsgLHPon7Mig9VOdvkdigTI4a0kEn08E75P8Xw2LjZwV2ehF0zTWMW+rBSjF9efBTR2SB/nLnY8GUCZgN3uV3CLfs0Zqbo94dz0I9MhmLNVkBArsO8iODf680XtdXAZYJQdMfkdgTDr/lqf4Kv33Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MIxQ7ohbWGeT/zbGGsdB8KghSqMQ6lQ95nvT+1vVung=; b=hqKEY4HPYZc0vwIdsSUcevt7qknFnU8Os0MLTm4icanmxAPzJehWhkBQemV0ISmBHYGk9m/gJhtljH0RxBnOzx7ILgakbxlQwNarLsCSggIVUrGLMOF5uaywIjvXSjkrdg3S91Z0emRYfhA9dyAsnYEBsKgqCnhwhctmykyGOF5nSv/Z2AWsnOqBu3tiYGPwis34JABmuARe+PX5hcGWLUKx0Ul/CytOEtLzxPTaedK9TrPbGVf0mmlpPopgEf456V3CR1Ubqweqj2M+0PHn/aE9vUpjyUCboD+BQ2PQh7xKY3rXh4vmDr1h2fu/j+rmosJ2KRSESlFBB/Eug4gO3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linux-foundation.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MIxQ7ohbWGeT/zbGGsdB8KghSqMQ6lQ95nvT+1vVung=; b=2fmYc3DKmaoQk1KfxqG4hEotDhoYKSKYrv2aTKoSeubKSq/GT9dubm1NzCl+uSvFXNeNuKVfM4w/dduMxL7aekRJUAIV5uBemj7FgL12lc22VH10n07X8rj/Zi5ilqdkzX5Dl26CkJtScU0KDX2nCsWXqbWpr4jYD66VnAVG/xk= Received: from CY5PR13CA0052.namprd13.prod.outlook.com (2603:10b6:930:11::34) by LV3PR12MB9167.namprd12.prod.outlook.com (2603:10b6:408:196::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Fri, 28 Jul 2023 06:02:04 +0000 Received: from CY4PEPF0000E9DB.namprd05.prod.outlook.com (2603:10b6:930:11:cafe::e9) by CY5PR13CA0052.outlook.office365.com (2603:10b6:930:11::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.5 via Frontend Transport; Fri, 28 Jul 2023 06:02:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000E9DB.mail.protection.outlook.com (10.167.241.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6631.22 via Frontend Transport; Fri, 28 Jul 2023 06:02:03 +0000 Received: from BLR-PF38F8CF.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 28 Jul 2023 01:01:56 -0500 From: Ayush Jain To: , , , , , CC: , , , , , Ayush Jain Subject: [PATCH 2/2] selftests: mm: add KSM_MERGE_TIME tests Date: Fri, 28 Jul 2023 11:31:09 +0530 Message-ID: <20230728060109.4403-2-ayush.jain3@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230728060109.4403-1-ayush.jain3@amd.com> References: <20230728060109.4403-1-ayush.jain3@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9DB:EE_|LV3PR12MB9167:EE_ X-MS-Office365-Filtering-Correlation-Id: 6976f1b2-e63c-4b80-8c51-08db8f302a5e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Thz9uZ65+KJe+NQWE7VqUSStpptQtWfa4VsNPSHRU4fdvR2+lwRdKIAl4Cs1hLxBDU/ybo1FA8y5yUA3a3JzPqZVfkjkW2QI31vOxC6dc5CBBVCFWTLRp21GYrSrddEUD4KyzgZihPquf7BucecCDo6Nf7HM67ZXYATwayLT8lusdfG9avR9OJ+A2ATcnqf4/uouJFvAdMV2ujDlZW8x3RfC2dXZuD6lWJkQgcyqsH3VnCIUhJjFdNamVHVXVaIWXWnwZeW9EllXUQqVLGfobR54ab3vAFj3/VURq3RxxzxW0sIEIUR9G9PdL7nkq01hr/2U9Vd7Ye2caP4JuH2N1QoXM1baipEPNDkbRX5/H5mQ6NTZerdQmkWD2I1vlEm1haWkiC+yE7+OPXy0OsVGFkyovEdRDTJCGZby6tVz+fKKqwKJwUN5NTodNoKEkJnC6Yuot+imWJaNfDK29BYCIBWMGlEw0Z34/r/zQBVy4PYiHwQCvc4e+nka1sjfWzHAqoYnq1Yb5eg5iiIBp7YuNrpXDQExGZ577xL0UDNhzbgl8BgzYS6n8HNJ1p6fFiGeaYZAWg1LcpOw+/EKBZF0g8Dm+Ab7hsPzcORY+8G4jxGcGqMD8fevANrIsoVhG0hJUd17bH+MuK1Z91tcc996C6KLP9t/g6oXs34gsBBFG3e0iAbxkYw+mO88+DRATmUwthGPdf11z5Bcpu0MFOqP3XPu1a/6jmBzH1a8jUJLqCWN5JZRk2/TPukU09ZMDWISMkXPHi8VCCLdfvAlTFN/sA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(136003)(346002)(39860400002)(451199021)(82310400008)(40470700004)(46966006)(36840700001)(40460700003)(26005)(36860700001)(1076003)(16526019)(336012)(47076005)(2616005)(186003)(426003)(316002)(70586007)(70206006)(6636002)(8676002)(8936002)(41300700001)(7696005)(4326008)(6666004)(5660300002)(478600001)(54906003)(110136005)(2906002)(40480700001)(81166007)(356005)(86362001)(36756003)(82740400003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2023 06:02:03.4004 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6976f1b2-e63c-4b80-8c51-08db8f302a5e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9DB.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9167 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 64264180004 X-Stat-Signature: uodpbtmhydfo1yiuedkt3cj1is413gqz X-HE-Tag: 1690524126-430310 X-HE-Meta: U2FsdGVkX1/6+8F9dmmmFJ/mY4zHOVpFql+4aH5UF4KsaT5BeOgqRStBAOCTvTu5afv9MjvUviCeaTP23aQa4JlzgX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FuUKO9zViEVn+rAwsWi7pMerL6nehHO8IXbWxlZGZQMqCjGxdSFr5F4SWv9J2VoVHb5R3Vn0h/08GLTA39xyU14DKbD7mSrFVSF8AMiCc9kqeQ1bIglXkGiOeb21KEnFozwDxdA0O9nZfR3JReDpnyCJu+KCiz1xt+PVxmQuwCjnLqd+447eJuxJGYu7vXe3K4cNVX2JvHC6fKCrEaiZ17nfJthsITx7kHMR9b5g6cpLFTkhEkv7QV/9hKSC1vy 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: add KSM_MERGE_TIME and KSM_MERGE_TIME_HUGE_PAGES tests with size of 100. ./run_vmtests.sh -t ksm ----------------------------- running ./ksm_tests -H -s 100 ----------------------------- Number of normal pages: 0 Number of huge pages: 50 Total size: 100 MiB Total time: 0.399844662 s Average speed: 250.097 MiB/s [PASS] ----------------------------- running ./ksm_tests -P -s 100 ----------------------------- Total size: 100 MiB Total time: 0.451931496 s Average speed: 221.272 MiB/s [PASS] Signed-off-by: Ayush Jain Reviewed-by: David Hildenbrand --- tools/testing/selftests/mm/run_vmtests.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh index 3f26f6e15b2a..ca3738e042c2 100755 --- a/tools/testing/selftests/mm/run_vmtests.sh +++ b/tools/testing/selftests/mm/run_vmtests.sh @@ -262,6 +262,10 @@ CATEGORY="madv_populate" run_test ./madv_populate CATEGORY="memfd_secret" run_test ./memfd_secret +# KSM KSM_MERGE_TIME_HUGE_PAGES test with size of 100 +CATEGORY="ksm" run_test ./ksm_tests -H -s 100 +# KSM KSM_MERGE_TIME test with size of 100 +CATEGORY="ksm" run_test ./ksm_tests -P -s 100 # KSM MADV_MERGEABLE test with 10 identical pages CATEGORY="ksm" run_test ./ksm_tests -M -p 10 # KSM unmerge test