From patchwork Fri Aug 9 06:07:39 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: 11085385 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6954746 for ; Fri, 9 Aug 2019 06:09:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3AFE28C02 for ; Fri, 9 Aug 2019 06:09:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C752128BE1; Fri, 9 Aug 2019 06:09:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7A9B828BE1 for ; Fri, 9 Aug 2019 06:09:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hvy49-0006be-HH; Fri, 09 Aug 2019 06:07:53 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hvy48-0006bO-Fx for xen-devel@lists.xenproject.org; Fri, 09 Aug 2019 06:07:52 +0000 X-Inumbo-ID: 0454d113-ba6c-11e9-8980-bc764e045a96 Received: from mx1.suse.de (unknown [195.135.220.15]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 0454d113-ba6c-11e9-8980-bc764e045a96; Fri, 09 Aug 2019 06:07:51 +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 CB01FB052; Fri, 9 Aug 2019 06:07:48 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Fri, 9 Aug 2019 08:07:39 +0200 Message-Id: <20190809060744.8985-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH v2 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" X-Virus-Scanned: ClamAV using ClamSMTP 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 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 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(-)