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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51A58C433F5 for ; Mon, 15 Nov 2021 20:59:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E00861B04 for ; Mon, 15 Nov 2021 20:59:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346803AbhKOVBx (ORCPT ); Mon, 15 Nov 2021 16:01:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347663AbhKOTlE (ORCPT ); Mon, 15 Nov 2021 14:41:04 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3192C061767 for ; Mon, 15 Nov 2021 11:23:35 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id x64so15933881pfd.6 for ; Mon, 15 Nov 2021 11:23:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=qOdfviDawrnQEmhpbh1EywiWPqwK+XMcwjxkSzr6gBk=; b=HEkPVJxufusC0xGDUimU2ECSru8wAVsuOgcAa8mlub4XtZUF5G3IcbwWQX055kI0vN fBqpLpMOyLtDlrWfXIabCgTjMqIQ1Kwr1qOlgn/DD0v/67O2U/NhM2gNFom2rhtrqQmG guHygzAopddmSAnLOH/zFdVNaCIbJYhs7lO1D8epA2ZJxfx1aSplQWN9olV5TsZcn8jX rpUJJI8oSA+cE1QK6veuJ1Waakhw9taGs43e5/VLg88jPSq1RClcTnSmXB/GTqUj/A9R D4YOtQHsi0l8U3Ty9uMJRcbhsmXS15HC+pl780dd1n8ucfwz2YUyEmQ0cRRuP5llYNYr d2oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=qOdfviDawrnQEmhpbh1EywiWPqwK+XMcwjxkSzr6gBk=; b=Bqm8DK2wRlna5kvzY9coRlw+QW14yNCflk9mB7aIbqdZ0YerOty1aPeWbZDoG2BjNn 2tjGBUZMzfiptyN1KoB+Alph/rsQv7B926+I4rKGsb+gOOZo4/2fuau7hbZKuOHWvGPu uOgX/qu+TZXr13IwwPbbMGxHkJnzwh+gj56FgeekEVJm51syoViBuUCltIiw7o1YJhSu 7kVe2WvS42YcQJQQ+t+CjpLvzyt4HC9dC4HTQdlfr5ffqUgEt6xaKyZTYQHKEc/DMWqo gNm0EIMra9rUgAyZTJYq1XJYrVZfeGEBPtK8GzhsfGec/465I26H5xUPqDDONWcgu6Xt 1CFQ== X-Gm-Message-State: AOAM532AhrM5l9Za7JvIj/g3e31neQ/bPHFwt2oZ379674GRjP9R2YLx YyaiGmyJjsF2oId3cOoRR34= X-Google-Smtp-Source: ABdhPJwjTnI3d8c95mBsQVyrQZ2iPHzV2zKNNllAo0wR0AEqNf1JWUnfLlHrZ4LFO1foDav+Q+JZxA== X-Received: by 2002:aa7:9004:0:b0:4a2:e58e:9442 with SMTP id m4-20020aa79004000000b004a2e58e9442mr952983pfo.24.1637004215201; Mon, 15 Nov 2021 11:23:35 -0800 (PST) Received: from [10.1.1.26] (222-155-101-117-fibre.sparkbb.co.nz. [222.155.101.117]) by smtp.gmail.com with ESMTPSA id a23sm4871537pgl.37.2021.11.15.11.23.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Nov 2021 11:23:34 -0800 (PST) Subject: Re: [PATCH 4/5] block: move queue enter logic into blk_mq_submit_bio() To: Geert Uytterhoeven , Ming Lei References: <461c4758-2675-1d11-ac8a-6f25ef01d781@kernel.dk> <3d29a5ce-aace-6198-3ea9-e6f603e74aa1@kernel.dk> <87ee0091-9c2f-50e8-c8f2-dcebebb9de48@kernel.dk> <17ce59ff-bc8c-e8c8-22e1-96605440629a@kernel.dk> Cc: Jens Axboe , Christoph Hellwig , linux-block@vger.kernel.org, linux-m68k , Linux Kernel Mailing List From: Michael Schmitz Message-ID: Date: Tue, 16 Nov 2021 08:23:27 +1300 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-m68k@vger.kernel.org On 12/11/21 20:51, Geert Uytterhoeven wrote: [...] >>>>>> BTW, today I just found that hang in blk_mq_freeze_queue_wait() is >>>>>> caused by commit 900e080752025f00, and the following patch can fix it: >>>>>> >>>>>> - blk-mq: don't grab ->q_usage_counter in blk_mq_sched_bio_merge >>>>>> >>>>>> https://lore.kernel.org/linux-block/20211111085650.GA476@lst.de/T/#m759b88fda094a65ebf29bc81b780967cdaf9cf28 >>>>>> >>>>>> Maybe you can try the above patch. >>>>> >>>>> Thanks! I have applied both patches, but it doesn't make a difference. >>>> >>>> Thanks for your test! >>>> >>>> Can you try the following patch? > > [...] > >>> That's definitely a real fix, akin to the other pre-enter variants, this >>> one just post checks. Geert, can you give this a whirl? > > With both of > > blk-mq: don't grab ->q_usage_counter in blk_mq_sched_bio_merge > blk-mq: rename blk_attempt_bio_merge > > applied, and the version above, I no longer saw the error, but the > boot sometimes hangs after: > > ext3 filesystem being remounted at / supports timestamps until > 2038 (0x7fffffff) > > I don't know how easy that is to trigger: it hung on my first try, but > the second and third tries it booted fully into old Debian userspace. > >>> Ming, would you mind sending this as a real patch? >> >> The above patch may not be enough, since submit_bio_checks() is done in >> case of using cached request, so how about the following patch(un-tested)? > > Worked fine in five subsequent boots. Thanks! > Tested-by: Geert Uytterhoeven For good measure: block-5.16-2021-11-13 tested fine running IO stress tests on a mix of IDE and SCSI disks, only one of those supporting DPO/FUA. Using WARN_ON(rq->cmd_flags & REQ_FUA && !sdkp->DPOFUA); in sd.c:sd_setup_read_write_cmnd(), nothing seen in the logs. Cheers, Michael > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds >