From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F0DCC433FE for ; Fri, 25 Feb 2022 08:12:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238401AbiBYINE (ORCPT ); Fri, 25 Feb 2022 03:13:04 -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 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