Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp19228pxb; Tue, 12 Apr 2022 15:35:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygxRFBdnBcx4/TwltAWz1PQTsS/APUH7dWIU7ZRsBILjTosny7gfMHvX4q5KlRVIHQoifS X-Received: by 2002:a17:90a:3c84:b0:1ca:56c8:5793 with SMTP id g4-20020a17090a3c8400b001ca56c85793mr7480859pjc.226.1649802925331; Tue, 12 Apr 2022 15:35:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649802925; cv=none; d=google.com; s=arc-20160816; b=RgqzaEXuiwq7HuSOe4uvLz/ik4uO6Gio5Zs2mfedNO446FczFqalacplVHOJDyaAfq eu+0CwE5xUoFP+oX1c70i6tzR+laCXYPYqqFu3m5ZX1B1HLeqfRTQe4Jq0pHW8zjHvV8 qfRMbRNiXVuxC7u+RG9LcrE4X/W6oNLY6kp2s1beRuSF/qbukCwAKYbs+r0iw4jFd4Pm ynZkARSfW6QgglmMMf598bEsu+9hGq2hkK3IeZdqlh9Ef5bs+H+SV84Y2QKqOq8EnVkM aqY0WVptsnv7Q8FfTAjSZXgx4FkmyBqOabOjhUJKrHTFzOHVncK4TivFbSvcC3fKnU0n 8cuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZqHdCpXqXpCIHScHw8UX1KT8XuTppLXoKspHP2JGGf8=; b=AjSqG+pjkj6yAx3eCJdd25fg8DB8SQuALk4+DQovwTTKRIAhW5CjILijXRYDij6Jf9 CXOqnN9cnkRka5quVwu6b3cZPK6FN/Ly2mZMlHSQrOn8UbXzztlgX+6H2EgR1KJnUHWJ MzEHhXCT8qXF+PBPEM2ZJSDhyjirmC3VyQJc1NdUk0QyCAAizsjjwOWthGUV1xNf/hmG u0voHbUiW/8LGERfeI61okRjMKb1gVukIXjUmzsmo47uH851H40zszrczmrG5CI/djmX mPEeP3pLPQWfZP/KX/ptctdSXSGSMpbSS1pVQpQyp3chWocg8DU9ukugtIEjnEO5C1wi TLkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dDadEpfr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v127-20020a632f85000000b0039ce0b69438si3954406pgv.370.2022.04.12.15.35.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:35:25 -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=@kernel.org header.s=k20201202 header.b=dDadEpfr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ECB25E6C6F; Tue, 12 Apr 2022 14:12:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348543AbiDLGO0 (ORCPT + 99 others); Tue, 12 Apr 2022 02:14:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbiDLGOZ (ORCPT ); Tue, 12 Apr 2022 02:14:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A82CC329A2; Mon, 11 Apr 2022 23:12:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 52D76B81B35; Tue, 12 Apr 2022 06:12:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7B52C385AD; Tue, 12 Apr 2022 06:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649743925; bh=ACoZdA3Dxg/CYFEPdBg68crTUKAvPWorsgEWhy88cz8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dDadEpfrKVvTZbzYxaA4LFGN5+4puqiHrsAFMLPFQNZ+nkOVC6y8mto9LSPQmFjbL ceYPVbvLgWHhlXT7MK0h5O2Z1TG8UhScxZbIpJAikMmNOAagwBNFWr0lvew7Y3z+8B KV+cZvE+SDZKsWcZ02Nnd+eJNpf2YvHxy71aYx5LpkY1kJVX2qjzFvNYAzcIyDnzMY AscGJzYeWwvn7yOpOX+2vdtQ/SyTx99AclfeVsdcdNL7dZd2kNogP6bHBWruuTcue4 u1WRhXrwpvYVRpCa+r6yNpcHINyi00/GgAnckGIV9j7NafTqEvfyJ8czN5y5YQUNfj LkxHqYu/YHuUw== Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-2ebf3746f87so95242227b3.6; Mon, 11 Apr 2022 23:12:05 -0700 (PDT) X-Gm-Message-State: AOAM530TLf9+tiEy8IqMaeWBk0c8YPy0WPHBSfA+qs5Hd7oobQuAp0it +bYLiE6DeMdnGByc+X7PWzX5za3i9yFzue2ATPQ= X-Received: by 2002:a81:5087:0:b0:2ef:33c1:fccd with SMTP id e129-20020a815087000000b002ef33c1fccdmr185706ywb.73.1649743924838; Mon, 11 Apr 2022 23:12:04 -0700 (PDT) MIME-Version: 1.0 References: <20220411233549.740157-1-song@kernel.org> <20220411233549.740157-3-song@kernel.org> In-Reply-To: From: Song Liu Date: Mon, 11 Apr 2022 23:11:53 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 bpf 2/3] module: introduce module_alloc_huge To: Christoph Hellwig Cc: bpf , Linux-MM , open list , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Andrew Morton , rick.p.edgecombe@intel.com, imbrenda@linux.ibm.com, Luis Chamberlain Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 9:20 PM Christoph Hellwig wrote: > > 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. I don't think we will see many archs support bpf_prog_pack, so the __weak version might be good enough for a long time. Adding an argument to module_alloc seems like more trouble to me. Thanks, Song