From nobody Mon Nov 25 23:42:08 2024 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DACD71B21A6 for ; Thu, 24 Oct 2024 07:33:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729755229; cv=none; b=nzIqbOrlLbo7VgI14wAJi3nYtzaGIXprUz1mqenvOdCUZmMBgFOHuRnGDcnVEB/FX8THsWbDArJY5iS6WR0CsWhqB/3Vk35/N4CAceWjS/4oreFuhxix52QzMRx5n+HVcUa8ow8uyp8dlPdR2rur8+AIZZmcJA7Uh17ApO2yT1w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729755229; c=relaxed/simple; bh=M0R3zHDAes8blHNNb56eB/dYrJt3dM5C0cEG6y4au10=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=FVX+iybsg8gl8fwRLZVqnN+4P9Xa82kadLvceUgIhrhaKj79VttKrrPMMJmDyFBQUZxBlCvvyCwWwKjKpoXkPzHyAG8CG5Jt3bKucZ77LB16SDGvxAneYTmDtjBAOrd2RVTojYIKg64tjvBG9DW2ugz5BzFiZ2vbavnRkCG6uxo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=u1QXGdYh; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="u1QXGdYh" Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e2939e25402so1191801276.2 for ; Thu, 24 Oct 2024 00:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729755226; x=1730360026; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=2We4CvxKfLkecfrv/oDL8pHcCSPB/kc+5ogezpwpnuw=; b=u1QXGdYh51wCk4m5cIy2szxKpMSn8cOQm196pTl+DdOTqYiDTpnCJRt1wOutVyBo2F 0jwqY5DEb2JOc4G2Paq8AfW3DiLbtrL9mNuaJ0NFQJxROMJF2aen8H0v285OrSGqnb0F AtV7QE4Uc16/c/021T2wLck1lMg4BTGowg7d2jSTqZrIaVqFJ9TxOPrh+vbPmr7CuSxP twwi4XjVT3F55224P4jjt3CJgrpkXL+9Kw68738+eqXEUWxISPg+zntp2GleDjXErFKh 9AKWmGhS2FZo2dOuZqWH+Zufy9irpKWI6xBPExr54MmqOBB+Z7JNGlSviJ3HBRePkffE 9XMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729755226; x=1730360026; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2We4CvxKfLkecfrv/oDL8pHcCSPB/kc+5ogezpwpnuw=; b=E86miIfmXjwNXb/tEubBNoDTqfLdSg3cSWE1dkQwIvFY9bnjsNWJM3YqpQArXccf4p U/Cv5JzFt3IvpyDZa1QTuM39u3kLyyDUKJeA31axK6qx4H0SsXGeJbiCiKRFUQKyRULJ gJE0F28+8bp15g611bfkd7cArpPormFVuH8DpN1eQmncYUXqspZwDz45Sf5jI66hkPK3 jbtL+JAzCAFnrLvADC9m4F/ZWbpx6F7dfQFRtot4+fY/BTKAaenMGi9Pu+Y4OCbyUeYS LSZo/gIKy7hsr33cXRibtrkmpBhFIW29HvkA5UpTysjFpVc0GOZ0RihQ5sPhWryy5P6d qt0A== X-Forwarded-Encrypted: i=1; AJvYcCVRXtWhz4VtMw0wLhO6WLxs7+02/jyYv/iQAdSmJVLG1/WSfGx4TyVm1qbLB+Z2/on9WoGtimB3V0tqVOU=@vger.kernel.org X-Gm-Message-State: AOJu0Yy+/WEy5P+S4euZxqlE5phnGvs1zGegAuMhqv3VvGmtWmfYBZQj El4ZAUiWisbAsxdrWG9DiSzA9d3S5wgzsVXlF9JU/O8Q3YSz6wN861x8sFVKGy4qjw0mXOrcGbM YSlFb8A== X-Google-Smtp-Source: AGHT+IEQF3XmUMfnQFWXLgOqMIZJcZqb0suCDYaD0YRwhNPawy5pg39Y3574SaLRcZwU19FWRca8TDWM5lw2 X-Received: from irogers.svl.corp.google.com ([2620:15c:2c5:11:2391:e0be:5394:f85d]) (user=irogers job=sendgmr) by 2002:a25:bbcd:0:b0:e29:76b7:ed37 with SMTP id 3f1490d57ef6-e2f2fc0f2c6mr17376276.9.1729755225660; Thu, 24 Oct 2024 00:33:45 -0700 (PDT) Date: Thu, 24 Oct 2024 00:33:22 -0700 In-Reply-To: <20241024073324.1513433-1-irogers@google.com> Message-Id: <20241024073324.1513433-9-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20241024073324.1513433-1-irogers@google.com> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog Subject: [PATCH v4 08/10] perf test: Make parallel testing the default From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , James Clark , Howard Chu , Athira Jajeev , Michael Petlan , Veronika Molnarova , Dapeng Mi , Thomas Richter , Ilya Leoshkevich , Colin Ian King , Weilin Wang , Andi Kleen , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Now C tests can have the "exclusive" flag to run without other tests, and shell tests can add "(exclusive)" to their description, run tests in parallel by default. Tests which flake when run in parallel can be marked exclusive to resolve the problem. Non-scientifically, the reduction on `perf test` execution time is from 8m35.890s to 3m55.115s on a Tigerlake laptop. So the tests complete in less than half the time. Tested-by: James Clark Signed-off-by: Ian Rogers --- tools/perf/tests/builtin-test.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-tes= t.c index b997d0a68ca2..a0a678facc45 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -40,8 +40,8 @@ * making them easier to debug. */ static bool dont_fork; -/* Don't fork the tests in parallel and wait for their completion. */ -static bool sequential =3D true; +/* Fork the tests in parallel and wait for their completion. */ +static bool sequential; const char *dso_to_test; const char *test_objdump_path =3D "objdump"; =20 @@ -639,19 +639,12 @@ int cmd_test(int argc, const char **argv) const char *skip =3D NULL; const char *workload =3D NULL; bool list_workloads =3D false; - /* - * Run tests in parallel, lacks infrastructure to avoid running tests - * that clash for resources, So leave it as the developers choice to - * enable while working on the needed infra. - */ - bool parallel =3D false; const struct option test_options[] =3D { OPT_STRING('s', "skip", &skip, "tests", "tests to skip"), OPT_INCR('v', "verbose", &verbose, "be more verbose (show symbol address, etc)"), OPT_BOOLEAN('F', "dont-fork", &dont_fork, "Do not fork for testcase"), - OPT_BOOLEAN('p', "parallel", ¶llel, "Run the tests in parallel"), OPT_BOOLEAN('S', "sequential", &sequential, "Run the tests one after another rather than in parallel"), OPT_STRING('w', "workload", &workload, "work", "workload to run for testi= ng, use '--list-workloads' to list the available ones."), @@ -688,8 +681,6 @@ int cmd_test(int argc, const char **argv) =20 if (dont_fork) sequential =3D true; - else if (parallel) - sequential =3D false; =20 symbol_conf.priv_size =3D sizeof(int); symbol_conf.try_vmlinux_path =3D true; --=20 2.47.0.163.g1226f6d8fa-goog