Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp789123pxb; Tue, 12 Apr 2022 13:30:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDIg1jrx1olDdrshQFB4v67pinfJyB7tBvKJkRgiYZv3Istx1cPRmOwuStHiJdfwbwAuF8 X-Received: by 2002:a17:90b:224b:b0:1c6:f027:90b1 with SMTP id hk11-20020a17090b224b00b001c6f02790b1mr6863215pjb.173.1649795412200; Tue, 12 Apr 2022 13:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649795412; cv=none; d=google.com; s=arc-20160816; b=BgENIbvcwKMW2MaBoJQwYvtLc+l5wWmbhpeBvPZBeikZL0hbrDxu/MdyJRSHa30qYi p5wCi+lm1+2AvDqgq71/GrILI+aaW6mRn+O1W1NMIZDvRAyZskRAXN29hq6RWYt8MloG 7b/JpB+c2HXS6waFnwbb+yg12sMReBu4bTsNQMMIP+vT4E4ULxEO5+acBkdL/JeZNIfx AyweR8EuRy/KP9+spev1yX/7t1c+ttSOmPzENTLf4sR4JV/MHjHDLvtwBF/ZjNNMvs+0 WEVwc40v9xwGNa//YO0qwk05ksqFnhefn1397Pu1Z52mYbo1h9ZHmEPtKLqmfLaup57e ss2Q== 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=9PiloLG5jlTcO46ESKKigvFqoJS8Cciwgeir2CUSEZY=; b=dVnjyt+PJ3GY5c8UXqoP5IdD1AX+NFsZPOU/sFpZE6pqFyj1W2oVhdu1JLt4D8Hg7x C8LyYX1bcU+LfVxum9Odw6nsqq12PHTKHBy1T+HR12zMwW19+YTOM5fZnlajXkwfxA/h UIxEwPLp3kVoxoYlL0tGRYKyXDbXTvY2U+ZcLiQHI2gSvLjG37d8TY1gXZ/Qhvgt+P68 9y/HMDCTB6nwAWcB/V6ak6cEXGIm07Uy46VZqexP0j4U7N9GhREcCNXJwIOKv5AHEv7h ISeDunzu+HktQavMAdtDHrjjfD2jox+hJeidCV98faqyMpp9WFH7Yv73/XOTkJ2TFOTX 8+bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=lhiGFotI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b3-20020a170903228300b00153b2d16641si2680226plh.585.2022.04.12.13.30.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 13:30:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=lhiGFotI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6BDF77EB39; Tue, 12 Apr 2022 13:08:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353598AbiDLPlD (ORCPT + 99 others); Tue, 12 Apr 2022 11:41:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242001AbiDLPlB (ORCPT ); Tue, 12 Apr 2022 11:41:01 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 325845A15D; Tue, 12 Apr 2022 08:38:41 -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=9PiloLG5jlTcO46ESKKigvFqoJS8Cciwgeir2CUSEZY=; b=lhiGFotIglWz3eWuatKV0A2rNX oGEepGqGbdtB7jamRHw+78FYJtRkD6cCYVIDbs7tCREBdQy/JlgHMR5Sfii2KassouNB4ixOBCqL3 mE+B5BV+q1OG0scp/OM8r/mrRkIlAxr+nuBKpKjXyMeLu2WOveGIQhRnN0/32qGL5jC9lPmrl+lYX awNwWmUztkuTfTY7JkQZM3vKr1QEQQeyQkUJfifuKg0CCSRr98wJpEj5lsbZyQABzR1TCi6Pqoixt L3oLGNT/or9iFwOmd3Gs2dSd6OVYXRxolNqio+pQ78XNLs4f2YEftUqq6wCUhhadTMXwkxdRqDi9w AZiXDTsQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1neIbI-00EyA6-0b; Tue, 12 Apr 2022 15:38:40 +0000 Date: Tue, 12 Apr 2022 08:38:39 -0700 From: Luis Chamberlain To: Song Liu Cc: bpf@vger.kernel.org, netdev@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kernel-team@fb.com, akpm@linux-foundation.org, rick.p.edgecombe@intel.com, hch@infradead.org, imbrenda@linux.ibm.com Subject: Re: [PATCH v2 bpf 0/3] vmalloc: bpf: introduce VM_ALLOW_HUGE_VMAP Message-ID: References: <20220411231808.667073-1-song@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220411231808.667073-1-song@kernel.org> Sender: Luis Chamberlain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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:18:05PM -0700, Song Liu wrote: > Changes v1 => v2: > 1. Add vmalloc_huge(). (Christoph Hellwig) > 2. Add module_alloc_huge(). (Christoph Hellwig) > 3. Add Fixes tag and Link tag. (Thorsten Leemhuis) > > Enabling HAVE_ARCH_HUGE_VMALLOC on x86_64 and use it for bpf_prog_pack has > caused some issues [1], as many users of vmalloc are not yet ready to > handle huge pages. To enable a more smooth transition to use huge page > backed vmalloc memory, this set replaces VM_NO_HUGE_VMAP flag with an new > opt-in flag, VM_ALLOW_HUGE_VMAP. More discussions about this topic can be > found at [2]. > > Patch 1 removes VM_NO_HUGE_VMAP and adds VM_ALLOW_HUGE_VMAP. > Patch 2 uses VM_ALLOW_HUGE_VMAP in bpf_prog_pack. > > [1] https://lore.kernel.org/lkml/20220204185742.271030-1-song@kernel.org/ > [2] https://lore.kernel.org/linux-mm/20220330225642.1163897-1-song@kernel.org/ > > Song Liu (3): > vmalloc: replace VM_NO_HUGE_VMAP with VM_ALLOW_HUGE_VMAP > module: introduce module_alloc_huge > bpf: use vmalloc with VM_ALLOW_HUGE_VMAP for bpf_prog_pack > > arch/Kconfig | 6 ++---- > arch/powerpc/kernel/module.c | 2 +- > arch/s390/kvm/pv.c | 2 +- > arch/x86/kernel/module.c | 21 +++++++++++++++++++ > include/linux/moduleloader.h | 5 +++++ > include/linux/vmalloc.h | 4 ++-- > kernel/bpf/core.c | 9 +++++---- > kernel/module.c | 8 ++++++++ Please use modules-next [0] as that has queued up changes which change kernel/module.c quite a bit. [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/log/?h=modules-next Luis