Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1413120imu; Fri, 7 Dec 2018 22:30:31 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xl6hcAFRhoV3iwXU7LoRtDDB2iLEAxxP+rn3ipCbG1d11jH+dKxzbchIAuWlvc3OVIhsSN X-Received: by 2002:a17:902:145:: with SMTP id 63mr4779826plb.256.1544250631880; Fri, 07 Dec 2018 22:30:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544250631; cv=none; d=google.com; s=arc-20160816; b=u2SViQi8qq9AmGsQRt1NaRadWux16zHl4rQXkr7U0WtefOqK+/DHIQKodGDr47kUeb VGOHBR77bKRBNgjjpb/fN6kma1cBswvP1U78saYqE0L0BP8UrZ5LH2FgFzMZ6IdO3vx3 2/8GRRtXG7qxPpVfmc8BQw44VIPAWoXky6ZN2ZDm5EylcQgzHfPJAh6nOIDGYXO5z7FE a6HnQSblzuhkbducqsoHV8N9QX+4uZsNtJ5RvRt4cw5l+2T8Lr8iOzGqWsVhW8R4sIVR PFpcD0Z3ZmvX5UOFyM4lKeWSuh+fHElCcX/wYQM8ZVXCKJhjfi6OPuxYPqkBuLnoSQUx rpNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=hvh/BCPfuASKONJ+dk/etdYN7REuA0ExxDJTO5XrT4U=; b=Ih1tHidd+h3REh/8SyAOYvdx4qq7zltubCZO8uhQdqdebEGmy4vH67aQpvfl/urvaC 1Bdahtzb45Kvg13YGHGTnp3FRn43JoK2mQqAvS4ixwgvgdyC0TcrQDiftQozaJXm13NQ P4FR/cFr9mkzSELxfuJCXYYtc8S2KtYQD6r8kXggQd+hedfLRbIQ6ITxAcDBZLou/i+5 Nzl98H/Ia4j9GLtJ5NAZSYJWsoVFgL9mjLkjqCMjQAZ/Ta/3GCzgu9dXH+CzO6UKZFQ1 yONYqGMAacog7g3vpKmqyqT5Csw0kEp3uhqE9iRaReMocV8pZAxVcN9Hfdt8f8J5vXGy tJ4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@purestorage.com header.s=google header.b=DwB7QpZa; 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=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z123si2930267pfb.104.2018.12.07.22.30.03; Fri, 07 Dec 2018 22:30:31 -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=@purestorage.com header.s=google header.b=DwB7QpZa; 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=REJECT sp=REJECT dis=NONE) header.from=purestorage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726183AbeLHG2r (ORCPT + 99 others); Sat, 8 Dec 2018 01:28:47 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:44934 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbeLHG2r (ORCPT ); Sat, 8 Dec 2018 01:28:47 -0500 Received: by mail-qt1-f194.google.com with SMTP id n32so6970842qte.11 for ; Fri, 07 Dec 2018 22:28:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=purestorage.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hvh/BCPfuASKONJ+dk/etdYN7REuA0ExxDJTO5XrT4U=; b=DwB7QpZaezUQnxoZf+eTeYf7VWe1jHRlmWql76pV8egsYrEasGT5IYpx2yPsq0tHY6 bty+k/tnIhOq3zoPtTp+kDyeSWqD9AoztUIGZmtd/s25BlxhawTxD7ubKpGgX7onOvLA UHozBx+Ol+qgTYMw3dTHG89qFF9PlySZG35jc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hvh/BCPfuASKONJ+dk/etdYN7REuA0ExxDJTO5XrT4U=; b=n8n/kNzcjbTIWdHTbCKPmeu64pWdjE+G/nq66Nh/BgoIe0koYgC17xorjs5R5dQVXI dXdhgP49JHst5Q1aVUNfbLoXeTUSeQSoJ8IP+7r9JyzNsqGAEJ00xumZnlp8MwSJH2O5 6tn5Jy2cn7ArJHAJlvqxcf85bhzB9//6S5cc89zjI0lJlYcIMl3/ddgbZ0znO5lYDXuq DUIRjTbxzZi5EFVU3u8VgqgmE29V6hsuC3qB4AyCkckWTbUnLxcSLnAf0DbhRjC3ediy MnScxSe3DQMgmXoOm43Na3dbFeEsQ4aUKiZ0dFSRT6oHzMkehuxxuwkcvzuihelFb1i8 Cdig== X-Gm-Message-State: AA+aEWYtxeD0goYYETV1O3cXi3yNB+H3M52BwQ+QMb69CpZH5KwOM+o0 C3cub599aJmXeHI4BzzcjK6Guc0nQu8bCKCzw7IbFw== X-Received: by 2002:ac8:3ae5:: with SMTP id x92mr4960114qte.370.1544250526376; Fri, 07 Dec 2018 22:28:46 -0800 (PST) MIME-Version: 1.0 References: <1543535954-28073-1-git-send-email-jalee@purestorage.com> <2055d5b5-2c27-b5a2-e3a0-75146c7bd227@grimberg.me> <20181208020201.GD21523@localhost.localdomain> In-Reply-To: <20181208020201.GD21523@localhost.localdomain> From: Jaesoo Lee Date: Fri, 7 Dec 2018 22:28:36 -0800 Message-ID: Subject: Re: [PATCH] nvme-rdma: complete requests from ->timeout To: keith.busch@intel.com Cc: sagi@grimberg.me, axboe@fb.com, hch@lst.de, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Prabhath Sajeepa , Roland Dreier , Ashish Karkare Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now, I see that my patch is not safe and can cause double completions. However, I am having a hard time finding out a good solution to barrier the racing completions. Could you suggest where the fix should go and what should it look like? We can provide more details on reproducing this issue if that helps. On Fri, Dec 7, 2018 at 6:04 PM Keith Busch wrote: > > On Fri, Dec 07, 2018 at 12:05:37PM -0800, Sagi Grimberg wrote: > > > > > Could you please take a look at this bug and code review? > > > > > > We are seeing more instances of this bug and found that reconnect_work > > > could hang as well, as can be seen from below stacktrace. > > > > > > Workqueue: nvme-wq nvme_rdma_reconnect_ctrl_work [nvme_rdma] > > > Call Trace: > > > __schedule+0x2ab/0x880 > > > schedule+0x36/0x80 > > > schedule_timeout+0x161/0x300 > > > ? __next_timer_interrupt+0xe0/0xe0 > > > io_schedule_timeout+0x1e/0x50 > > > wait_for_completion_io_timeout+0x130/0x1a0 > > > ? wake_up_q+0x80/0x80 > > > blk_execute_rq+0x6e/0xa0 > > > __nvme_submit_sync_cmd+0x6e/0xe0 > > > nvmf_connect_admin_queue+0x128/0x190 [nvme_fabrics] > > > ? wait_for_completion_interruptible_timeout+0x157/0x1b0 > > > nvme_rdma_start_queue+0x5e/0x90 [nvme_rdma] > > > nvme_rdma_setup_ctrl+0x1b4/0x730 [nvme_rdma] > > > nvme_rdma_reconnect_ctrl_work+0x27/0x70 [nvme_rdma] > > > process_one_work+0x179/0x390 > > > worker_thread+0x4f/0x3e0 > > > kthread+0x105/0x140 > > > ? max_active_store+0x80/0x80 > > > ? kthread_bind+0x20/0x20 > > > > > > This bug is produced by setting MTU of RoCE interface to '568' for > > > test while running I/O traffics. > > > > I think that with the latest changes from Keith we can no longer rely > > on blk-mq to barrier racing completions. We will probably need > > to barrier ourselves in nvme-rdma... > > You really need to do that anyway. If you were relying on blk-mq to save > you from double completions by ending a request in the nvme driver while > the lower half can still complete the same one, the only thing preventing > data corruption is the probability the request wasn't reallocated for a > new command.