Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1029808ybv; Wed, 19 Feb 2020 14:27:01 -0800 (PST) X-Google-Smtp-Source: APXvYqz8RZS+SrJrlIDySID0GDfYYRXv1+0wrinj9Hmh6hf7s7Zh3i/10viGrk0qHDRs0g7z3CdB X-Received: by 2002:a05:6830:1d7a:: with SMTP id l26mr20607403oti.138.1582151221327; Wed, 19 Feb 2020 14:27:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582151221; cv=none; d=google.com; s=arc-20160816; b=e4PY/OMez1gXURCovmKKtCfkyVC956eccEVnOv4TBuNM3GiBf6f2OwcC4rB8m+YYno FQJoEWTXB8W/fLdieB/UBQdkgJlrTLoAL69AxmULMJyzWGw4NHPK0oaawmO6bdgS/8Mw sanupPCX5T4VBDk0ZCbVCBL+prJYBtlL5o0xFHsiS1b5R6PoSMdQajRNIclx0O+Rhrsy R3yaplL0WOy+8vGJh8KBpVEsy4ml+lyyE68rj7mCf1DhypQQFrsVY+NVnXvW3yN8UvY1 iqOC58mmP+G6cFZKdSgyd+cwHASCUBZhv5+CVvVk+iG9wdyleIdQxC9a0SVoVP3BaSbk +NZw== 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=DZA0ribeEWX8XZYNOp8V2N04XGm24eAG8ehEYb5CcW4=; b=kpoL6rjE2cI2Mfzmtx9tOmY37B/XMm0BNLZ3ap/OLBZk0JdrmNbj2+5mcUkIX3UhTF xY80+34DfqR63f/DsyV1BtVenQZ5cEHOvTRrkD71c0oi1eQ9IwubHVjIA3CAU6Nw0sbO NzLw5KrtmyI4VbkpeE+LSrI9ilJfCQbRbWt1hS3G3yRXThqQhsASkagCbPZgkTNYf8CR IabCk5wVGRTQB0jgSc4FuFkiQkoxHdmqCJf5CMqqeTWNpZgMOASxW1ND8C5Sd8cGMam7 DypqsKXu5fF6m81prMyTYDBkxYCuK2HY0Q+znmAz9TiqEcZX93/YN0AEwjtOMbGc7Z5W ixdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="VJa9ax/Y"; 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=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u13si632497otg.56.2020.02.19.14.26.49; Wed, 19 Feb 2020 14:27:01 -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=@google.com header.s=20161025 header.b="VJa9ax/Y"; 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=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727637AbgBSW0n (ORCPT + 99 others); Wed, 19 Feb 2020 17:26:43 -0500 Received: from mail-io1-f68.google.com ([209.85.166.68]:35466 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727291AbgBSW0m (ORCPT ); Wed, 19 Feb 2020 17:26:42 -0500 Received: by mail-io1-f68.google.com with SMTP id h8so2437882iob.2 for ; Wed, 19 Feb 2020 14:26:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DZA0ribeEWX8XZYNOp8V2N04XGm24eAG8ehEYb5CcW4=; b=VJa9ax/Yn+26wBkOB2vajcBuaN3funzj7TCXC1MTUyqxO6HmN0wth2X8WJqP5wslCE ICxFKrAKE/3yirjnw7ZEdeZluvzWvX7rhTfLu8bG9pxONYSYwXy6M/W0rZrWB9k9aiHK kwp2E7MJMyqu2iOIYJwVbRScgBFYnMyIfH+gskrnwRgFcLZxxE11hEBP2IrgroDZuuFu H7mWEXO+Z/RSffJk+lVFkqCeQ5wk/8hxW+Qup2B0QUNdU2HChrE3qyGPBc1LiO+YpE+4 DoRX6fq4Sljh9y90H+tsgzytCGCMLlD+GTl493Hr0jKSH0S6RmsrlFQXLaha+mjXX+v9 YBAQ== 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=DZA0ribeEWX8XZYNOp8V2N04XGm24eAG8ehEYb5CcW4=; b=pF+2TIV6lxxiOGSTf98zZIPQjx4qYbiHCAi+/i+uZzmm8yweZ2drafbbAQMRu3R63N 22SBAv2+kaL2DQfRwn3g3f6XQnZvUpGSoUMkoYnP8juzGI6W+/p5OjmcfaxanhygvUwZ nD5xR0d8ni1ZzuY0xXzSkj9WLufC5OkZ65yA6F2rIpaBx+NLp6H99XUOCngG4/pH59pW rGn3Q/sZu86EibAhbxcJlN7VOR1F+y5vSj3zi7vQkhBPwcixEk08iLQATDrtjkRPFGhD XBc1XqtmuAuuv/i3A9Lulek1eohcTqMo9NKxc/Zl1q9eVGa2lmfPzvBQNIqF+INCAC+x eqeQ== X-Gm-Message-State: APjAAAX3c3TbH+GDN0MxGhWrrnX7kCWbkRy72um2PCTwBeesFSQYRs/e 3plHrAYnFmPppref0LWQiz2Y2qqtzDt700kG1s3Gwg== X-Received: by 2002:a02:cc59:: with SMTP id i25mr22026556jaq.78.1582151200403; Wed, 19 Feb 2020 14:26:40 -0800 (PST) MIME-Version: 1.0 References: <20200213082643.GB9144@ming.t460p> <20200215034652.GA19867@ming.t460p> <20200219025456.GD31488@ming.t460p> <20200219222255.GB24522@ming.t460p> In-Reply-To: <20200219222255.GB24522@ming.t460p> From: Salman Qazi Date: Wed, 19 Feb 2020 14:26:26 -0800 Message-ID: Subject: Re: BLKSECDISCARD ioctl and hung tasks To: Ming Lei Cc: Jesse Barnes , Ming Lei , Bart Van Assche , Jens Axboe , Christoph Hellwig , Linux Kernel Mailing List , linux-block , Gwendal Grignou 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 On Wed, Feb 19, 2020 at 2:23 PM Ming Lei wrote: > > On Wed, Feb 19, 2020 at 09:54:31AM -0800, Salman Qazi wrote: > > On Tue, Feb 18, 2020 at 6:55 PM Ming Lei wrote: > > > > > > On Tue, Feb 18, 2020 at 08:11:53AM -0800, Jesse Barnes wrote: > > > > On Fri, Feb 14, 2020 at 7:47 PM Ming Lei wrote: > > > > > What are the 'other operations'? Are they block IOs? > > > > > > > > > > If yes, that is why I suggest to fix submit_bio_wait(), which should cover > > > > > most of sync bio submission. > > > > > > > > > > Anyway, the fix is simple & generic enough, I'd plan to post a formal > > > > > patch if no one figures out better doable approaches. > > > > > > > > Yeah I think any block I/O operation that occurs after the > > > > BLKSECDISCARD is submitted will also potentially be affected by the > > > > hung task timeouts, and I think your patch will address that. My only > > > > concern with it is that it might hide some other I/O "hangs" that are > > > > due to device misbehavior instead. Yes driver and device timeouts > > > > should generally catch those, but with this in place we might miss a > > > > few bugs. > > > > > > > > Given the nature of these types of storage devices though, I think > > > > that's a minor issue and not worth blocking the patch on, given that > > > > it should prevent a lot of false positive hang reports as Salman > > > > demonstrated. > > > > > > Hello Jesse and Salman, > > > > > > One more question about this issue, do you enable BLK_WBT on your test > > > kernel? > > > > It doesn't exist on the original 4.4-based kernel where we reproduced > > this bug. I am curious how this interacts with this bug. > > blk-wbt can throttle discard request and keep discard queue not too > deep. > > However, given block erase is involved in BLKSECDISCARD, I guess blk-wbt > may not avoid this task hung issue completely. Thanks for the explanation. As I said, it takes one 4K BLKSECDISCARD to get to 100 second delay where the entire device is unusable for that time. So, the queue doesn't have to be deep at all. It's a single tiny IOCTL. > > > Thanks, > Ming >