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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70545C77B72 for ; Thu, 20 Apr 2023 05:32:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BFD316B0071; Thu, 20 Apr 2023 01:32:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BACCA6B0072; Thu, 20 Apr 2023 01:32:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A9BF16B0074; Thu, 20 Apr 2023 01:32:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9AF456B0071 for ; Thu, 20 Apr 2023 01:32:17 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 5194DA0109 for ; Thu, 20 Apr 2023 05:32:17 +0000 (UTC) X-FDA: 80700648714.27.527DE1E Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf10.hostedemail.com (Postfix) with ESMTP id 887D4C000E for ; Thu, 20 Apr 2023 05:32:15 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=S1F2Lp4R; spf=pass (imf10.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681968735; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ldCSonsdP/eQc7/T7mCqcZYxf3YFPDIl6bVE/iRypx8=; b=D6Ml8+v1Bz/D+e/8rCWmgkgUOQng57BplvHy6K2S0YOcWX6/Wa2y7TxrRxbmUv38sC6SwK vfhbS7AIZ8o4llwQi7nZX0eZne0J6xc++113GY1MByRZojsiezJmo6+0U2E0AT59ZNADMD eJLlDkvWBeHRrhjHO/1POvHvA+L/dxQ= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=S1F2Lp4R; spf=pass (imf10.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681968735; a=rsa-sha256; cv=none; b=qZypMo/lsph3NCuX0LO9P2ttP63w15xVauZgT5lGl6wUlPHrCTLGuBf/vw6lNr96nl5uSV +z29jwVQNet6t8AMg/Esgldfob0qHKwOjH2i+QP0nQ4nnc+Em3ADTXiI1UM/1J/hIauKh0 clDWQ+b8LFil5EsSEPaKbe/QEhu3m/A= 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 75E3763CF2; 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-Rspamd-Queue-Id: 887D4C000E X-Stat-Signature: p99wjrkqbqx48g1f61mj3xoh6747snsw X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1681968735-681644 X-HE-Meta: U2FsdGVkX18mKh18qs0aPBim6ZrauLY4SfC/a0KvEaGXfak9rGg8GlHE74vOZgLqmPv/KTjTy8O+Ju30/B6W+Um2I3/OQzJh56r3le8SeRRrmbhvy3Ij03703hoBkOgwRMt18o7okcUWx6a959jQ4hsQMrnpH3U+o3Gz61k8EMXueNbIwJ0lPoetg14eC0ucHwG9uhEdUHgCUk2hwO5FJDZ1eWHY73xWk5WRSf28UtItBereoIZ2nhiBtzgknscnBPbLrBL+/V9okOgziMo29Dn8VWnsu/Ye9faf2zFqF8SG0Jt/u+Xd+IWCec8WTT5YRgh2OEiyPqgJZwcLu7UZgS2+YbeVLnZe08sj9ODKPWErw4wpy/O/otDkVlL3BY5QjEuIwXkbp48fxMfHrlkymahKg351qJ3Uw+NMIHEMMi19F09OzPIHZsSbroWJqCInwnB9ze2itpRPvTCFS+P6vZ6AjUdgMOphkAYzs635W/HB6zhOD7XCyYN3XR8MAnzh7ZN5E8ROW5fwTovG4Gdep3cMFmYpSELG/EaucDOLuaVdsNyT2pIAplYFjdFLK6xsCxyJxloUwYSis2Cd8gKm2qnxz8fdqMTD4YujACcGyrKrzIzwhKAQdME+2EFmtveAeyVFdR1s+o/WJCkshPStaa9F1/XeX0jyljkGgTWGtp6K7tcYGhwFKIZqEiIJuKmIDdL67c2EM/Y4yiRLUggHnIhPb2qf4eCNbGYT2ZwD+fA+qv63iAyguYkPA49uI9RXYqBXsAaJbwEzQ/+MLlxdpKc1n58UNWblRXjPRsBpl9WTUN8JTb9429FqeDksMbCNpmWIiUqrrhXgDbyEPB61xrEsI6DxoS52CQIgx2CsrAyUTE0uunx9TcyRXZoYZrzyUkeSe+svtzW3oJmkTah5bVgM0Z9yiEPg07Lbov0zzbwoENB3kLxeD52oGuwgtQQlFLoXm9Jl57pyUIAcjma +QtbO+ul uX078sZObeI8Yjli2iqrdq32Tii1QMz+yq4V7M/+4M1RqsKGVZIhmu9vLpTp7Tp4Le+D+jzF1O66OKSa434lj+UXyitbihvUXckh5pdAA/BUYurSAGBYGwobezT5RrEfq6XtJtmXzzBMogHlAOmDsKqjMkVHW5zJxa6SWQ89a/RZQAkoS6yKDCxRpNk7LipGX+UK0y5Evdw43lxoTtY7BfbU0MBPDlaeAxOiiQ1anvBsaOxScHB7/sjh3KmyTp2YD2g0zoE0ds92YEWSJTJafaT6ipCiq598mXI+JHeF+6jMQTxafWYOXQ+qci8NIO3p7wwRQFRlWvPUy8K+H/DKtVd6a85p+JRKRknclq+hzizdq1rY= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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