Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp519408rwd; Wed, 31 May 2023 01:24:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7IJnZlEFOSl2tfnrtENhzBA6FXgSYJM6B3wTAEnc/GNl+X6ZQ15pP3NzwVZ9fPGPd/Ao/P X-Received: by 2002:a54:4684:0:b0:398:444f:a3d2 with SMTP id k4-20020a544684000000b00398444fa3d2mr2776078oic.20.1685521452762; Wed, 31 May 2023 01:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685521452; cv=none; d=google.com; s=arc-20160816; b=E3xgr6PV3TBS5ue9q58U1o84Nk3HiPC8gWLAFYoKvS3oTMiC0DmDx91QkWoLMeCLc4 KMcGigm3/yuxanxMYwecl23FJUMIGFksulnNRH4MuFDVUXD+4vEHS3b5A+wTRlHjbk4i HzKU9wGMTefjFb09RWYc/0WIbJpv4E/TdNTZ64+yOGoiCPoAb6oHwsGK3xWwC2wf+J3e mEprey/O4hH+j/4ZWx6+OQVK+bGJEALivq3os75dxoVJMRjRbceJ3Xk97BwluYrPqZp/ kmKxVMCpb/Z+DaKoUDoTR6wMaDHRJtb8IA0G8asjxNkaWEmmNrmkFTg4ER/RQqKpvz3r oUbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=tG/D9gExn1g3X7PycsxQjP2hQe2siijhGtJRhHJuzuE=; b=qRrRFUb4nD6BxxC0AeaLf/fiua0YjyZGQglwLsc/qsMg7BUbj9RvSTvk79kbHd2kH2 NrabvF7R7gKYhx+kwei7fgv4eGPnnTyuIN1kGuM86fqqcXCYLqc3JygfLUxUOLis6tzn wFTqDtLq/WhaKSREAxSBcSrgdg7Gvhdg9mhBsTsaHuWQ6ADDJkw+zIRE0ABx+zHKTPRW Q1L+MlI8HqEheu+mJ9RNUJ25xbgu3yMxUcV3BLaAtm9BG0y0CW8KWADBoYEEkuWvJbwN 6tKYUWUB/NumbHKSl8i4tx00bQnkjPDa99ueg/nrj99+9KLdROxqN/Q8AkbKsY1gfc// 4z7Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a22-20020a637f16000000b0050f6925a400si584355pgd.589.2023.05.31.01.24.00; Wed, 31 May 2023 01:24:12 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235108AbjEaH7k (ORCPT + 99 others); Wed, 31 May 2023 03:59:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234858AbjEaH64 (ORCPT ); Wed, 31 May 2023 03:58:56 -0400 Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BBCE183; Wed, 31 May 2023 00:58:37 -0700 (PDT) Received: from [192.168.0.2] (ip5f5ae86a.dynamic.kabel-deutschland.de [95.90.232.106]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 3010B61DFA908; Wed, 31 May 2023 09:57:55 +0200 (CEST) Message-ID: Date: Wed, 31 May 2023 09:57:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH -next v3 6/7] md/raid1-10: don't handle pluged bio by daemon thread Content-Language: en-US To: Yu Kuai Cc: song@kernel.org, neilb@suse.de, akpm@osdl.org, xni@redhat.com, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com References: <20230529131106.2123367-1-yukuai1@huaweicloud.com> <20230529131106.2123367-7-yukuai1@huaweicloud.com> From: Paul Menzel In-Reply-To: <20230529131106.2123367-7-yukuai1@huaweicloud.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,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 Dear Yu, Thank you for your patch. Some minor nits in case you should resend this. In the summary/title it should be plug*g*ed. Am 29.05.23 um 15:11 schrieb Yu Kuai: > From: Yu Kuai > > current->bio_list will be set under submit_bio() context, in this case > bitmap io will be added to the list and wait for current io submission to 1. I’d use present tense: s/will be set/is set/; s/will be added/is added/ 2. wait*s* > finish, while current io submission must wait for bitmap io to be done. > commit 874807a83139 ("md/raid1{,0}: fix deadlock in bitmap_unplug.") fix > the deadlock by handling plugged bio by daemon thread. > > On the one hand, the deadlock won't exist after commit a214b949d8e3 > ("blk-mq: only flush requests from the plug in blk_mq_submit_bio"). On > the other hand, current solution makes it impossible to flush plugged bio > in raid1/10_make_request(), because this will cause that all the writes > will goto daemon thread. s/goto/go to/ Kind regards, Paul > In order to limit the number of plugged bio, commit 874807a83139 > ("md/raid1{,0}: fix deadlock in bitmap_unplug.") is reverted, and the > deadlock is fixed by handling bitmap io asynchronously. > > Signed-off-by: Yu Kuai > --- > drivers/md/raid1-10.c | 14 ++++++++++++++ > drivers/md/raid1.c | 4 ++-- > drivers/md/raid10.c | 8 +++----- > 3 files changed, 19 insertions(+), 7 deletions(-) […]