Received: by 10.223.164.202 with SMTP id h10csp420783wrb; Thu, 9 Nov 2017 08:21:00 -0800 (PST) X-Google-Smtp-Source: ABhQp+Sbq2teBosha2vmgc+Zoh2IsEmw+w4pvpMKV/S+sxIur3FXDwNZF3BTXAezmUxkEp19CiZc X-Received: by 10.159.242.1 with SMTP id t1mr913630plr.411.1510244460271; Thu, 09 Nov 2017 08:21:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510244460; cv=none; d=google.com; s=arc-20160816; b=moK4WO1qo2dTb1hLUIT83fcOWyQe2S8pGeI5VUf7Ejb/az3vhMuHH5teveUACOFf+g C4rqe5jYMDPr6umBGCaWsSFiJewTI1DOxrJePB6alC/8lpAXeqO42o+ZsfYJxJ+3rfnn vK/JmPdqaO0J1WoY0CuTbCRMN9B7ghDNvqOg1HWjGmlQcjl63SqbKKs63OHUHuJO8sY7 +W/lS8XZAw48G/IWlb2FmeZn0RUywgCG9V/TqFWRTsGus+PVArdjqRh43CM3rg5O/ioC LrnQ4k0FqB8iPaFot11hOyiRJs/K8Qct0kwa2GLy3rlCX7uCLn292P4KEVr19OV8tlDp PnXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=sTAIzRAEnbmjKJY5IsZ19ALlMSLynb+FSdxNhzrL25A=; b=qfcY27bfegQo+VdpENzN+vsR/vXESqr3yfeVclia1HnTahir3AXAWz55gpGNZ2tJdU X25lwk34gOzUds8gcEI1Eua4OhUujDrFfxqzI725OcRBAw43SZ0AQCHV2Ozbzo4ea5np PbmNJxjWtX+JoLUCJuF+dseEImsCU7C+a/cSxGB+Jcxxxk+rFvoexRPt9c+cYRaeG11d tPSDMv/AYCBFUkF0qIq9z2mKqmNPJ+xTPBXCGl2plSfP1u5dJFNnWYxXfKuLurfRq/OR 2WEiQN/42Ow7Nz2hl4p3ALyMmYObo8xR3ekad4/wUNoYTNkmBM3y79TBmGadCwu6/tvy gJ0A== 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 l12si6960973pfd.342.2017.11.09.08.20.49; Thu, 09 Nov 2017 08:21:00 -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 S1753875AbdKIQTf (ORCPT + 81 others); Thu, 9 Nov 2017 11:19:35 -0500 Received: from mx2.suse.de ([195.135.220.15]:52855 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753013AbdKIQT3 (ORCPT ); Thu, 9 Nov 2017 11:19:29 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 294E9AC8B; Thu, 9 Nov 2017 16:19:28 +0000 (UTC) Date: Thu, 9 Nov 2017 08:17:15 -0800 From: Davidlohr Bueso To: Fengguang Wu , akpm@linux-foundation.org Cc: Chris Wilson , linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: [interval_tree_test_init] BUG: soft lockup - CPU#0 stuck for 23s! [swapper/0:1] Message-ID: <20171109161715.xai2dtwqw2frhkcm@linux-n805> References: <20171107044101.32jyyza5qbiyshet@wfg-t540p.sh.intel.com> <20171107165814.4re77faitdlqsqtn@linux-n805> <20171108072630.slkrvukmhmkx6igd@wfg-t540p.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20171108072630.slkrvukmhmkx6igd@wfg-t540p.sh.intel.com> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 08 Nov 2017, Fengguang Wu wrote: >On Tue, Nov 07, 2017 at 08:58:14AM -0800, Davidlohr Bueso wrote: >>On Tue, 07 Nov 2017, Fengguang Wu wrote: >> >>>[ 265.102312] xz_dec_test: module loaded >>>[ 265.111774] xz_dec_test: Create a device node with 'mknod xz_dec_test c 246 0' and write .xz files to it. >>>[ 265.160320] atomic64_test: passed for x86-64 platform with CX8 and with SSE >>>[ 265.181966] glob: 64 self-tests passed, 0 failed >>>[ 265.196996] interval tree insert/remove >>>[ 292.348094] watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [swapper/0:1] >>>[ 292.348094] irq event stamp: 6190340 >>>[ 292.396418] hardirqs last enabled at (6190339): [] restore_regs_and_iret+0x0/0x1d >>>[ 292.396418] hardirqs last disabled at (6190340): [] apic_timer_interrupt+0x98/0xb0 >>>[ 292.396418] softirqs last enabled at (6182242): [] __do_softirq+0x382/0x3f7 >>>[ 292.396418] softirqs last disabled at (6182235): [] irq_exit+0x51/0x7b >>>[ 292.396418] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-rc8 #40 >>>[ 292.396418] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 >>>[ 292.396418] task: ffff880072bf4040 task.stack: ffffc9000031c000 >>>[ 292.396418] RIP: 0010:interval_tree_insert+0x4c/0xd4 >> >>That would be: >> >> for (i = 0; i < perf_loops; i++) { >> for (j = 0; j < nnodes; j++) >> interval_tree_insert(nodes + j, &root); >> for (j = 0; j < nnodes; j++) >> interval_tree_remove(nodes + j, &root); >> } >> >>Which if you are using the default params would end up doing insert() 10 million times. >>How about decrementing perf_loops, it's pretty high. > >It works! Thank you! > >Tested-by: Fengguang Wu > >Fengguang > >>diff --git a/lib/interval_tree_test.c b/lib/interval_tree_test.c >>index 0e343fd29570..1dbdf3704247 100644 >>--- a/lib/interval_tree_test.c >>+++ b/lib/interval_tree_test.c >>@@ -11,7 +11,7 @@ >> MODULE_PARM_DESC(name, msg); >> >>__param(int, nnodes, 100, "Number of nodes in the interval tree"); >>-__param(int, perf_loops, 100000, "Number of iterations modifying the tree"); >>+__param(int, perf_loops, 1000, "Number of iterations modifying the tree"); >> >>__param(int, nsearches, 100, "Number of searches to the interval tree"); >>__param(int, search_loops, 10000, "Number of iterations searching the tree"); >> >>If that works I guess we'd have to limit the max values for such parameters >>to avoid soft lockups. The same applies to your rbtree test report. I've decided to not do this as different users might be ok with the risk, just not the default. Cc'ing akpm. Thanks, Davidlohr --------8<-------------------------------------------------- [PATCH] lib/rbtree-test: lower default params Fengguang reported soft lockups while running the rbtree and interval tree test modules. The logic for these tests all occur in init phase, and we currently are pounding with the default values for number of nodes and number of iterations of each test. Reduce the later by two orders of magnitude. This does not influence the value of the tests in that one thousand times by default is enough to get the picture. Reported-by: Fengguang Wu Signed-off-by: Davidlohr Bueso --- lib/interval_tree_test.c | 4 ++-- lib/rbtree_test.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/interval_tree_test.c b/lib/interval_tree_test.c index 0e343fd29570..835242e74aaa 100644 --- a/lib/interval_tree_test.c +++ b/lib/interval_tree_test.c @@ -11,10 +11,10 @@ MODULE_PARM_DESC(name, msg); __param(int, nnodes, 100, "Number of nodes in the interval tree"); -__param(int, perf_loops, 100000, "Number of iterations modifying the tree"); +__param(int, perf_loops, 1000, "Number of iterations modifying the tree"); __param(int, nsearches, 100, "Number of searches to the interval tree"); -__param(int, search_loops, 10000, "Number of iterations searching the tree"); +__param(int, search_loops, 1000, "Number of iterations searching the tree"); __param(bool, search_all, false, "Searches will iterate all nodes in the tree"); __param(uint, max_endpoint, ~0, "Largest value for the interval's endpoint"); diff --git a/lib/rbtree_test.c b/lib/rbtree_test.c index 191a238e5a9d..7d36c1e27ff6 100644 --- a/lib/rbtree_test.c +++ b/lib/rbtree_test.c @@ -11,7 +11,7 @@ MODULE_PARM_DESC(name, msg); __param(int, nnodes, 100, "Number of nodes in the rb-tree"); -__param(int, perf_loops, 100000, "Number of iterations modifying the rb-tree"); +__param(int, perf_loops, 1000, "Number of iterations modifying the rb-tree"); __param(int, check_loops, 100, "Number of iterations modifying and verifying the rb-tree"); struct test_node { -- 2.13.6 From 1583483655090530756@xxx Wed Nov 08 07:54:52 +0000 2017 X-GM-THRID: 1583427758774087531 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread