Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1542925pxf; Fri, 2 Apr 2021 13:40:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdNaenw8um+U1ItzGiUp14zuXleLHL1ai23kTiDLJjfXuBoWZRz/Qdz/tHaAWDNL3smuW6 X-Received: by 2002:a5d:9959:: with SMTP id v25mr12534736ios.189.1617396050192; Fri, 02 Apr 2021 13:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617396050; cv=none; d=google.com; s=arc-20160816; b=wOpxNT+V4fhv18oh5VYplBtD/5EtrpEEV3HK97Ky/QwQV61qXPlU7lArsjt+KFfvtq LU1T4Yx9MFYOHD1HtcjF+ysXczbnELnkWV7Hdp0ewYuSpyzy2WPKer/RLx8K4iYtPK9H yTUVPd3cAEBttr5xqRDFxsfIUAtbPiMFK65IjGKUTG6N2IUEGE2RdwvIzsINVc57N4di BEwwpA7DlDhscZJq9m68VSSsDWjDsjsv6Fg5jXMpDcMwqy2+kcCPMPjsNt0ewOfq4vgn XA4Wau/RKFA+3O7IBQyp3ZOY5yyXUQRyLoqUtN2kyd4i9Et/cRJ26nkOHbL6WX1ExM/5 Cvvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=8nN4lhlpIzclu7FSnUeBgIxTrkdsi2mcBy89BR/Ci4E=; b=AF8wfmuaQDZV6Ur9Wol8puLtipe/q8q2CFyNk7QiFI58IlZAagmDtemQo31QD4taD0 PiOyoaWYxqk9JGKRZWgWwr/D1DlfvCa/FyYPun0cb74Tj+g4qoR75lAIzMsHdKHEWdgB EOVuDyzLBwt4ky/mSU/tdiFvG5i7GHVsJ7vHlQLfeF7PsEFIBinM5/x4e63MmfcHwOUP Vo8mJF8gXWhtt/IYbMez9ODS0FxrTlkDsVfTioVhjqsSmCbBYh0o/PrslQYhWG+EyREf XK1eINiozYtC2UH/pqllZhP5Pny3bVZSIcP2Wnz1cu90ekd7ANcnwwZ+it42X8gTEs7u zxVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j20si8613787ilk.132.2021.04.02.13.40.35; Fri, 02 Apr 2021 13:40:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234161AbhDBUkV (ORCPT + 99 others); Fri, 2 Apr 2021 16:40:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:51376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231149AbhDBUkT (ORCPT ); Fri, 2 Apr 2021 16:40:19 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 407906115A; Fri, 2 Apr 2021 20:40:16 +0000 (UTC) Date: Fri, 2 Apr 2021 16:40:14 -0400 From: Steven Rostedt To: Waiman Long Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Bharata B Rao , Phil Auld , Daniel Thompson , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] sched/debug: Use sched_debug_lock to serialize use of cgroup_path[] only Message-ID: <20210402164014.53c84f05@gandalf.local.home> In-Reply-To: <20210401181030.7689-1-longman@redhat.com> References: <20210401181030.7689-1-longman@redhat.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Apr 2021 14:10:30 -0400 Waiman Long wrote: > The handling of sysrq key can be activated by echoing the key to > /proc/sysrq-trigger or via the magic key sequence typed into a terminal > that is connected to the system in some way (serial, USB or other mean). > In the former case, the handling is done in a user context. In the > latter case, it is likely to be in an interrupt context. > > There should be no more than one instance of sysrq key processing via > a terminal, but multiple instances of /proc/sysrq-trigger is possible. > > Currently in print_cpu() of kernel/sched/debug.c, sched_debug_lock is > taken with interrupt disabled for the whole duration of the calls to > print_*_stats() and print_rq() which could last for the quite some time > if the information dump happens on the serial console. > > If the system has many cpus and the sched_debug_lock is somehow busy > (e.g. parallel sysrq-t), the system may hit a hard lockup panic > depending on the actually serial console implementation of the > system. For instance, Wouldn't placing strategically located "touch_nmi_watchdog()"s around fix this? -- Steve