Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2397521pxm; Fri, 25 Feb 2022 00:51:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoNbTCCz5738Qh4J4UOorpEMA11YdHNKzG4ApAhpMh0EptkByZLci8CMW2XgN7c1CrO5HW X-Received: by 2002:a65:6a13:0:b0:373:14f6:5d33 with SMTP id m19-20020a656a13000000b0037314f65d33mr5395519pgu.62.1645779070670; Fri, 25 Feb 2022 00:51:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645779070; cv=none; d=google.com; s=arc-20160816; b=wi7e3gKlEuMhkK8gZSG9VCw7FSV/JDfFBNz2ute7ekQbp7LFxEKLUtu/2rDVAz+v8Y dO8e/PAE0v3oi5RKHGT9vLxqgXOcluyA8VkoFk44/CT1GZj7FxsN0r+Fqdv5T5sgiHbh UU3G9MA6vMaKY+iOUgaebM/nA6oHJ6bpty9948nJpRYwIoTfUxC0gDabRCPutYiSpXVo aj5UKrMP84dn2T2X/RUhjl0Y5fmMPJX0aYCfigpq7uuVfAIqX5GYCdba5/miXOVUVl3r 1eCIjpuu94qb/olbdVyYj7hL6ebRuEdOIA/Q5Ss2oP1I4acLJ3eMrExs5mELWeR06hqw CAOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IxUmOZZyqoUQWApMFQlH+CPZD7GX9hUMYPLmlYmrURk=; b=zP4gOJuTlN3za8MVqB88RxbyRrbZ9WEgbSHs8g8IVBDvw+S/repy8Qpy4CP253J4Oa 5xsDHa/qMqQJV+VadqVlOSvManXYUwgAHwetIJ0bF+8lwEEpJ/Qxtf1cVYOuIX5LcTcW z2SeOsoTQz8Zk7atAHPOpzwcWOMtuzDUPqJSO93YIujtQlU6o6DOP5frC7kV2W8Fsb49 14hdcBQGiTUdMwOuZJPT+I1Ekw2BGAUoatmlUC+3/Fr+U8fzJLlYyWdsd9UWIYHqri3T o8tjeFPlBG6k/f2Y3f988iuMMi90NBUKgjRglCJyZsrQivZS/zsXRft2hBvLO2f3IjY3 FrCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S7zN7OWY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d185-20020a6368c2000000b003726d378f18si1326846pgc.298.2022.02.25.00.50.56; Fri, 25 Feb 2022 00:51:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S7zN7OWY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S238403AbiBYIND (ORCPT + 99 others); Fri, 25 Feb 2022 03:13:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238397AbiBYINB (ORCPT ); Fri, 25 Feb 2022 03:13:01 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 84262107AA0 for ; Fri, 25 Feb 2022 00:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645776748; 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=IxUmOZZyqoUQWApMFQlH+CPZD7GX9hUMYPLmlYmrURk=; b=S7zN7OWYU4zbaeEMYgMq83uGH8OZLULLhPTFb/PcYf+cDN8GNqdysR8H2/EKnGiZwlbtSm o2WB9/Y/0ojfG97TVyec24go2ppk8+8UTzEaEXfjh6YCPwG2AZ5vnEMbAuqOMEyd5OGO6d J6LVqGnKqi8jCfQfgXWsfXj3PNfxZj8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-167-TBdm7hHcO56R8pNQjibkVQ-1; Fri, 25 Feb 2022 03:12:25 -0500 X-MC-Unique: TBdm7hHcO56R8pNQjibkVQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 050B31006AA5; Fri, 25 Feb 2022 08:12:24 +0000 (UTC) Received: from T590 (ovpn-8-21.pek2.redhat.com [10.72.8.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2AF701F402; Fri, 25 Feb 2022 08:11:59 +0000 (UTC) Date: Fri, 25 Feb 2022 16:11:54 +0800 From: Ming Lei To: Yu Kuai Cc: tj@kernel.org, axboe@kernel.dk, cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yi.zhang@huawei.com Subject: Re: [PATCH v9] block: cancel all throttled bios in del_gendisk() Message-ID: References: <20220210115637.1074927-1-yukuai3@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220210115637.1074927-1-yukuai3@huawei.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 10, 2022 at 07:56:37PM +0800, Yu Kuai wrote: > Throttled bios can't be issued after del_gendisk() is done, thus > it's better to cancel them immediately rather than waiting for > throttle is done. > > For example, if user thread is throttled with low bps while it's > issuing large io, and the device is deleted. The user thread will > wait for a long time for io to return. > > Signed-off-by: Yu Kuai > --- > Changes in v9: > - some minor changes as suggested by Ming. Reviewed-by: Ming Lei -- Ming