Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4855571rwd; Sun, 4 Jun 2023 14:42:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7fK4CzdfACarMPgaQPLQkgn+Hf0TCl/+A0+lJZLC433vGBeHyLZlJELLV6cUs0Yctxre1f X-Received: by 2002:a25:ad09:0:b0:ba6:984a:2814 with SMTP id y9-20020a25ad09000000b00ba6984a2814mr12232139ybi.23.1685914926630; Sun, 04 Jun 2023 14:42:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685914926; cv=none; d=google.com; s=arc-20160816; b=O+2dn9yhywmuV4ptg/6V17Z+8sm8t5JxqQkjSFOEUbtK8W8Oidd+4m8TbK1qAUbIr4 IwtNP5/XyfxNxsK+hbaWa6BIYcd31j8euaUPdBb69OUTVLU6ty7ME7R70Iniv/ORmgyE kFqJQa7j9mD3o7wrma79eP8DJ3tkUn3wwPXXWrtx09TqR0d6OfIXi19w7IMQuwK5FZXN KBmYeXRrsJhmmJ6U8h6zvFmpNzetVLt9FC6EhgU1S+6PfcFtMkLlus9HAKOxwT9NmW8C oTL24zojO7b7Xo8N3XQjaa2R8qBXMF8UP1le166GUnvu/2kL/AYFPN7rLt+ezx9A8AzT ZbzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=M3qa4JrCJfL3BlNTay6Yo1EjRS0Ncm+BgXInegps46U=; b=PsRsLofcLsbYAJvsLA+ZvIphiMc3z6igIDVPNQLDpn7RcSwUddqH92xFYI01hrR6op KAkB1eFzrDLgA9kvxjYKWe/4FTE0HpWV8xAIrcFb9b8mimQiSGgLKK5Ld6uvuzloEV9f 7DUjw7/XrHwIEKZI77EMssYOwej/EtdSBUXjzmDREkmoAISUQnGMZn2rCWb8boB1wttE M4e9U0T20ynTYRr+X7QKcZPR3+jBYOhjMiRuq/qlQQejJAdH/17xvm1ch1WkId6wbqRD P6IRND/LFyO9fGBpGWDw9fJL722EH/CWy4L5RFdI5EOEA2eIiG0hMLlMxRZQVSGrkVSZ vKyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="b7/fXotn"; 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 s5-20020a170902b18500b001a92875cda9si4239419plr.288.2023.06.04.14.41.50; Sun, 04 Jun 2023 14:42:06 -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=@kernel.org header.s=k20201202 header.b="b7/fXotn"; 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 S231355AbjFDVWs (ORCPT + 99 others); Sun, 4 Jun 2023 17:22:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjFDVWq (ORCPT ); Sun, 4 Jun 2023 17:22:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C207DB8; Sun, 4 Jun 2023 14:22:45 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 554BB60F7A; Sun, 4 Jun 2023 21:22:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B18A3C43321; Sun, 4 Jun 2023 21:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685913764; bh=M3qa4JrCJfL3BlNTay6Yo1EjRS0Ncm+BgXInegps46U=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=b7/fXotn0pQEscndihWizAxU7LQa5dSl44a9/klsWVyS0lxz/8hzxSa2IZZsjsxfX r+NUkhYWfR+U4pM6AYQOSE7NKbAlOja0TNvz5m0DUEI1zWFDSIkNTecITt/pEkmEGw J/i1EcDni6ZWXfMClgL03G31hjpaAYBpUerxaCwWdNhFcQlLqMtUbQhIMCbcYDNWvU UhGMgdB0T5xWi5hDLtX6T9Luh2uONUrqL+9je7Lg6uu0df3kWNPuh+zhJ8FFH8haNG M5E3S5UelWImxtKzuetFx71eO1My6o4ugA9ZPA9fKjM0HrHilfHJ2bhtk0fdh1FBN/ wGD7X3O1e8t2w== Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-4f3bb61f860so5149594e87.3; Sun, 04 Jun 2023 14:22:44 -0700 (PDT) X-Gm-Message-State: AC+VfDxPRQv9LPH+gR49jUNVeDka5bPlr4WCUILKiHBOPdZDcuLUpbkO Y+kgMj/azhGCcAPpQsuQ+MbuNYJhaG5+NhiALjA= X-Received: by 2002:ac2:5d6c:0:b0:4f2:4df1:f071 with SMTP id h12-20020ac25d6c000000b004f24df1f071mr4227167lft.51.1685913762272; Sun, 04 Jun 2023 14:22:42 -0700 (PDT) MIME-Version: 1.0 References: <20230601101257.530867-1-rppt@kernel.org> In-Reply-To: From: Song Liu Date: Sun, 4 Jun 2023 14:22:30 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/13] mm: jit/text allocator To: Kent Overstreet Cc: Mark Rutland , Mike Rapoport , linux-kernel@vger.kernel.org, Andrew Morton , Catalin Marinas , Christophe Leroy , "David S. Miller" , Dinh Nguyen , Heiko Carstens , Helge Deller , Huacai Chen , Luis Chamberlain , Michael Ellerman , "Naveen N. Rao" , Palmer Dabbelt , Russell King , Steven Rostedt , Thomas Bogendoerfer , Thomas Gleixner , Will Deacon , bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, linux-parisc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, loongarch@lists.linux.dev, netdev@vger.kernel.org, sparclinux@vger.kernel.org, x86@kernel.org, Puranjay Mohan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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,T_SCC_BODY_TEXT_LINE 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 Sun, Jun 4, 2023 at 11:02=E2=80=AFAM Kent Overstreet wrote: > > On Fri, Jun 02, 2023 at 11:20:58AM -0700, Song Liu wrote: > > IIUC, arm64 uses VMALLOC address space for BPF programs. The reason > > is each BPF program uses at least 64kB (one page) out of the 128MB > > address space. Puranjay Mohan (CC'ed) is working on enabling > > bpf_prog_pack for arm64. Once this work is done, multiple BPF programs > > will be able to share a page. Will this improvement remove the need to > > specify a different address range for BPF programs? > > Can we please stop working on BPF specific sub page allocation and focus > on doing this in mm/? This never should have been in BPF in the first > place. That work is mostly independent of the allocator work we are discussing her= e. The goal Puranjay's work is to enable the arm64 BPF JIT engine to use a ROX allocator. The allocator could be the bpf_prog_pack allocator, or jital= loc, or module_alloc_type. Puranjay is using bpf_prog_alloc for now. But once jitalloc or module_alloc_type (either one) is merged, we will migrate BPF JIT engines (x86_64 and arm64) to the new allocator and then tear down bpf_prog_pack. Does this make sense? Thanks, Song