From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0B844C33F6 for ; Mon, 21 Sep 2026 16:38:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.165.32 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790008702; cv=none; b=o8ecmRECJL7TGgpYFM5F2JG0b1U9Ow9I1e/y705G1y9V4kyi5igb0OOtGroMHTEGtw0smH0v6WCgn2VHrOy/y3teNz5WloaAnh1M/TA/ErT61FdNWZOTUSOgMIeRi39CVPfEa22FVPHy7v2/iP+mcOeHhwjQJzMr4Q4ocA3drNk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790008702; c=relaxed/simple; bh=2H7wvitAMNWSkVHVbItEdyUgymmXQEJ4BVU7Nzg3Npg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ezF1eYU3/1IocrIDgJzGdIJh4X9cSZ/paBUeBHWawcAbHvtZO39zoCqzNEw8k80cdFBgKc+v1slz1QyMUhzxZDLXkY87FmKJLk3y6iuQz2iPlHKkj3AEGipBVXzES/K4UNP2xOckeZ9F6LPhPSEIu08Gl1JpZjf7gAqw0yNgFtk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=IhDdTukv; arc=none smtp.client-ip=205.220.165.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="IhDdTukv" Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68LDtssm2444378; Mon, 21 Sep 2026 16:38:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=corp-2025-04-25; bh=06lN3Fwz4twftnr0 zpISiGj0PUcp5NbI3v0D+O/XXkI=; b=IhDdTukvTqrq0pAWtLjpNw65MKrgdu/R xBakiUN57CxZLsLMiHmr/zotewAmtjwnb6OsLULsA/2b+2IvNzL80xWaiY0tgI3P GKbU5JxcXMezBRA+SmRa2/n9Wf9RprpBFr4+G02lcXq1SD966zPEVkDDpiF8slvN vmygYafw3n6yAsuRJyp3boXLXt/+iCaCNM51XDRIwaE25e/KxSZWkGAnwFsLz7kH LGL9m5tUgjN3Jh98IT2n5UCuxh5DJFLFuDY8pKTKXLAh3p24ngoFNdvutPb8Dgr6 Dbo+H/25gw1lShRiBlIm0bLT2fvlclIWzkHrSQS8BR4M0aUgMjUCGg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 4gsk1qanpv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 21 Sep 2026 16:38:09 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.7/8.18.1.7) with ESMTP id 68LGZQ8w002185; Mon, 21 Sep 2026 16:38:08 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 4gteguee1f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 21 Sep 2026 16:38:08 +0000 (GMT) Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.18.1.12/8.18.1.12) with ESMTP id 68LGZTQw002537; Mon, 21 Sep 2026 16:38:07 GMT Received: from lab61.no.oracle.com (lab61.no.oracle.com [10.172.144.82]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 4gteguee0j-1; Mon, 21 Sep 2026 16:38:07 +0000 (GMT) From: =?UTF-8?q?H=C3=A5kon=20Bugge?= To: Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , Waiman Long Cc: John Stultz , =?UTF-8?q?H=C3=A5kon=20Bugge?= , linux-kernel@vger.kernel.org Subject: [RESEND PATCH 1/2] test-ww_mutex: Report whether stress failures are isolated or mixed Date: Mon, 21 Sep 2026 18:38:00 +0200 Message-ID: <20260921163804.213435-1-haakon.bugge@oracle.com> X-Mailer: git-send-email 2.43.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-21_05,2026-09-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 malwarescore=0 mlxscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2609040000 definitions=main-2609210242 X-Proofpoint-Spam-Info: AW1haW4tMjYwOTIxMDI0MiBTYWx0Z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eb4bfenITa ICnUYBDoPmKvxUH4yf0GA//kduZiMLRiu+eDFf0JAFrqcZuRx6AHU6oGyE7jDlt77fPdl2ehQeh dUxwUQrhdJx97PqOxYzavXlSuTpKA+CCRJO2gX34= The stress tests can run an individual stress worker type in isolation or together with the other stress worker types. Include this information in the error message so that failures can be distinguished between isolated and mixed workloads. Signed-off-by: HÃ¥kon Bugge --- kernel/locking/test-ww_mutex.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c index e11f6b869b4d4..01af56b0bb6c0 100644 --- a/kernel/locking/test-ww_mutex.c +++ b/kernel/locking/test-ww_mutex.c @@ -408,6 +408,7 @@ struct stress { unsigned long timeout; int nlocks; int result; + bool run_in_isolation; }; struct rnd_state rng; @@ -449,6 +450,11 @@ static void dummy_load(struct stress *stress) usleep_range(1000, 2000); } +static const char *in_isolation_or_mixed(bool in_isolation) +{ + return in_isolation ? "in isolation" : "mixed workload"; +} + static void stress_inorder_work(struct work_struct *work) { struct stress *stress = container_of(work, typeof(*stress), work); @@ -497,8 +503,8 @@ static void stress_inorder_work(struct work_struct *work) ww_acquire_fini(&ctx); if (err) { - pr_err_once("stress (%s) failed with %d\n", - __func__, err); + pr_err_once("stress (%s; %s) failed with %d\n", + __func__, in_isolation_or_mixed(stress->run_in_isolation), err); break; } } while (!time_after(jiffies, stress->timeout)); @@ -551,8 +557,9 @@ static void stress_reorder_work(struct work_struct *work) ww_mutex_unlock(ln->lock); if (err != -EDEADLK) { - pr_err_once("stress (%s) failed with %d\n", - __func__, err); + pr_err_once("stress (%s; %s) failed with %d\n", + __func__, + in_isolation_or_mixed(stress->run_in_isolation), err); break; } @@ -588,8 +595,8 @@ static void stress_one_work(struct work_struct *work) dummy_load(stress); ww_mutex_unlock(lock); } else { - pr_err_once("stress (%s) failed with %d\n", - __func__, err); + pr_err_once("stress (%s; %s) failed with %d\n", + __func__, in_isolation_or_mixed(stress->run_in_isolation), err); break; } } while (!time_after(jiffies, stress->timeout)); @@ -653,6 +660,7 @@ static int stress(struct ww_class *class, int nlocks, int nthreads, unsigned int stress->locks = locks; stress->nlocks = nlocks; stress->timeout = jiffies + 2*HZ; + stress->run_in_isolation = flags != STRESS_ALL; queue_work(wq, &stress->work); nthreads--; -- 2.43.5