Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp175728rwd; Tue, 30 May 2023 18:17:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ487yaYBK+ibcwwi+jCnY0rs42koxTbvKStFH3CkQPM7a0S8p39GSY+lnfqdu52al0fo8kW X-Received: by 2002:a05:6358:9217:b0:120:fe78:80cf with SMTP id d23-20020a056358921700b00120fe7880cfmr98745rwb.7.1685495846878; Tue, 30 May 2023 18:17:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685495846; cv=none; d=google.com; s=arc-20160816; b=MJ6XbMc8CZ1adHYE0qdlvMV8YGMYeUkFzyaanHZIGC1w7cBuM+Yc0euOj7cKg9HTtI HoVXIRu98Y9cDao32LhjcZ637aD/SiGpRULVuzF+aOP7IMqrQIdYtpoc8RyxDDFcDl0x L5nhRBJeAP/r7D4mq+YEHeK0f26O/+IuPYwG+k7GBmkXnlg4w5HYJbFYMOVY3qMJ08lT RdLT1U1/mtS6Sxcx7TThnZYORhgdfVUK67VL3fJLh4rBiViJ7g2+Al9hkoUF0Zy66veq 6d5pF23I+99rlF62Xexo3ikJF54CMk4+9GL9Pn4lLuZ/46YsRaH7YgiNbamWsP9jusOr Yx2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=VEudGuTbI8GghvYngS74lz28bkiQJqXeUNzo7Tr5OoA=; b=CZZW6BNUNuuhSrzdYSCUkG9YO7MwPPaUQ4YEbtgJQnNFq0XZ6pz23zP8tAlP1EqUYW wlAJ6iAePWQkHJ/kNqpgiU205r7UOahDZsSspaOcjoljfLRLIQ0b2HzeMRULUcIgpV0/ 2IherR3fIjeT6Jp3+ulo0xELtM+AopkriW1whN3wSzO2o+1BkWkq3Iz1T31SXQbEgJNH Mkkvb1NAgtqMS6khTNFBI5TAItzfpWE3osKxbQK2F6O62QhN8mbsAb/BlSs2BuStgg4C cQCFbf54VCXkaY/rPzOVLy6btmUsH/EQAPniSDd5b7IA+cNkXXRbflwPc0saELFRCKoZ iyxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=BJgiRlz0; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e6-20020a637446000000b0053fce94d036si34140pgn.434.2023.05.30.18.17.15; Tue, 30 May 2023 18:17:26 -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=@infradead.org header.s=bombadil.20210309 header.b=BJgiRlz0; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233816AbjEaAbq (ORCPT + 99 others); Tue, 30 May 2023 20:31:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233728AbjEaAbo (ORCPT ); Tue, 30 May 2023 20:31:44 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E70BF3; Tue, 30 May 2023 17:31:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VEudGuTbI8GghvYngS74lz28bkiQJqXeUNzo7Tr5OoA=; b=BJgiRlz0je11Z1r1LNqL92W3fQ a5OOoj2ob+vV+XocxtjGdUPW5vnwZ9G9KKW/erh/BgetQknKnUYXdKE9iKx/6VxdrBnkm+FA7pWcg 96O8PiVEQ3GgJ+CpXuxSW4KGZ+Dk9tBzllKTEwT7SFKXxVnzfUsoDoH+NjX1NxDkqs8fmzxmpz8tn Bi0sQDjGjh0jmgQxgE7/gGomNqwNm6Gk9Lg0ycVEMSyWn38xepB30Ihk/23dFfZNn5AqJRiSutzbX y1Pey7omE9jMXy+HjVL+Zirk0r5Pq08G3sR/z8nk83Vwtucla6f+jIuHA+EzW/G+Umep7qjBO5FuV 8LOjjCpg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q49kG-00Fbuq-11; Wed, 31 May 2023 00:31:20 +0000 Date: Tue, 30 May 2023 17:31:20 -0700 From: Luis Chamberlain To: Linus Torvalds Cc: 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, david@redhat.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 Subject: Re: [PATCH 2/2] module: add support to avoid duplicates early on load Message-ID: References: <6gwjomw6sxxmlglxfoilelswv4hgygqelomevb4k4wrlrk3gtm@wrakbmwztgeu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Tue, May 30, 2023 at 09:22:14AM -0700, Luis Chamberlain wrote: > The only thing I can think of is allowing threads other than the > first one to complete before the one that actually loaded the > module. I thought about this race for module auto-loading, see > the comment in kmod_dup_request_announce(), so that just > further delays the completion to other thread with a stupid > queue_work(). That seems more important for module auto-loading > duplicates than for boot finit_module() duplicates. But not sure > if odering matters in the end due to a preemtible kernel and maybe > that concern is hysteria. I think I'm OK to accept this ordering concern as hysteria for now. Luis