Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp817546pxb; Tue, 12 Apr 2022 14:16:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXUd/EcH6iS6m3stee+OnEk/tUao2Erde1bR5bOoKPpvdlUHucZt9B5Pn1pJOGq9ItTaFW X-Received: by 2002:a05:6a00:1488:b0:505:9dfa:1a09 with SMTP id v8-20020a056a00148800b005059dfa1a09mr18602420pfu.43.1649798199544; Tue, 12 Apr 2022 14:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649798199; cv=none; d=google.com; s=arc-20160816; b=JE2D0wiZcbhUc5u82Rr70HB921GkJYSCAW1JYiCkT6croVlQhVz+a5xr63rHU2sTAk 7ZDufN/+AjtMEh+Rg+pubp3C9JiEXPYfATLDJKPMSSSEkFhzufkK5Ggt/ze+oa69TP6y dhR3+dRPHw0+bd7FY4bmQvRqsm1pTWL0A9rPENtVfxVEyF5/l80fenmAqWkrHVGfaNwR /Nv866rfi3fXtOv1jgSY/7UBkQ845yZ72YJhlsRG9+SW+++YB0cINgkNSEDpuoKMC/XJ FyqF4JPXgnaSWN7ghxK0BNdaIEQK+qDKKFXUJNTze+Pf4UFAIsM5w78cUPZ2BLrbVECL 0TWw== 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=KkMg8Uf8LW6cbwskVM3FacACcaEeYcQo6r7APr6POlA=; b=HuRQCW3iIsDcvBHYp+fjxkU9mpMpMg5j4GReGrWhVkCbtpVokF2aViwsydwzHt6Lhq XLsWQ9TsVY7kM8BV/Q2b9+T11aaRU9xgpmX4NrO0bA9XBYQ/mIRt0LcnvrgjFl/oRSvB n1UDCgB7OPSZDjTdgV7o5Jlmoy2ReFqou2LPXgaacjdO7mfpP3UU8uo9O1QqM38UEryP 5nNMqdq0W0ZY3gc4z3bU2j657St4R6FCb8hXgbdLYtQqAO/Ry7PDdr2AuMUt3Uz3fRo5 jAzpj+0a12gqqCAouAP7eD8Ad4TCZqZfNjn8iNhre0U3z+U2XB/3wC05hlQ3OEk93lW+ jzNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=3cY8tpKN; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n16-20020a170902f61000b00156c21347b7si12482192plg.153.2022.04.12.14.16.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 14:16:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=3cY8tpKN; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E7689A991; Tue, 12 Apr 2022 13:30:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345657AbiDLEWX (ORCPT + 99 others); Tue, 12 Apr 2022 00:22:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245601AbiDLEWV (ORCPT ); Tue, 12 Apr 2022 00:22:21 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 851E126AF9; Mon, 11 Apr 2022 21:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KkMg8Uf8LW6cbwskVM3FacACcaEeYcQo6r7APr6POlA=; b=3cY8tpKNT1BaSTaCkKVAoxndqi AwpMQHnIuH73A0J9X6Ayv2Q4DR2b1Oa0JfpBKLMye+UyOL6u28Usi5+gXgQsPzggXpDFvKm7kquqH A0bCtDj0OdYT2nXsIvvYggaH1Y+DbBTUMlZfpKvSB0VQshU0QITJvj0fxFL7p3J/Yqp9KOlGgM9ya 7vPplIE+BAjgkwHENswnO7L8bvdMT2nyAEUiC7OCvYR7o3EYpJIdL3xoNBfVaYm6JSDDwOAJXqpCU Om9an+IhivYEVSG+o/55uA1waNZ3TDPplzBB5y4NtKhNl9fR5SuCubQY6mv70PiCB2HsJDa7/CcME /QY/bDLg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ne80b-00BWBI-2P; Tue, 12 Apr 2022 04:20:05 +0000 Date: Mon, 11 Apr 2022 21:20:05 -0700 From: Christoph Hellwig To: Song Liu Cc: bpf@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, akpm@linux-foundation.org, rick.p.edgecombe@intel.com, hch@infradead.org, imbrenda@linux.ibm.com, mcgrof@kernel.org Subject: Re: [PATCH v2 bpf 2/3] module: introduce module_alloc_huge Message-ID: References: <20220411233549.740157-1-song@kernel.org> <20220411233549.740157-3-song@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220411233549.740157-3-song@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 Mon, Apr 11, 2022 at 04:35:47PM -0700, Song Liu wrote: > Introduce module_alloc_huge, which allocates huge page backed memory in > module memory space. The primary user of this memory is bpf_prog_pack > (multiple BPF programs sharing a huge page). I kow I lead you downthis road first, but I wonder if we just want to pass a flag to module_alloc instead. This avoids duplicating all the arch overrides.