Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2422719rwd; Fri, 2 Jun 2023 09:10:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ62cJxFwvVMnszWvqAEneSlmQnCRue233NUjcA5+y4SvqvtvTtrvKjHC+EqiOgJurlu6Q4/ X-Received: by 2002:a05:6358:918:b0:123:1c32:44c7 with SMTP id r24-20020a056358091800b001231c3244c7mr9527428rwi.15.1685722225448; Fri, 02 Jun 2023 09:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685722225; cv=none; d=google.com; s=arc-20160816; b=Bc9RoGhRWc9qAxMkycmrjuWqw6zMLqXtULtaf5rh+92ZSjoKjSKd0s//UizyNfC7sN bzPpx/UdPj4ErX6o0dCXD9CQFhZ2xO0uJWNXxhlY7wwA0+AYkKpjVAXc1jXZQfs65Gwr MpawUrW47uxtRC2AMOYgX8crl0bFRAQOKxG+aAkyp0j+Cjj+IsHFqg8zVhzet3vkBMP2 rH+IDeZYkZLnaQ0vyzjzfz1uvxCA0VY6pOwMCDlZNa+6oOvY6KDW1bqACsC0iLvSuykT 7ilnXUw3kKKfOWo0aSoskHYku3LuYPanR76fZA5vnLjLdBmfnSFex4ZIrlSt8YVyMnpX 1KAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=pSyIWuON41xIpPsAfkdJjA0fkmYqrGMTTzJNJtvl1ho=; b=025uSAavuIJBFqMpDE+IGIA09j6NErl4qoPiDplVNYjSbQXQbispapR72mhwY31YPM TIRZmATFlY8Ren/JWcd70iw/LqcdbDopACSTc1Ia4kWAEpsvPN9PeGju1onHzxlSPqBY 1q7xRAl+N4EJh06kqgwwSBQoVZ0thlgsbLr7WO/wavLVj+S5/sOSDt8AQQVoLTV+hs8o MlZFKbvnLQXRAT+fMNdirHfvvDuOgvyQsw4k1MxMP5YC9cAREogYF0wvgDHJr2xVSaZS i6MaJlCRZDrxbrv/5bJYFj5D+znO94Xt05uYvosagZkPRumHbSw8s4C5uVEyjTHvjLhs u/nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Vfh0HBQP; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v25-20020a63b959000000b00533ffeaca3dsi1161385pgo.40.2023.06.02.09.10.11; Fri, 02 Jun 2023 09:10:25 -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=@linux-foundation.org header.s=google header.b=Vfh0HBQP; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236368AbjFBQHn (ORCPT + 99 others); Fri, 2 Jun 2023 12:07:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236543AbjFBQHi (ORCPT ); Fri, 2 Jun 2023 12:07:38 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BFAA1B7 for ; Fri, 2 Jun 2023 09:07:33 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-974638ed5c5so138267066b.1 for ; Fri, 02 Jun 2023 09:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1685722051; x=1688314051; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=pSyIWuON41xIpPsAfkdJjA0fkmYqrGMTTzJNJtvl1ho=; b=Vfh0HBQP9WOsPk/09//1NgyAMTU3HloZI1+GuAjqp7Fz2sCHJT3TJDGpnjaenHHbm0 UUZ8MzC5kEuRRtA9XkhfAaN3TrUXjYS6ZQtW2KsYAjAW4haZVnfVVP74giz+deURrLFv 3AoYjMY0jdGEkHl0URpi1IWo8dzeCJVXNWmhE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685722051; x=1688314051; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pSyIWuON41xIpPsAfkdJjA0fkmYqrGMTTzJNJtvl1ho=; b=Vp/Kjscg/ej+LVcKyBU5JpgHwHDzQVqKinHXeiCr0oaJbbMCZWN2+/BxYkrEGQ7E+M Oa6oGaIMrzlJQy4tar1lXZc/yoQTVCddXWFyTMcIqOCcGvNTsj1wwefFEGmN4EGqoCtW jZl3VFPFp9GJpJMcFvjgaN3FkNpaLrNrR3bz9yhDppn5IesZug6ldd2WRvDO0w31SDXA A8LK1aEY8ocuRHAOV9Tx06udQQHsx4QZjvaHaqFrJSKmu3FdadTExCAyZG4AV0m+KaE+ E3AQvS/6B1/eq2f5MdYoM0VbwmIHAD666KqkBh1jHRiB3mfSk+Iyf7aIwNRxi7LyOmgk QRvQ== X-Gm-Message-State: AC+VfDw+9q2S8m356QMX1tEKGnCGiXcw3HzQ0MUcA6fiFE/yysNym6B9 5C5XbmbiOHv9wG6Dyzpd+jWb/RPcJCwVdioiV+jVdVuv X-Received: by 2002:a17:907:168d:b0:976:a0b2:bf0a with SMTP id hc13-20020a170907168d00b00976a0b2bf0amr207100ejc.7.1685722051743; Fri, 02 Jun 2023 09:07:31 -0700 (PDT) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com. [209.85.218.45]) by smtp.gmail.com with ESMTPSA id dk23-20020a170906f0d700b009746394662asm782626ejb.53.2023.06.02.09.07.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Jun 2023 09:07:31 -0700 (PDT) Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-96fab30d1e1so482562166b.0 for ; Fri, 02 Jun 2023 09:07:31 -0700 (PDT) X-Received: by 2002:aa7:c0ce:0:b0:516:2dcf:d027 with SMTP id j14-20020aa7c0ce000000b005162dcfd027mr2836164edp.10.1685722030936; Fri, 02 Jun 2023 09:07:10 -0700 (PDT) MIME-Version: 1.0 References: <499e30cc-d015-8353-1364-50d17da58f47@redhat.com> In-Reply-To: From: Linus Torvalds Date: Fri, 2 Jun 2023 12:06:54 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] module: add support to avoid duplicates early on load To: David Hildenbrand Cc: Luis Chamberlain , Johan Hovold , Lucas De Marchi , Petr Pavlu , gregkh@linuxfoundation.org, rafael@kernel.org, song@kernel.org, lucas.de.marchi@gmail.com, christophe.leroy@csgroup.eu, peterz@infradead.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, yujie.liu@intel.com, tglx@linutronix.de, hch@lst.de, patches@lists.linux.dev, linux-modules@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, pmladek@suse.com, prarit@redhat.com, lennart@poettering.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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 Fri, Jun 2, 2023 at 11:20=E2=80=AFAM David Hildenbrand wrote: > > What concerns me a bit, is that on the patched kernel we seem to hit more= cases where > boot takes much longer (in both kernel configs). So it potentially serializes the loads to the same file more, but in the process uses much less memory (since the ones waiting will not have done any of the "load file contents and uncompress them"). So it's a bit of a trade-off. We could complicate things a bit, and let other callers return -EEXIST a bit earlier, but I'm not convinced it really matters. Honestly, taking too long because user space does something stupid and wrong is not a kernel bug. Not booting because we use too much memory - that's problematic. But booting slowly because udev does several thousand unnecessary module loads is entirely on udev. Linus