From patchwork Fri Nov 30 14:56:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 152545 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3754116ljp; Fri, 30 Nov 2018 06:56:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/WeJnplW+1z6MouToimVuNrIo0ibpjX/3hFUE/TlE7EizCI/M0bVpBsGSPPThr7GhCsIVAU X-Received: by 2002:aa7:85d7:: with SMTP id z23mr6123499pfn.205.1543589796313; Fri, 30 Nov 2018 06:56:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543589796; cv=none; d=google.com; s=arc-20160816; b=SO83xBkitjqAr2UbgqTB5ur4QiFPf8nIgptb86h7E9Rv5ciQn1+XakSVcvSIEwzw2i SjYrmxsgGMxeHkaaHf5EcGpS2IZuBoR5QuGcBiEZXVagpMNKvhedKMd5+mzNdg3xF1/a STmqiX0OetbJzreJNRVZeDCf9dUPEGynyoxdSpO7V/lN9tOEIojiHoO3dl2by8KkbCDZ PiqcYy5EdrBMk30y0aGvvlpOCzAmcO8B79TDGPhFuR9tmjqeP9+205X0uND/AsuByM2B 0rAJRmEBwsDq4Kzf/YrB/JqKLrDg+okHos7J5tD079aG3J7zAeVTUo6317NZaIpv/cFf 4NpA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=pNjyw4WFe5aCEBs5R6p8ET74qSu0suisVeGiZgd56AY=; b=orhQiLGz6Aw054jOH+3S3oouBf3mOqtjN9jO5Yb4g7qEL8dDjpeqvn2gK3iQFZYHlY NIg2Ref4KRedYdm3NV/jvZAFKplH6QFKYOBsAJXaVvwgxOqIa7kivV9kivnN2LlJ0chl 5jUiqd0u859NxLmnLTxIvkZuOITChlnCDEpmz5djsV+UgzmPyaplvNOh6HxkjwLB/mU+ gyiNUIGxtE7hoBOwxLO7WC4a6qMrTMYzzFWa0CIY2sCzX0fTRa5rS4GXQFmW/6Huf2OA vYr89YuPuZtsz2VH6CpwQZpkLS40MKHUj2RbqP38GERhLEOANFe44VdaXoSzrMkjYbx7 nFjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eR9TqU3o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p3-v6si5468737pld.119.2018.11.30.06.56.32; Fri, 30 Nov 2018 06:56:36 -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; dkim=pass header.i=@linaro.org header.s=google header.b=eR9TqU3o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726772AbeLACGF (ORCPT + 32 others); Fri, 30 Nov 2018 21:06:05 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:43465 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726589AbeLACGE (ORCPT ); Fri, 30 Nov 2018 21:06:04 -0500 Received: by mail-lj1-f195.google.com with SMTP id 83-v6so5231432ljf.10 for ; Fri, 30 Nov 2018 06:56:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pNjyw4WFe5aCEBs5R6p8ET74qSu0suisVeGiZgd56AY=; b=eR9TqU3o7I/HzhmBxn2lfwA+RtwRJ0j+V4KkxsfqYKrVijwRU1WNyrq4c62Ugs6Hdo 5c4XmaWZZkjKMH9PP6ol+N9M2wuLW5Yt5IOiKt9cDd2Hc9uyhH27NrrQqSWyCD9h3/wa seQL9aeRH1qmG8lhyqkwB/MFU/z4/EJ0JcvoQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pNjyw4WFe5aCEBs5R6p8ET74qSu0suisVeGiZgd56AY=; b=DVpGa7V62r7ezGEo1LL8Zw37ZKHnERNesiB2md6+bbPBhJUVCJrwDuef9YAtz8vOAe vRijKEzGlUlz1U2IMZtA3sY8B9lPvkMNPRXuEZrxu3LL/EYWDh2x1e2eBwhKTGoetcvv ikuTIRqbk3TbJOjKVABgtKcWxCw7a8XhI41YN3nCyCvohqvVP1RsVX6pIntJ1fs8KpqH HiVAg9dn/t6d3TEWck/MAXahuHik9PuYzwfbAqDTgK/pyvVhSCHcBYFzKOcmSLLZ73jL jpwIixZCgzx4W/T/e6uB50TR7sp+l5H0JKABrD2d+/Bld0vTazziWlV+w09II3f9DzJa sjTQ== X-Gm-Message-State: AA+aEWZj5oecIKDw/7oshKUk+X6hfe5nCR0Y+gwOgmMRRoTp9EckER1K 3n2qkdm2dMD9qSHb/Pg7qULfmw== X-Received: by 2002:a2e:5747:: with SMTP id r7-v6mr4007885ljd.141.1543589788537; Fri, 30 Nov 2018 06:56:28 -0800 (PST) Received: from localhost (c-732171d5.07-21-73746f28.bbcust.telenor.se. [213.113.33.115]) by smtp.gmail.com with ESMTPSA id d2sm850849lfg.16.2018.11.30.06.56.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Nov 2018 06:56:27 -0800 (PST) From: Anders Roxell To: rostedt@goodmis.org, mingo@redhat.com Cc: akpm@linux-foundation.org, dvyukov@google.com, linux-kernel@vger.kernel.org, Anders Roxell , Arnd Bergmann Subject: [PATCH v2] kernel/trace: fix watchdog soft lockup Date: Fri, 30 Nov 2018 15:56:22 +0100 Message-Id: <20181130145622.26334-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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(+) -- 2.19.2 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) {