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 7B937C54EAA for ; Fri, 27 Jan 2023 14:27:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232851AbjA0O1M (ORCPT ); Fri, 27 Jan 2023 09:27:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231582AbjA0O1K (ORCPT ); Fri, 27 Jan 2023 09:27:10 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9827F1A973 for ; Fri, 27 Jan 2023 06:26:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674829580; 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=VnkJIxm2QI3DDMT3TxMvWq8lIB2hYw6fZNHH6Pyl3DA=; b=eaoWHnlkGXTIjeHUHt2jSkAgeETMOJuLsXji/poyRdD3brhgJ6PaxS0JClabxpqNsdXgjU fN9okKUGZKaGzjq9GDb3XXcnI9lIwvHtu0FyzvxxeD4oK3f2xUqsy00xPfHdL+GIBPJZbS jB7cDZZt/W+2+JKpucziYWmM3WKFDig= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-110-YDKvetHhPHWP8li8TN9dVw-1; Fri, 27 Jan 2023 09:26:17 -0500 X-MC-Unique: YDKvetHhPHWP8li8TN9dVw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9F1EF3C1014F; Fri, 27 Jan 2023 14:26:16 +0000 (UTC) Received: from [10.22.8.206] (unknown [10.22.8.206]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33E9B492C14; Fri, 27 Jan 2023 14:26:16 +0000 (UTC) Message-ID: Date: Fri, 27 Jan 2023 09:26:16 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! Content-Language: en-US To: Boqun Feng , Chris Murphy Cc: =?UTF-8?B?0JzQuNGF0LDQuNC7INCT0LDQstGA0LjQu9C+0LI=?= , David Sterba , Btrfs BTRFS , linux-kernel , Peter Zijlstra , Ingo Molnar , Will Deacon , Joel Fernandes References: <20220726164250.GE13489@twin.jikos.cz> <20230125171517.GV11562@twin.jikos.cz> <7e48c1ec-c653-484e-88fb-69f3deb40b1d@app.fastmail.com> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/26/23 23:07, Boqun Feng wrote: > On Thu, Jan 26, 2023 at 10:37:56PM -0500, Chris Murphy wrote: >> >> On Thu, Jan 26, 2023, at 7:20 PM, Waiman Long wrote: >>> On 1/26/23 17:42, Mikhail Gavrilov wrote: >>>>> I'm not sure whether these options are better than just increasing the >>>>> number, maybe to unblock your ASAP, you can try make it 30 and make sure >>>>> you have large enough memory to test. >>>> About just to increase the LOCKDEP_CHAINS_BITS by 1. Where should this >>>> be done? In vanilla kernel on kernel.org? In a specific distribution? >>>> or the user must rebuild the kernel himself? Maybe increase >>>> LOCKDEP_CHAINS_BITS by 1 is most reliable solution, but it difficult >>>> to distribute to end users because the meaning of using packaged >>>> distributions is lost (user should change LOCKDEP_CHAINS_BITS in >>>> config and rebuild the kernel by yourself). >>> Note that lockdep is typically only enabled in a debug kernel shipped by >>> a distro because of the high performance overhead. The non-debug kernel >>> doesn't have lockdep enabled. When LOCKDEP_CHAINS_BITS isn't big enough >>> when testing on the debug kernel, you can file a ticket to the distro >>> asking for an increase in CONFIG_LOCKDEP_CHAIN_BITS. Or you can build >>> your own debug kernel with a bigger CONFIG_LOCKDEP_CHAIN_BITS. >> Fedora bumped CONFIG_LOCKDEP_CHAINS_BITS=17 to 18 just 6 months ago for debug kernels. >> https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1921 >> >> If 19 the recommended value I don't mind sending an MR for it. But if >> the idea is we're going to be back here talking about bumping it to 20 >> in six months, I'd like to avoid that. >> > How about a boot parameter then? A boot parameter doesn't work for a statically allocated array which is determined at compile time. Dynamic memory allocation isn't enabled yet at early boot when lockdep will be used. Cheers, Longman