From patchwork Fri Apr 2 20:22:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uladzislau Rezki X-Patchwork-Id: 12181513 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE1F6C433B4 for ; Fri, 2 Apr 2021 20:22:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7C24261154 for ; Fri, 2 Apr 2021 20:22:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C24261154 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 285786B0098; Fri, 2 Apr 2021 16:22:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 25D8A6B009A; Fri, 2 Apr 2021 16:22:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0FEAE6B009B; Fri, 2 Apr 2021 16:22:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0046.hostedemail.com [216.40.44.46]) by kanga.kvack.org (Postfix) with ESMTP id E24D86B0098 for ; Fri, 2 Apr 2021 16:22:51 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A553282F9870 for ; Fri, 2 Apr 2021 20:22:51 +0000 (UTC) X-FDA: 77988550542.11.6D638B8 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by imf02.hostedemail.com (Postfix) with ESMTP id B898140002CD for ; Fri, 2 Apr 2021 20:22:47 +0000 (UTC) Received: by mail-lf1-f49.google.com with SMTP id 12so8911718lfq.13 for ; Fri, 02 Apr 2021 13:22:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FuM4xH1nH2MjkVsKxAPd9c0o/UVsSU6PVrCfHekMLP0=; b=HGiJplNIiEH49Jc+MlHgbms83lQfmWfQQvLsBsGybACK6X10jxnc1dYwNuuV15UZCX jhZP18OliuP+gcBgdvqhkPcbd3k65haQ3WlFQMeLfOGqdptBZYGTEFZF99j0I5pv1P3j 7ClfoHpOBXfsphKUAz9CKwioYHbBzGASq5cx/VeAOVvjP35FDsbuulQHqQO0OPXsbJXz 1K9ekdx3MygGIACspecePntZyfNEF9+xXWn9ufGdk1SQvcQSwGRq0qRK0zcl+2cj19z6 c66yIaQGfx1RF0UzxmsqkgcUTe4CZeTKvthqPorMptIg+zsH3B2RWIfPfQ1ZiMTV3xtf HPkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FuM4xH1nH2MjkVsKxAPd9c0o/UVsSU6PVrCfHekMLP0=; b=A76zkmgX+voxu9v7YpV9LC4oRG9hsymdA5JB6qo6k42eQKLVOrB74LHJK6o/wq9x3f lwUgEhQyPMzUR5pZV5X202lVuo6UvOgWxwAlzJQ1q/PduKSMppZx3w6aRQn6teItre3D XmMUPGGoJo838buohC7m8ouFF/rCbXEzL/qAiXBBOQC4SJG7d0K77CEizHrgnWBjdDAn oAGpphhVOZB5749j1AlMq2H6sSzoRkVHsc8jfZOj2iynoT4q28P9IfYfjhT5cmpSwLkY sB2DueuSWhv9G78jJDQrjicGkWQ0ULOdq8Znxug8msyjcn2qBDHNHQ9dz6x+hR/mTOCp WxtQ== X-Gm-Message-State: AOAM530OW35rI7Wa5EqJhthnVJZSqti//OYT7yhri1d7s40p2bm1blL8 nhsh80UcmHABQBRzVCZz/Tk= X-Google-Smtp-Source: ABdhPJw4j+0eY/DUzPzdoOF9LRcINRLYxtb4g8ug6Fp5KR0G9M/RO9DMa5S7TgsP7x1z5tA0JXaCjA== X-Received: by 2002:ac2:57c6:: with SMTP id k6mr9832610lfo.264.1617394970033; Fri, 02 Apr 2021 13:22:50 -0700 (PDT) Received: from pc638.lan (h5ef52e3d.seluork.dyn.perspektivbredband.net. [94.245.46.61]) by smtp.gmail.com with ESMTPSA id f11sm952514lfr.119.2021.04.02.13.22.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 13:22:49 -0700 (PDT) From: "Uladzislau Rezki (Sony)" To: Andrew Morton Cc: linux-mm@kvack.org, LKML , Uladzislau Rezki , Hillf Danton , Michal Hocko , Matthew Wilcox , Oleksiy Avramchenko , Steven Rostedt , linux-kselftest@vger.kernel.org, Shuah Khan Subject: [PATCH-next 3/5] vm/test_vmalloc.sh: adapt for updated driver interface Date: Fri, 2 Apr 2021 22:22:35 +0200 Message-Id: <20210402202237.20334-3-urezki@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210402202237.20334-1-urezki@gmail.com> References: <20210402202237.20334-1-urezki@gmail.com> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: B898140002CD X-Stat-Signature: n17w5y19yquk1gq9ddyp64cb8xo6wf3k Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf02; identity=mailfrom; envelope-from=""; helo=mail-lf1-f49.google.com; client-ip=209.85.167.49 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617394967-989338 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: A 'single_cpu_test' parameter is odd and it does not exist anymore. Instead there was introduced a 'nr_threads' one. If it is not set it behaves as the former parameter. That is why update a "stress mode" according to this change specifying number of workers which are equal to number of CPUs. Also update an output of help message based on a new interface. CC: linux-kselftest@vger.kernel.org CC: Shuah Khan Signed-off-by: Uladzislau Rezki (Sony) --- tools/testing/selftests/vm/test_vmalloc.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tools/testing/selftests/vm/test_vmalloc.sh b/tools/testing/selftests/vm/test_vmalloc.sh index 06d2bb109f06..d73b846736f1 100755 --- a/tools/testing/selftests/vm/test_vmalloc.sh +++ b/tools/testing/selftests/vm/test_vmalloc.sh @@ -11,6 +11,7 @@ TEST_NAME="vmalloc" DRIVER="test_${TEST_NAME}" +NUM_CPUS=`grep -c ^processor /proc/cpuinfo` # 1 if fails exitcode=1 @@ -22,9 +23,9 @@ ksft_skip=4 # Static templates for performance, stressing and smoke tests. # Also it is possible to pass any supported parameters manualy. # -PERF_PARAM="single_cpu_test=1 sequential_test_order=1 test_repeat_count=3" -SMOKE_PARAM="single_cpu_test=1 test_loop_count=10000 test_repeat_count=10" -STRESS_PARAM="test_repeat_count=20" +PERF_PARAM="sequential_test_order=1 test_repeat_count=3" +SMOKE_PARAM="test_loop_count=10000 test_repeat_count=10" +STRESS_PARAM="nr_threads=$NUM_CPUS test_repeat_count=20" check_test_requirements() { @@ -58,8 +59,8 @@ run_perfformance_check() run_stability_check() { - echo "Run stability tests. In order to stress vmalloc subsystem we run" - echo "all available test cases on all available CPUs simultaneously." + echo "Run stability tests. In order to stress vmalloc subsystem all" + echo "available test cases are run by NUM_CPUS workers simultaneously." echo "It will take time, so be patient." modprobe $DRIVER $STRESS_PARAM > /dev/null 2>&1 @@ -92,17 +93,17 @@ usage() echo "# Shows help message" echo "./${DRIVER}.sh" echo - echo "# Runs 1 test(id_1), repeats it 5 times on all online CPUs" - echo "./${DRIVER}.sh run_test_mask=1 test_repeat_count=5" + echo "# Runs 1 test(id_1), repeats it 5 times by NUM_CPUS workers" + echo "./${DRIVER}.sh nr_threads=$NUM_CPUS run_test_mask=1 test_repeat_count=5" echo echo -n "# Runs 4 tests(id_1|id_2|id_4|id_16) on one CPU with " echo "sequential order" - echo -n "./${DRIVER}.sh single_cpu_test=1 sequential_test_order=1 " + echo -n "./${DRIVER}.sh sequential_test_order=1 " echo "run_test_mask=23" echo - echo -n "# Runs all tests on all online CPUs, shuffled order, repeats " + echo -n "# Runs all tests by NUM_CPUS workers, shuffled order, repeats " echo "20 times" - echo "./${DRIVER}.sh test_repeat_count=20" + echo "./${DRIVER}.sh nr_threads=$NUM_CPUS test_repeat_count=20" echo echo "# Performance analysis" echo "./${DRIVER}.sh performance"