Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2377340imu; Sat, 8 Dec 2018 23:33:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/URTRmEt5smFjPqypBbt67g+UXaESycWxZsARMhISTUJGv48wAyPORwPepRDt34CS4m4wPr X-Received: by 2002:a62:520b:: with SMTP id g11mr8194342pfb.53.1544340786565; Sat, 08 Dec 2018 23:33:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544340786; cv=none; d=google.com; s=arc-20160816; b=eBgZoxiLzRt/jwfVKjIEPW4mAAag6fqSXHE+t2ch0Q1f22h7bmWHqDEQnLA1uh2NQQ u6SiYDJexj5VskKt8qL1CZzwKUTpPLv3LI7ucyIHgrIQIs3dt1GifjF6sjlkz9LC0yZ0 3sFfq8YFJnGVIgP3JXoWA/bekPYm8+3bp7D2tLEf5pB7ryv6tA4tYougvrSu3eAsLDfM fiY5tYXcmNYeRad8oLqA6GR9VsymCjbRCWOwuEBveYWK72xiaO84X4NY9GmwNRoCSLZu MwjaJ3b5Muxr11BmL4DJQc8t8K2T2tXoG3ZOBw0UiCTC8eAwRlLQo9sO/8HQxF/T0TG3 OlXg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=0e487jcKAneWLwmsISpOAksn5Mr0lPH+4uRJd+CKVDQ=; b=sFIUGkKwSRRPPuoeBf5A8Ywa1ve43EcZ6aiosd0Oo0Id+CgLkehDX4l8TVjoVPlLWp sbL0OV5UPwPDrnZiYPR98VTKFfiXs1Up7KT1B9kZPq6B19t4WHKLTRGHbKS9eieqaM79 uBFljyh4JJF6vC/BzfghndXows+ncHf4CfxOEBg0X4IzqBASArYLsBvMuSTD+emXGooW fUT/bHRA3QAlDOY9OXv+sQbU6cPtxAnbokcWZT1QlS+PcP1WtqgTWEA+6l4VOIibCUNC WGJkh9A6dMtCZsE9Bone3su4LCvp5Lcsv2Dovtq9dAtIHT+pTC6/NUnNniiJXnJmd30v 9pPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=pJpRg304; 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 v13si6985786pgn.355.2018.12.08.23.32.49; Sat, 08 Dec 2018 23:33:06 -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=fail header.i=@gmail.com header.s=20161025 header.b=pJpRg304; 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 S1726100AbeLIHcL (ORCPT + 99 others); Sun, 9 Dec 2018 02:32:11 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:45764 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726079AbeLIHcK (ORCPT ); Sun, 9 Dec 2018 02:32:10 -0500 Received: by mail-pl1-f193.google.com with SMTP id a14so3746901plm.12 for ; Sat, 08 Dec 2018 23:32:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0e487jcKAneWLwmsISpOAksn5Mr0lPH+4uRJd+CKVDQ=; b=pJpRg304yi1gpn/xLzCJsEG/ZNlq3SiYRq9VQKaQ3Hbrep0PqvUd64v9FT9AeknZ04 lKFkZ5smMwIMUtmw8RwX/rOJwJY+W8nXXpQ/ZKnxRRIouVGqL7XChtRZrcVmLPiohB53 g6Nu/MvF3+dAy2haGbKfiOOv0pmATKAJeMmE567nEFYJGDgOXZl98z828pExS994DQmT mw4Rcf1rSNrzhvIB+UljDuiaQZ9erygJ88fFtXq83a/uKRo+imtfHAzXo6J26xS/MinZ mA4oa1lYgCJsQDFhlJC8L/fNExacxG5JR5xA4liOeOrOn1lSBtEovaKmCm6C5V9y4DIq +WOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0e487jcKAneWLwmsISpOAksn5Mr0lPH+4uRJd+CKVDQ=; b=gNsPx0jcUaShTEMjbdNWMVuKunr1zKy8gTaWTSjJEKVzq5W6nnNNooV3MiRjdw5tFm zs9ANmS+16RB01MzPwXvK7zm5+KosGaB1ZhIRBSl2Cgl+Tf5W5Iq17HGm/QRPPMof64o pU0qHPm1bBTHfJHS5glXIHnYOAC59QPzhNmjefzNuWVBPbmCcK2srVlBwUKFNLXT9R1P x4S85MzQOr6ZL9IeM5JONXtKHpZsQDEjTyH3z/S4PlTeJ+cKgRvbF6SDq83XGUC4DAJm rBHj6PqqTVpH5klXEktntRyGw0Z62QEQZmPxVW/4Q4hhd7nwQDgXrKig6XbnbW4JYHmm Fdag== X-Gm-Message-State: AA+aEWZO/V8doCAwusyJxIw2Oy3q9X7k9usxzQxWSCFQ9lBcXxthjW/K xuZvd6x5RPO8QnrHbprikiqIlVQG X-Received: by 2002:a17:902:7481:: with SMTP id h1mr8044275pll.341.1544340729596; Sat, 08 Dec 2018 23:32:09 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id q1sm10681010pfb.96.2018.12.08.23.32.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Dec 2018 23:32:08 -0800 (PST) Subject: Re: [PATCH] nvme: default to 0 poll queues To: Jens Axboe Cc: Christoph Hellwig , Keith Busch , Sagi Grimberg , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <20181209004953.GA11638@roeck-us.net> <4ad5653b-1cd4-a770-2290-ca032eeb7072@roeck-us.net> From: Guenter Roeck Message-ID: <0a6c9479-58b9-5af7-7fb8-880730554e69@roeck-us.net> Date: Sat, 8 Dec 2018 23:32:07 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/8/18 10:31 PM, Jens Axboe wrote: > On Dec 8, 2018, at 11:22 PM, Guenter Roeck wrote: >> >>> On 12/8/18 9:38 PM, Jens Axboe wrote: >>>> On 12/8/18 5:49 PM, Guenter Roeck wrote: >>>> Hi, >>>> >>>>> On Mon, Nov 19, 2018 at 08:18:24AM -0700, Jens Axboe wrote: >>>>> We need a better way of configuring this, and given that polling is >>>>> (still) a bit niche, let's default to using 0 poll queues. That way >>>>> we'll have the same read/write/poll behavior as 4.20, and users that >>>>> want to test/use polling are required to do manual configuration of the >>>>> number of poll queues. >>>>> >>>>> Reviewed-by: Christoph Hellwig >>>>> Signed-off-by: Jens Axboe >>>>> --- >>>> >>>> This patch results in a boot stall when booting parisc (hppa) images >>>> from nvme in qemu. >>>> >>>> ... >>>> Fusion MPT SAS Host driver 3.04.20 >>>> rcu: INFO: rcu_sched detected stalls on CPUs/tasks: >>>> rcu: (detected by 0, t=5252 jiffies, g=141, q=22) >>>> rcu: All QSes seen, last rcu_sched kthread activity 5252 (-66742--71994), jiffies_till_next_fqs=1, root ->qsmask 0x0 >>>> kworker/u8:3 R running task 0 85 2 0x00000004 >>>> Workqueue: nvme-reset-wq nvme_reset_work >>>> Backtrace: >>>> [<10190d20>] show_stack+0x28/0x38 >>>> [<101dd1e0>] sched_show_task.part.3+0xc4/0x144 >>>> [<101dd290>] sched_show_task+0x30/0x38 >>>> [<10221e18>] rcu_check_callbacks+0x760/0x7a4 >>>> >>>> rcu: rcu_sched kthread starved for 5252 jiffies! g141 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=0 >>>> rcu: RCU grace-period kthread stack dump: >>>> rcu_sched R running task 0 10 2 0x00000000 >>>> Backtrace: >>>> [<10995b1c>] __schedule+0x214/0x648 >>>> [<10995f94>] schedule+0x44/0xa8 >>>> [<1099a7c4>] schedule_timeout+0x114/0x1a0 >>>> [<10220e70>] rcu_gp_kthread+0x744/0x968 >>>> [<101d5438>] kthread+0x154/0x15c >>>> [<1019501c>] ret_from_kernel_thread+0x1c/0x24 >>>> >>>> [ continued ] >>>> >>>> This is only seen in SMP configurations; non-SMP configurations are ok. >>>> Reverting the patch fixes the problem. v4.20-rcX and earlier kernels >>>> also boot without problems. >>>> >>>> For reference, here is the qemu command line. This is with qemu 3.0. >>>> >>>> qemu-system-hppa -kernel vmlinux -no-reboot \ >>>> -snapshot \ >>>> -device nvme,serial=foo,drive=d0 \ >>>> -drive file=rootfs.ext2,if=none,format=raw,id=d0 \ >>>> -append 'root=/dev/nvme0n1 rw rootwait panic=-1 console=ttyS0,115200 ' \ >>>> -nographic -monitor null >>>> >>>> Please let me know if you need additional information. >>> Hmm, I think the queue reduction case has a logic error. Actually there >>> are two bugs: >>> 1) Ensure we don't keep overwriting the queue count we ask for >>> 2) Don't include poll_queues in the vectors we need >>> Untested... And not super pretty. But does this work for you? >> >> It solves the boot problem on parisc/hppa. I didn't test with any other architectures. >> Should I run a complete test sequence ? > > That’d be great, thanks. > Ok, started. Guenter