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 X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B38BFC636C8 for ; Mon, 19 Jul 2021 01:41:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F17061166 for ; Mon, 19 Jul 2021 01:41:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234149AbhGSBoC (ORCPT ); Sun, 18 Jul 2021 21:44:02 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:53637 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233713AbhGSBoA (ORCPT ); Sun, 18 Jul 2021 21:44:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626658861; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gEqAVMebt8KkaRBeojxifkyre8q09DDKsrxdRcTSaRM=; b=PcJ6FVT8i17KyyQG4S8TRJIWMq3LLoW6Xh5/WCtZPozKehrCBcyp3NNl+YSZiYjFFtIPj3 S0RBDbIumWx3J9Yny9Kn5wf9ffKFaROmItf5IdPRXaFbpb8g0rroh587BI5/gWEu8I2+h7 JETqHMADRJ25ua5k5ntjTW9zh1aYf2U= 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-292-zjI_g7yqO8CK3PNlvtZDIw-1; Sun, 18 Jul 2021 21:41:00 -0400 X-MC-Unique: zjI_g7yqO8CK3PNlvtZDIw-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 43EB9802C80; Mon, 19 Jul 2021 01:40:58 +0000 (UTC) Received: from T590 (ovpn-13-11.pek2.redhat.com [10.72.13.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACF5A27068; Mon, 19 Jul 2021 01:40:45 +0000 (UTC) Date: Mon, 19 Jul 2021 09:40:40 +0800 From: Ming Lei To: Oleksandr Natalenko Cc: linux-kernel@vger.kernel.org, Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, David Jeffery , Laurence Oberman , Paolo Valente , Jan Kara , Sasha Levin , Greg Kroah-Hartman , Keith Busch Subject: Re: New warning in nvme_setup_discard Message-ID: References: <4729812.CpyZKHjjVO@natalenko.name> <5053297.vgnLoh5Ws3@natalenko.name> <8988303.mDXGIdCtx8@natalenko.name> <3383530.3bVf3B8HMu@natalenko.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3383530.3bVf3B8HMu@natalenko.name> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 17, 2021 at 02:35:14PM +0200, Oleksandr Natalenko wrote: > On sobota 17. července 2021 14:19:59 CEST Oleksandr Natalenko wrote: > > On sobota 17. července 2021 14:11:05 CEST Oleksandr Natalenko wrote: > > > On sobota 17. července 2021 11:35:32 CEST Ming Lei wrote: > > > > Maybe you need to check if the build is OK, I can't reproduce it in my > > > > VM, and BFQ is still builtin: > > > > > > > > [root@ktest-01 ~]# uname -a > > > > Linux ktest-01 5.14.0-rc1+ #52 SMP Fri Jul 16 18:56:36 CST 2021 x86_64 > > > > x86_64 x86_64 GNU/Linux [root@ktest-01 ~]# cat > > > > /sys/block/nvme0n1/queue/scheduler > > > > [none] mq-deadline kyber bfq > > > > > > I don't think this is an issue with the build… BTW, with `initcall_debug`: > > > > > > ``` > > > [ 0.902555] calling bfq_init+0x0/0x8b @ 1 > > > [ 0.903448] initcall bfq_init+0x0/0x8b returned -28 after 507 usecs > > > ``` > > > > > > -ENOSPC? Why? Also re-tested with the latest git tip, same result :(. > > > > OK, one extra pr_info, and I see this: > > > > ``` > > [ 0.871180] blkcg_policy_register: BLKCG_MAX_POLS too small > > [ 0.871612] blkcg_policy_register: -28 > > ``` > > > > What does it mean please :)? The value seems to be hard-coded: > > > > ``` > > include/linux/blkdev.h > > 60:#define BLKCG_MAX_POLS 5 > > ``` > > OK, after increasing this to 6 I've got my BFQ back. Please see [1]. > > [1] https://lore.kernel.org/linux-block/20210717123328.945810-1-oleksandr@natalenko.name/ OK, after you fixed the issue in blkcg_policy_register(), can you reproduce the discard issue on v5.14-rc1 with BFQ applied? If yes, can you test the patch I posted previously? Thanks, Ming 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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96212C636C8 for ; Mon, 19 Jul 2021 01:41:37 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A21D61166 for ; Mon, 19 Jul 2021 01:41:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A21D61166 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CQcvVj9ZRSq6tJTFZNd5HgD3MoYH8uvfkpU7lc0zlkc=; b=SDVrHP7ZPby9yZ it0RBmq+oxCtQPLuqtOVZ2d7aKdpuHoXW6nFcL7iy0oooPdWyf0iKSpG1eDZCkxZpTA17vRdNGXvx qW+57HYRoieFtsvd7DKES88hKAUy/+SsG1UbJftK4lyrKlTQQ7AmkBUyHAPJuSatSioAnO5OXffi6 4FOX/KFWve842n2qFsRzcZW2KaPDlaJnzCbWtRoXXKtlLKaoTP44JNAZ+Y/H2AEYlhu8aHwygwKvC DLI9/++IF+10zpPsIEfX86yKw0ulsSY4r/K3TxndzbrOQQxbEeRKsDxk00JfW59Be0HgxYWQfgyiY vg1uWDe56DB6duP0qxtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5IHN-008FhB-Jg; Mon, 19 Jul 2021 01:41:09 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5IHK-008Fga-1v for linux-nvme@lists.infradead.org; Mon, 19 Jul 2021 01:41:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626658861; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gEqAVMebt8KkaRBeojxifkyre8q09DDKsrxdRcTSaRM=; b=PcJ6FVT8i17KyyQG4S8TRJIWMq3LLoW6Xh5/WCtZPozKehrCBcyp3NNl+YSZiYjFFtIPj3 S0RBDbIumWx3J9Yny9Kn5wf9ffKFaROmItf5IdPRXaFbpb8g0rroh587BI5/gWEu8I2+h7 JETqHMADRJ25ua5k5ntjTW9zh1aYf2U= 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-292-zjI_g7yqO8CK3PNlvtZDIw-1; Sun, 18 Jul 2021 21:41:00 -0400 X-MC-Unique: zjI_g7yqO8CK3PNlvtZDIw-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 43EB9802C80; Mon, 19 Jul 2021 01:40:58 +0000 (UTC) Received: from T590 (ovpn-13-11.pek2.redhat.com [10.72.13.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACF5A27068; Mon, 19 Jul 2021 01:40:45 +0000 (UTC) Date: Mon, 19 Jul 2021 09:40:40 +0800 From: Ming Lei To: Oleksandr Natalenko Cc: linux-kernel@vger.kernel.org, Jens Axboe , Christoph Hellwig , Sagi Grimberg , linux-nvme@lists.infradead.org, David Jeffery , Laurence Oberman , Paolo Valente , Jan Kara , Sasha Levin , Greg Kroah-Hartman , Keith Busch Subject: Re: New warning in nvme_setup_discard Message-ID: References: <4729812.CpyZKHjjVO@natalenko.name> <5053297.vgnLoh5Ws3@natalenko.name> <8988303.mDXGIdCtx8@natalenko.name> <3383530.3bVf3B8HMu@natalenko.name> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <3383530.3bVf3B8HMu@natalenko.name> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210718_184106_219579_AB3A999F X-CRM114-Status: GOOD ( 21.11 ) X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.org T24gU2F0LCBKdWwgMTcsIDIwMjEgYXQgMDI6MzU6MTRQTSArMDIwMCwgT2xla3NhbmRyIE5hdGFs ZW5rbyB3cm90ZToKPiBPbiBzb2JvdGEgMTcuIMSNZXJ2ZW5jZSAyMDIxIDE0OjE5OjU5IENFU1Qg T2xla3NhbmRyIE5hdGFsZW5rbyB3cm90ZToKPiA+IE9uIHNvYm90YSAxNy4gxI1lcnZlbmNlIDIw MjEgMTQ6MTE6MDUgQ0VTVCBPbGVrc2FuZHIgTmF0YWxlbmtvIHdyb3RlOgo+ID4gPiBPbiBzb2Jv dGEgMTcuIMSNZXJ2ZW5jZSAyMDIxIDExOjM1OjMyIENFU1QgTWluZyBMZWkgd3JvdGU6Cj4gPiA+ ID4gTWF5YmUgeW91IG5lZWQgdG8gY2hlY2sgaWYgdGhlIGJ1aWxkIGlzIE9LLCBJIGNhbid0IHJl cHJvZHVjZS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