From patchwork Thu Aug 29 10:18:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 11120857 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 480F514F7 for ; Thu, 29 Aug 2019 10:21:29 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F35522CF5 for ; Thu, 29 Aug 2019 10:21:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F35522CF5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i3HWb-0003a7-LJ; Thu, 29 Aug 2019 10:19:29 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i3HWb-0003a1-A3 for xen-devel@lists.xenproject.org; Thu, 29 Aug 2019 10:19:29 +0000 X-Inumbo-ID: 7b84a504-ca46-11e9-8980-bc764e2007e4 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 7b84a504-ca46-11e9-8980-bc764e2007e4; Thu, 29 Aug 2019 10:19:28 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 34D42B649; Thu, 29 Aug 2019 10:18:49 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Thu, 29 Aug 2019 12:18:41 +0200 Message-Id: <20190829101846.21369-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH v3 0/5] enhance lock debugging X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich , Volodymyr Babchuk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" While hunting a locking problem in my core scheduling series I have added some debugging aids to spinlock handling making it easier to find the root cause for the problem. Making use of the already existing lock profiling and enhancing it a little bit produces some really valuable diagnostic data e.g. when a NMI watchdog is triggering a crash. Changes in V3: - rebase to current staging (after realizing that patch 4 still applied, but resulting in patching a wrong function) Changes in V2: - multiple comments addressed - added patch 5 Juergen Gross (5): xen/spinlocks: in debug builds store cpu holding the lock xen: add new CONFIG_DEBUG_LOCKS option xen: print lock profile info in panic() xen: modify lock profiling interface xen: modify several static locks to unique names tools/libxc/xc_misc.c | 1 + tools/misc/xenlockprof.c | 17 ++--- xen/Kconfig.debug | 10 ++- xen/arch/arm/xen.lds.S | 13 ++-- xen/arch/x86/domain.c | 2 +- xen/arch/x86/irq.c | 6 +- xen/arch/x86/time.c | 6 +- xen/arch/x86/xen.lds.S | 13 ++-- xen/common/domain.c | 4 +- xen/common/keyhandler.c | 8 +-- xen/common/perfc.c | 6 +- xen/common/spinlock.c | 161 ++++++++++++++++++++++++++++++-------------- xen/common/sysctl.c | 2 +- xen/common/trace.c | 6 +- xen/drivers/char/console.c | 10 +-- xen/include/public/sysctl.h | 11 ++- xen/include/xen/spinlock.h | 60 ++++++++++------- 17 files changed, 206 insertions(+), 130 deletions(-)