From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754486AbdCBInc (ORCPT ); Thu, 2 Mar 2017 03:43:32 -0500 Received: from terminus.zytor.com ([65.50.211.136]:48642 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754201AbdCBInX (ORCPT ); Thu, 2 Mar 2017 03:43:23 -0500 Date: Thu, 2 Mar 2017 00:21:35 -0800 From: tip-bot for Boqun Feng Message-ID: Cc: mingo@kernel.org, Nicolai.Haehnle@amd.com, torvalds@linux-foundation.org, hpa@zytor.com, boqun.feng@gmail.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, peterz@infradead.org, paulmck@linux.vnet.ibm.com, chris@chris-wilson.co.uk, fengguang.wu@intel.com, tglx@linutronix.de Reply-To: paulmck@linux.vnet.ibm.com, peterz@infradead.org, fengguang.wu@intel.com, chris@chris-wilson.co.uk, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, torvalds@linux-foundation.org, Nicolai.Haehnle@amd.com, boqun.feng@gmail.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org In-Reply-To: <20170301150138.hdixnmafzfsox7nn@tardis.cn.ibm.com> References: <20170301150138.hdixnmafzfsox7nn@tardis.cn.ibm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/urgent] locking/ww_mutex: Adjust the lock number for stress test Git-Commit-ID: 857811a37129f5d2ba162d7be3986eff44724014 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 857811a37129f5d2ba162d7be3986eff44724014 Gitweb: http://git.kernel.org/tip/857811a37129f5d2ba162d7be3986eff44724014 Author: Boqun Feng AuthorDate: Wed, 1 Mar 2017 23:01:38 +0800 Committer: Ingo Molnar CommitDate: Thu, 2 Mar 2017 09:00:39 +0100 locking/ww_mutex: Adjust the lock number for stress test Because there are only 12 bits in held_lock::references, so we only support 4095 nested lock held in the same time, adjust the lock number for ww_mutex stress test to kill one lockdep splat: [ ] [ BUG: bad unlock balance detected! ] [ ] kworker/u2:0/5 is trying to release lock (ww_class_mutex) at: [ ] ww_mutex_unlock() [ ] but there are no more locks to release! ... Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Chris Wilson Cc: Fengguang Wu Cc: Linus Torvalds Cc: Nicolai Hähnle Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20170301150138.hdixnmafzfsox7nn@tardis.cn.ibm.com Signed-off-by: Ingo Molnar --- kernel/locking/test-ww_mutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c index 3eb39c5..6b7abb3 100644 --- a/kernel/locking/test-ww_mutex.c +++ b/kernel/locking/test-ww_mutex.c @@ -627,7 +627,7 @@ static int __init test_ww_mutex_init(void) if (ret) return ret; - ret = stress(4096, hweight32(STRESS_ALL)*ncpus, 1<<12, STRESS_ALL); + ret = stress(4095, hweight32(STRESS_ALL)*ncpus, 1<<12, STRESS_ALL); if (ret) return ret;