Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1027593ybv; Wed, 19 Feb 2020 14:23:45 -0800 (PST) X-Google-Smtp-Source: APXvYqwBnb+w5iMR1aD+M/Kg+ZSeeBLWRFDCtrkDSQQ48VndnHdUzMvnPa6b8abU60un3K505VcB X-Received: by 2002:aca:514e:: with SMTP id f75mr6480287oib.103.1582151024945; Wed, 19 Feb 2020 14:23:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582151024; cv=none; d=google.com; s=arc-20160816; b=Fu05yOXGg+UEckamOaH2pebGpnKzaLKFnIsD+6j/zhklhFnUQ/3OqMkcQ9VXU6qH3+ TtleaFy7upX4L6USm82WwiH4QmkzelPS2QeWCjWr27NYII9oX3Z1ltQvbMF0wYrFzINV ngYLQ8Yz6U+1HZC3+berZevojDxSONL1Oe3vEtNBUXHps+KKL4uNTU+YGFb3ixnZVtLb 2rw0duxO4dt6gL4cV2wiaf0Qt9TQm3lheGrovqbCHDROWtQ5jOsyA/gcv2uC4TAEW+lf e3GzjNCbxFjAVgg4AFZqykAxeQUc7NWUaP2+Ao8uqmzIzTLbrryBcapnXIp958jmA/gD QaSQ== 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:dkim-signature; bh=nHypu13CZF8UBHp6BjnFh3CpnVljadFwXikdU7QeLTM=; b=XAhVdUubCjTrYS6RNaZqPhPWXc0yBRnzbXeh4db4qm8Pdtjks9IqXnke5xBpamWYOu K9lIKMS3YGd0ipgKXF6A+LedPyGRpVo85Hhq4k1LYY4hDPDbm7CrWBKmgUtmSUeiO5/S jYNS289HYP4JOFF5zBc55LwkXHN6a5O5mATicorsDm35Yn0tBYA8svuYN3VWrDyYvOG7 mgVPMpSFTvjFt5Rvh6oWUCcGOYsdDA7pEpu1o2hKP02oGik5ra3cAIfr9sNiBMG+ISz9 S5TklPOKXutjZJRzVy8JgpmEwjFKGf0UB0DEl5DSSD9Eo71lfD2jZLx27Whriuosdb3l Ybiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dBIJo1if; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a92si551353otc.294.2020.02.19.14.23.29; Wed, 19 Feb 2020 14:23:44 -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=@redhat.com header.s=mimecast20190719 header.b=dBIJo1if; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727794AbgBSWXX (ORCPT + 99 others); Wed, 19 Feb 2020 17:23:23 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:43665 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727291AbgBSWXX (ORCPT ); Wed, 19 Feb 2020 17:23:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582151001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nHypu13CZF8UBHp6BjnFh3CpnVljadFwXikdU7QeLTM=; b=dBIJo1ifiDhzl9lr5o/kbE6kBjhhISOnExVHOoKTb+v4qXkg36sM+IQSuXPamcsSNjRRjK RFU2vZt4T3c3kh9+mf0g8ek8uYm/0G65MyEplMJumDUIJQdB4AxEoSlHTU5Wi6m+FSlkx2 doZax+QdiMsPMXyrwwvcsv6UxPUaI+I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-432-mkJHZndZOSGRlBopAdowcQ-1; Wed, 19 Feb 2020 17:23:17 -0500 X-MC-Unique: mkJHZndZOSGRlBopAdowcQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 802A2800580; Wed, 19 Feb 2020 22:23:15 +0000 (UTC) Received: from ming.t460p (ovpn-8-21.pek2.redhat.com [10.72.8.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F2F0D92D00; Wed, 19 Feb 2020 22:23:03 +0000 (UTC) Date: Thu, 20 Feb 2020 06:22:55 +0800 From: Ming Lei To: Salman Qazi Cc: Jesse Barnes , Ming Lei , Bart Van Assche , Jens Axboe , Christoph Hellwig , Linux Kernel Mailing List , linux-block , Gwendal Grignou Subject: Re: BLKSECDISCARD ioctl and hung tasks Message-ID: <20200219222255.GB24522@ming.t460p> References: <20200213082643.GB9144@ming.t460p> <20200215034652.GA19867@ming.t460p> <20200219025456.GD31488@ming.t460p> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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 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, Ming