From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CF9C1E1E16; Fri, 23 Jan 2026 10:32:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769164321; cv=none; b=mQmSPN+oRTO79nQzXCgqlK/CisgtsX+OPdz67H0x9WOvg4StNsiVHTo5BpY7SJkm+Oemm/Dtv++GMG+rwWwLmn628fqHIITcrQWO8rG9mYIGEGaLEOgPgTXGXF1ka46Xo9zT5BL3yLH5C9Iq+H1PYuw8n8nFVPnLDM69wCxkgHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769164321; c=relaxed/simple; bh=sHjQ9HOARqWETgrMbOs1PxCzAPQOpCGuR4PBTFPGDNo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ri2huPBPEjoUZ5ehyvf1OvL44nxs+u9+uJmGes7J+RjaxBgYhIhkFkK6eqAzYugXcJlZkvyDkoUIoDAdGpNATcCE74tXvhosiXDjf56KgTqyZpUmHV1uZBsdF1hUFyvmImu6VzNxGYi2GRPEZ5iOzF4y+A0qa8Pb7ujg5zqVlZ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Cy0Bfe6S; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Cy0Bfe6S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A8F1C4CEF1; Fri, 23 Jan 2026 10:31:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769164320; bh=sHjQ9HOARqWETgrMbOs1PxCzAPQOpCGuR4PBTFPGDNo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Cy0Bfe6SNHsO+mgp65s3o4EkcUu2+m8ycDpoVcZlKMUUJABpbYuOVtfmcajmgBT1R IPPf6b7rCpCqQTzIIWRU0Qx5ZHLgnxQTamYqtaKUJAJOijDIrb68/jQLpxSLMAgO+h ZzORXg3t4wXVjy55VPCD0xuiCdHOXvsJ+X5tMZXNO5Pu/Udcc8c1Kh4jQGep+VeXYC sdrlDz1UwcyqEDCEoyovODonProYX3VaqsjnmbYHHh2vT5ESS0sV/idgJr7v3ZLCbH 1xMWR+zBoYB6u2Lge47jpZSQ/3vDqf1oI4nHNyJD9oL14iZhgrnYGSJhLFFcX1WQpH jlzyTd/4ihhBg== Date: Fri, 23 Jan 2026 11:31:57 +0100 From: Daniel Gomez To: Jim Cromie Cc: Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Aaron Tomlin , linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/1] module: speed modprobe by adding name_crc to struct module Message-ID: References: <20260122234621.3403276-1-jim.cromie@gmail.com> <198d1ca0-031f-459c-89bd-6d438a84fcb9@suse.com> Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <198d1ca0-031f-459c-89bd-6d438a84fcb9@suse.com> On 2026-01-23 10:36, Petr Pavlu wrote: > On 1/23/26 12:46 AM, Jim Cromie wrote: > > "modprobe foo" currently does strcmp on the name, this can be improved. > > > > So this commit: > > > > 1. adds name_crc to struct module > > 2. modpost.c computes the value and > > 3. outputs it for "modinfo foo" to see/use. > > > > 4. adds hotpath to find_module_all() > > this uses name_crc to do quick "name-check" > > falls back to strcmp only to guard against collisions. > > > > This should significantly reduce modprobe workload, and shorten module > > load-time. > > > > Since it alters struct module, its binary incompatible. This means: > > > > 1. RFC for its wide "blast radius". > > 2. suitable for major version bump *only* > > > > 3. it opens door for further struct module reorg, to: > > a. segregate fields by "temperature" > > b. pack out paholes. > > c. improve cache locality (by reordering coldest on bottom) > > name should be cold now. > > bikeshedding is appropriate here. > > > > NB: this isn't a substitute for CONFIG_MODULE_SIG. > > It reimplements crc_le(), doesn't reuse kernel's version. > > > > CC: Luis Chamberlain > > CC: Petr Pavlu > > CC: Daniel Gomez > > CC: Sami Tolvanen > > CC: Aaron Tomlin > > CC: linux-modules@vger.kernel.org > > > > Signed-off-by: Jim Cromie > > > > '#' will be ignored, and an empty message aborts the commit. > > This patch looks as if it were generated by AI. If so, please avoid > sending such changes. Otherwise, the commit description should explain FYI, this is a process already documented. You can check out what maintainers expect from contributions and possible guidelines: https://lore.kernel.org/all/20260119200418.89541-1-dave.hansen@linux.intel.com/