Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp351377rdb; Thu, 5 Oct 2023 07:48:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHY1T8R8AWcYtb1tIaGAGWvWPbZCsF6Ov5aroE1m13PPEwNZWBWsRDeRSSXLOxrZJpCjkcB X-Received: by 2002:a05:6a20:1584:b0:15e:6909:533c with SMTP id h4-20020a056a20158400b0015e6909533cmr2114251pzj.30.1696517333293; Thu, 05 Oct 2023 07:48:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696517333; cv=none; d=google.com; s=arc-20160816; b=XJuIqMwPGuiMYXphSvTr5AbPa9o167Sif/58O/c3cqHlDUJramNJPqQj1bmNfput2z 6UU8+M/NXgBVmR24TZfmOh9CkLI+EkWDeVpLtwaVqX0gPjG76DIIWuUW8BvVSZ7joMsy STS0W1ju/uyPRciP4FD77h21DvkyACfQJKmf4aoyeaGSos+bNqIkRQPSRtkGkqJkyRoV JUr32fIgqnVQT1DYrI42J+ZN+bxt5wj7pPlnCK3xkzxS3iVTJI3xyLtXPuwyLb/Bv2lE garlOJSxyNpyaFafOPACZgA4wa93nuTvS26EXve4K/hUPfFBN1GNF4kiuyNnhNF76bsL Hx+Q== 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=H0lfQkgdDfaiVClJZp9LkcXyladFrG2avn9zOGq3R2k=; fh=z75Quz749aXkDGKyaGa5Wu4WfeH0RiIlZveyJlGkKkI=; b=XEfGAf9HA20zATzcvbsadGgjA8BUc4SwkPzYSsSv0Tnt8joTtjyfbtuzt4vzETbPYh zVnrF7PmjeCPDBS9HwFtopsI6R6vVl8+vuD6wiPxdQIZbQJI90pKRKgZQs0+cA8p6S+8 90/3Va7SiyrsMsdHa8OmNO2Dp5mCadieVL58qVThOSPtIWKB4mNFXlP/LLiHUGoEP7Zi FfNLRd3tuR0gWhxHqGp/IL/MtECeWOsunEKit4h62u7RYTuEgGQCmomo7vaGL+O1XVGh hhe4vcP09rVLgMuVxDhs169g9nZOXA8CplL52iBPxPhyIv7bCJgZEEwo3enLszZQRHFs 6xcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BbpCpY2Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j2-20020a655582000000b00584ca25959csi1579797pgs.540.2023.10.05.07.48.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 07:48:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BbpCpY2Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A043787182BE; Thu, 5 Oct 2023 07:48:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236600AbjJEOsT (ORCPT + 99 others); Thu, 5 Oct 2023 10:48:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240091AbjJEOox (ORCPT ); Thu, 5 Oct 2023 10:44:53 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB9CE6E91; Thu, 5 Oct 2023 07:22:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2146C43391; Thu, 5 Oct 2023 05:27:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696483656; bh=hXymtCmkQgS1mz4WN4LARQgIXsgfg8oCoZqTgfgSt/M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BbpCpY2Q0zEwY41GucwBsBZTdMge6AGCY7bXU/clMyyCXKJTV0EDLKXZQhP6Gmvyb i7tzzZViGYUX1/BLXHrp9MgUNcssHkKZ+E07sMIo2XQd9Xhgj8wBFQLGyOjD2kEs17 PxOhx0u+oKdQ8lrzOhlumXDQrrVIpZHitXF+j0a79GixClpVIz2eZl61qc1UDcG73I FDMmfOiG2H8IzEuKKw/M7PogaSgM8X2WZc5kjl+Dp1+hjjwCugO78vBqHSBJRgrtI8 iiiR0aNTydrnms7VNPMV5M6X+tEx0k+2XJsejW9H5dww52kR9ESsW7JTvRKWQR81qv y9fkPnEwbon1w== Date: Thu, 5 Oct 2023 08:26:22 +0300 From: Mike Rapoport To: "Edgecombe, Rick P" Cc: "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "deller@gmx.de" , "mcgrof@kernel.org" , "bjorn@kernel.org" , "davem@davemloft.net" , "nadav.amit@gmail.com" , "linux@armlinux.org.uk" , "netdev@vger.kernel.org" , "linux-mips@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "hca@linux.ibm.com" , "catalin.marinas@arm.com" , "kent.overstreet@linux.dev" , "puranjay12@gmail.com" , "palmer@dabbelt.com" , "linux-s390@vger.kernel.org" , "chenhuacai@kernel.org" , "tsbogend@alpha.franken.de" , "linux-trace-kernel@vger.kernel.org" , "mpe@ellerman.id.au" , "linux-parisc@vger.kernel.org" , "x86@kernel.org" , "mark.rutland@arm.com" , "christophe.leroy@csgroup.eu" , "linuxppc-dev@lists.ozlabs.org" , "rostedt@goodmis.org" , "will@kernel.org" , "dinguyen@kernel.org" , "naveen.n.rao@linux.ibm.com" , "sparclinux@vger.kernel.org" , "linux-modules@vger.kernel.org" , "bpf@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "song@kernel.org" , "linux-mm@kvack.org" , "loongarch@lists.linux.dev" , "akpm@linux-foundation.org" Subject: Re: [PATCH v3 03/13] mm/execmem, arch: convert simple overrides of module_alloc to execmem Message-ID: <20231005052622.GD3303@kernel.org> References: <20230918072955.2507221-1-rppt@kernel.org> <20230918072955.2507221-4-rppt@kernel.org> <607927885bb8ca12d4cd5787f01207c256cc8798.camel@intel.com> <00277a3acb36d2309156264c7e8484071bc91614.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00277a3acb36d2309156264c7e8484071bc91614.camel@intel.com> 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 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 05 Oct 2023 07:48:51 -0700 (PDT) On Wed, Oct 04, 2023 at 03:39:26PM +0000, Edgecombe, Rick P wrote: > On Tue, 2023-10-03 at 17:29 -0700, Rick Edgecombe wrote: > > It seems a bit weird to copy all of this. Is it trying to be faster > > or > > something? > > > > Couldn't it just check r->start in execmem_text/data_alloc() path and > > switch to EXECMEM_DEFAULT if needed then? The execmem_range_is_data() > > part that comes later could be added to the logic there too. So this > > seems like unnecessary complexity to me or I don't see the reason. > > I guess this is a bad idea because if you have the full size array > sitting around anyway you might as well use it and reduce the > exec_mem_alloc() logic. That's was the idea, indeed. :) > Just looking at it from the x86 side (and > similar) though, where there is actually only one execmem_range and it > building this whole array with identical data and it seems weird. Right, most architectures have only one range, but to support all variants that we have, execmem has to maintain the whole array. -- Sincerely yours, Mike.