Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5178967yba; Wed, 8 May 2019 09:04:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyr/kDviQTu3Ctasty6UFHJRBalKCvYy/snLgm+8krY7bBqeO8zySjWRpeuVmiB94xXewCv X-Received: by 2002:a65:4302:: with SMTP id j2mr47518534pgq.291.1557331457191; Wed, 08 May 2019 09:04:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557331457; cv=none; d=google.com; s=arc-20160816; b=ZdWAxQeFaOaGhzdBdIPBMGmK3TH2pD8h4Bdta7nVIm6El/NPjAADtuH67V4iJS6pc2 7vcA8YM4g0VrQOQLMbDjThbR8XU7Wq323qY2Es8dDaYkkTSyfIer2pxE5/k9T1XF3iyT giiF32xhO7DlzAoveq1WNxnCh8oVtWCM0riokg+u21jrtzxqngGiTvQyIEH+/0bMqNFQ cX8eQ53gXzTNszRPZ3mubIFv5rQaHeEtLi7wSaZJTf5gheiIvYvDUWH42Y96C6S9mBA1 Nxnr9uxnQqRB/ZRgS4NFHcbMJd4/jhThNRVNZKA2TXP0vnTnF0jbMVgeJbPSKlgvBDJa 1gWA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=77RyMHazvG2msNzM8pf8/kJ6r9tk7sPVLtMCVG2udcU=; b=YH7qAknvZgEzShHC8lViSXcRA24ADJSY9WOYQO6I8bLzHVfdEQqFiEFvrWA4CSBFcn PG4P9kIroWYKM5nXqZN3Wyw/PdY5C9Y72Uf9/nhj0BV+0m4d6phpAtkyuCXcsbLLF9W6 MliEi8eQGrpPIFE6vZEqmWpVCiWB8JwlYrabYWDftZc0bnBO+IjeBMcViRSF5urpORYV 42DW/+LrFVlH1szJQUkl0lQr/CAgfsOmDzEwn2ASzbwDZA/UCrsfJSGke/VbW/Oh1lSU +HQuOs4Ba3Y2FMftrfOtVLr5Hvj7EkaRJmRmEN+XRdQdHk8x+0XayZM9RQQJ+ukHhfyC oHdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cOJDWf8Z; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si23864985pga.462.2019.05.08.09.03.52; Wed, 08 May 2019 09:04:17 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=cOJDWf8Z; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727515AbfEHQCd (ORCPT + 99 others); Wed, 8 May 2019 12:02:33 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36478 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbfEHQCc (ORCPT ); Wed, 8 May 2019 12:02:32 -0400 Received: by mail-pf1-f193.google.com with SMTP id v80so10728764pfa.3 for ; Wed, 08 May 2019 09:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=77RyMHazvG2msNzM8pf8/kJ6r9tk7sPVLtMCVG2udcU=; b=cOJDWf8ZIA/Ztag3fTZVNI6DZMHUE4a4eeOEZVSOp91ZKk0KrcswOhR0Zo/c/+bof/ 49MqhaXjc9e6ElZm7SZYJct/HYTSN3DoW1IWHeHqNluelE0GsgW6g8v8s2CZzrgOJy4M RvdeVrJKq2Z1b3F2NFCDe1h2Y4c7Y8/7S105h6gZq0duJKTwi5Zye+vNqjkh2krT2kL4 y2lR20qSM5vElIGf+zKpVKiYhQgbgHfzUk2q/WmtbnefHitR5DUDvUHxkbDHkCC+wa/q vRgS9c3dliKpalhmN8dXj64Gc133LJn633t9ahWzP9ZsCbWgC8XxXBs8yuRPJO3V+cU1 L9aA== 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:content-transfer-encoding; bh=77RyMHazvG2msNzM8pf8/kJ6r9tk7sPVLtMCVG2udcU=; b=Dw/JL5Vt/kkZpo0CfAuIsAudWsR/bMuuFOF0bMY1h4EHDEgZEnkepc5qqjAmumqokc 4pkmwdIJ1mRqUvn6GwmFPc8pmm6YUlYO4p1kjnhsk0CRdV8OoY20j4MZzlhiUypxTYL/ OaAFqgfo1sSWraUVtXT6Ql6AptUcbnxd1zJEPClTPm4hozMCrcbjexz5PpNyQzaYLMfo kPs9CwZ4FG8Kb6aJ4glFtK74dZA20bc4NxGVYmOvZzhIPMj0HFcn6OBB/ccMzFk91rAu WIKXH9R89iV2ntyRCkGMwCu6D2G/2qVU+ftoKWgcys+/z9wEXF7sPBWteO+ClNfVdRE3 u+lA== X-Gm-Message-State: APjAAAWThTi8VRAyM4hMf7xv2aPKvtCedMnsNXYQ4XD5fxzzIBji8xcf bJgDaLjFfgv7NJbRkfeoIiREqlyQUyzwggd7Cxc= X-Received: by 2002:a63:5c5b:: with SMTP id n27mr38008342pgm.52.1557331352209; Wed, 08 May 2019 09:02:32 -0700 (PDT) MIME-Version: 1.0 References: <1557248314-4238-1-git-send-email-akinobu.mita@gmail.com> <1557248314-4238-7-git-send-email-akinobu.mita@gmail.com> <20190507170733.GA6783@localhost.localdomain> <20190508002534epcms2p3acacda8460fcfb7f2b978411b74bbbd5@epcms2p3> In-Reply-To: <20190508002534epcms2p3acacda8460fcfb7f2b978411b74bbbd5@epcms2p3> From: Akinobu Mita Date: Thu, 9 May 2019 01:02:21 +0900 Message-ID: Subject: Re: [PATCH v2 6/7] nvme-pci: add device coredump support To: minwoo.im@samsung.com Cc: Keith Busch , Jens Axboe , Sagi Grimberg , "linux-kernel@vger.kernel.org" , "linux-nvme@lists.infradead.org" , Keith Busch , Minwoo Im , Johannes Berg , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2019=E5=B9=B45=E6=9C=888=E6=97=A5(=E6=B0=B4) 9:25 Minwoo Im : > > > This is a bit of a mine field. The shutdown_lock is held when reclaimin= g > > requests that didn't see a response. If you're holding it here and your > > telemetry log page times out, we're going to deadlock. And since the > > controller is probably in a buggered state when you try to retrieve one= , > > I would guess an unrecoverable timeout is the most likely outcome. > > Akinobu, > > I actually agree with Keith's one. In my experience, there was always in= ternal > error inside device when timeout occurs in nvme driver which means the > following command might not be completed due to lack of response from > device. The nvme_coredump() is .coredump() callback of device_driver which is called when anything is written to the /sys/devices/.../coredump. Providing this callback is optional, but simply removing this manual device coredump method is a bit inconvenient. So instead of directly retrieving the snapshot with the shutdown_lock held in this callback, I'll change this to just scheduling the reset work, and the actual device coredump will be triggered by the same procedure that is implemented in the patch 7/7. Therefore telemetry log is retrieved only when the controller is successfully recovered from the crash.