Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3873163imu; Fri, 30 Nov 2018 07:20:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/XPzDLu5+3//GPiaMiI8YSJm74bktZ2yAEyZGtlm/jTRUoCqo85SBiKKapze0CInpLcx4wR X-Received: by 2002:a65:64c8:: with SMTP id t8mr5115695pgv.31.1543591203466; Fri, 30 Nov 2018 07:20:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543591203; cv=none; d=google.com; s=arc-20160816; b=uzW1peY5swC/GfMGsliRsKEJa+QgSNi0zWLxO0lwZSypVsAyrUcWk9eoGWSo0RjFMX MY1FMoPbjE+2yVUuvasGRMUN5bTPfYpzqad1dvPjMi2ecPtiI67bqWoLqfw08EXT3h1i mmdpG1lTy5zIi5r+vXKt/bAR8WYNj3sT0js1fN2AYkYjlJAKi1t5k921GJxrvFSiWaZy 6byglOFNtkvGaVScfvVbDx/VjrPTCAWr8gY9lvNDwe/uiwDhypfqY8rMKV7lliNA2Tfk eX1zAIw3MGy8Rqqg7aBdIqgnaeuVDEabD3F9jC2NokRWnj0/KPAo/7QtbWuWxlbaoyy8 mn3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=7sGjpFFOfbHQ9eFxs9TPOYReqgroyxf97RWYu6P3CxU=; b=GHeU+pMKniWgQtCZCkAUVXx0cxvA7OlsXRnp/PY0zKVezo1SNPav551cim0NZI/yon 6cnTv87ZGGlyNu06nefcPmZyAQO9wJY6b6nSf8MnmmFrtJnLkYF22HOqmlTThGd7x7YK unGK0TJvqp1UdmFy5xVq/sUkDpNPytgSCmRv12iMpgC5rpLRq2ORAO/gy74oNa2w4EZV gs1/N0t5LRCRj42QxDrHxRvCHi7A0G+GtjYjlTIUuH7LHvUNaUo47sN2iv+BSN9WfcAa I6j3jg0JgRgXlPsfs0T+hzizsKextuLhVNOTyfONqvCCyAI2jJiD41umuMWJkd0wr85h k2mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u30si5116134pgn.170.2018.11.30.07.19.23; Fri, 30 Nov 2018 07:20:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727176AbeLAC15 (ORCPT + 99 others); Fri, 30 Nov 2018 21:27:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:49708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbeLAC15 (ORCPT ); Fri, 30 Nov 2018 21:27:57 -0500 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (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 749ED20867; Fri, 30 Nov 2018 15:18:17 +0000 (UTC) Date: Fri, 30 Nov 2018 10:18:15 -0500 From: Steven Rostedt To: Anders Roxell Cc: mingo@redhat.com, akpm@linux-foundation.org, dvyukov@google.com, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: Re: [PATCH v2] kernel/trace: fix watchdog soft lockup Message-ID: <20181130101815.75038642@gandalf.local.home> In-Reply-To: <20181130145622.26334-1-anders.roxell@linaro.org> References: <20181130145622.26334-1-anders.roxell@linaro.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Nov 2018 15:56:22 +0100 Anders Roxell wrote: > When building a allmodconfig kernel for arm64 and boot that in qemu, > CONFIG_FTRACE_STARTUP_TEST gets enabled and that takes time so the > watchdog expires and prints out a message like this: > 'watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:1]' > Depending on what the what test gets called from init_trace_selftests() > it stays minutes in the loop. > Rework so that function cond_resched() gets called in the > init_trace_selftests loop. > This looks fine to me. Should it be marked for stable, and pushed into this release cycle, or wait till the next merge window? -- Steve > Co-developed-by: Arnd Bergmann > Signed-off-by: Arnd Bergmann > Signed-off-by: Anders Roxell > --- > kernel/trace/trace.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > index 5706599ed534..109becbc81ca 100644 > --- a/kernel/trace/trace.c > +++ b/kernel/trace/trace.c > @@ -1547,6 +1547,10 @@ static __init int init_trace_selftests(void) > pr_info("Running postponed tracer tests:\n"); > > list_for_each_entry_safe(p, n, &postponed_selftests, list) { > + /* This loop can take minutes when sanitizers are enabled, so > + * lets make sure we allow RCU processing. > + */ > + cond_resched(); > ret = run_tracer_selftest(p->type); > /* If the test fails, then warn and remove from available_tracers */ > if (ret < 0) {