Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp308561rwr; Wed, 19 Apr 2023 22:52:43 -0700 (PDT) X-Google-Smtp-Source: AKy350bzQIDUfr873QLL0Lu6SRlUhMxR7qROfPoA280THLfPFH6YsPZofjSFdMuvZDwF1gjNDvx8 X-Received: by 2002:a05:6a00:2406:b0:636:4523:da93 with SMTP id z6-20020a056a00240600b006364523da93mr53295pfh.12.1681969963111; Wed, 19 Apr 2023 22:52:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681969963; cv=none; d=google.com; s=arc-20160816; b=0a9DuS4TiD8kugbBPJNpE/PCAACYvzzr62LxTJ8WRch9ouM/+P013A+wwYFMlviqft 4ENo/h86U9NEB65+NqNe0aj8LMm0K5SNP8+2RDpy760LPai5VvtiNgEjjR3eWKlmjTOp WchDBTqoEGCewg+xbEAjqP1tJQVC9VFprkFnPEbZRkYxohLjtoECg2smcF8UqU1Fr1+e 4cY5T/5KdrptjnyYUve8Z4vy5W01uygbJoaeSqF71dHT6VNBZaIa5WunlG6BhyKTVwX8 SuOPthxqYyA/jpIw606KY9BOfdn2AjFOVhvK1Qri1Fh3ii3PkMkdOX1WveJPVmHVQciu FNpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ldCSonsdP/eQc7/T7mCqcZYxf3YFPDIl6bVE/iRypx8=; b=M89cfnm3ID2KHfEiiHy4SzlLVHe+7vcZ70U0iYAQizVhxoyejABpj6x1hHO6uWiGpc BmQm591/rl0D5C4fX6polCbIXbGbfsnUqACXyM27iGocm1NN436tusSDuR/dOjG4+tE7 JzY5bhQMFXEmjkYRWeQ1NMH/KF/Sp/86BKfkK8b7dp8TPGywFuykshpFF68YoubuLXIh onKuNL/loxUu/UA4qfS8h2yrl6qxz6XLAmmSCtAhN0rLCLlU02zQOdI9LqZYqQ8HCBpX OpkQUeM2v+BYYq95gf0e0xP6YsQthbqKxoolliGEjx9xq2ljRVj7CCPZxoYGZo8AOQrT z3Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S1F2Lp4R; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020aa79496000000b0063d39365cccsi717141pfk.161.2023.04.19.22.52.29; Wed, 19 Apr 2023 22:52:43 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S1F2Lp4R; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233469AbjDTFcW (ORCPT + 99 others); Thu, 20 Apr 2023 01:32:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232009AbjDTFcS (ORCPT ); Thu, 20 Apr 2023 01:32:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 057E526B2; Wed, 19 Apr 2023 22:32:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 73D7261730; Thu, 20 Apr 2023 05:32:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D77AC433EF; Thu, 20 Apr 2023 05:32:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681968733; bh=TUvSb3jLAD4SO/CabGVEytTuEPkD5hNOOi9zTj/3c4w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S1F2Lp4RqFs0s9Hsn9ZCCA0dePukkSHX1+r0RpOoFBpNGP1YELgHENY1/MCq4oxcs Emlbr84myUVwwa+qldov5NAcHhhbJ40yZIiqS6Un1hLNoOB4KiARxk0LOrpEFFN/e7 7UY8oSKGe/unFMChoD0RvqkmcEgETE8f6mDIc56Y= Date: Thu, 20 Apr 2023 07:32:10 +0200 From: Greg KH To: Luis Chamberlain Cc: david@redhat.com, patches@lists.linux.dev, linux-modules@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, pmladek@suse.com, petr.pavlu@suse.com, prarit@redhat.com, torvalds@linux-foundation.org, rafael@kernel.org, christophe.leroy@csgroup.eu, tglx@linutronix.de, peterz@infradead.org, song@kernel.org, rppt@kernel.org, dave@stgolabs.net, willy@infradead.org, vbabka@suse.cz, mhocko@suse.com, dave.hansen@linux.intel.com, colin.i.king@gmail.com, jim.cromie@gmail.com, catalin.marinas@arm.com, jbaron@akamai.com, rick.p.edgecombe@intel.com Subject: Re: [PATCH] module: add debugging auto-load duplicate module support Message-ID: References: <20230418204636.791699-1-mcgrof@kernel.org> <2023041951-evolution-unwitting-1791@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 On Wed, Apr 19, 2023 at 04:32:30PM -0700, Luis Chamberlain wrote: > > It's not "wasted", as it is returned when the module is determined to be > > a duplicate. Otherwise everyone will want this enabled as they think it > > will actually save memory. > > I'll change the language to be clear the issue is memory pressure early > on boot. I'll also add a bit of language to help at least guide people > to realize that the real value-add for this, ie, I'll have to mention we > suspect issue is udev and not module auto-loading and that this however > may still help find a few cases we can optimize for. This isn't udev's "problem", all it is doing is what the kernel asked it to do. The kernel said "Here's a new device I found, load a module for it please!" And it's the kmod code here, not udev itself doing all of this. Why not just rate-limit it in userspace if your system can't handle 10's of thousands of kmod calls all at once? I think many s390 systems did this decades ago when they were controlling 10's of thousands of scsi devices and were hit with "device detection storms" at boot like this. If you really think it's the kernel's fault, just slow down the kernel's device detection code for the specific bus that is having problems. We've worked hard to make the kernel boot really fast and device detection happen in parallel, maybe that wasn't a good idea for some systems and so they need to boot slower. If so, then just turn off the parallel probing for the offending bus type. What specific devices and bus types are the problem here for these systems? thanks, greg k-h