Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4898126rwd; Sun, 4 Jun 2023 15:52:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7RAVUOd43dhvBpf6SneBSBApS8txhCsVfI0gy/gKF3yEW5YlyZSX7iYuoGtHVKrl6TXg1C X-Received: by 2002:a17:902:ec81:b0:1b1:1168:bdd9 with SMTP id x1-20020a170902ec8100b001b11168bdd9mr6911607plg.23.1685919169474; Sun, 04 Jun 2023 15:52:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685919169; cv=none; d=google.com; s=arc-20160816; b=DpEexUHMpufaD9MRiBKGgsCoU3jLlY8g1kJUxo+stE/Rv90ia1HupZK4ZP4lT7tibv ++T1xxcCv1PuSZo5vvJe6+AMDTGhsxc5o+3DIvVjtdO9kwonadmt7h0sOjjD1f8e91nE 3eZCbN0FcFZdyheJ1ryRQMTvQN5TDjlV37XL1XELX5+v2KyBy/pOpkOjmg6WOkWbMXIo dBwZbYDAQV1AEe0G5nzs3rPgkHf7J/IIktkCbadxYl1DwaKark2vSNMLcf3gYbWAO4zw JgmMQ1fdJeJ9CWxLDscsHWiNecYZnNZk4v8fNuOpq+T37lSMDEf/ViDcbvXRbOzpaa4H RwSw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=Et8ABs17Zkfn2mGnERyKGLy92viAhCiNpbl07PFjtnE=; b=rOj8+KjkQqTNzxPtasXNwrPNkqP9c1z8wnotvghF3QagEQApn+90aZFz8sOql+bqzD tJjeHBXJPDm5p9VVLPX1HR8UjYhQyU2k0UAX6V25jdYKjMJsmQDnv9dW3Tw7GcEA9TUO rV5dQWPLfPLJaOtv9fnfzHdxCyVuhPvxV7LIB1BWLCn8RZ+K0uCcIgS9RR0CohnDIjfW UNaKoMEB+RMqTH9vArE4G7H7KaPAUgtB4ZUuhA9o/eTRLGt+B+wYHU7cnT6n6Bhhb9MO owmuEZLYrxXJGF6NAWTCAV+2mI7tJyGpoVVHwzf0pO0DjnaHhr49Qp5j4vDgbXOhkemm 7kMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lJmPSA5r; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b18-20020a637152000000b0053f527e381csi4584895pgn.609.2023.06.04.15.52.35; Sun, 04 Jun 2023 15:52:49 -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=@linux.dev header.s=key1 header.b=lJmPSA5r; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231280AbjFDVkP (ORCPT + 99 others); Sun, 4 Jun 2023 17:40:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjFDVkO (ORCPT ); Sun, 4 Jun 2023 17:40:14 -0400 Received: from out-7.mta0.migadu.com (out-7.mta0.migadu.com [IPv6:2001:41d0:1004:224b::7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB582BD for ; Sun, 4 Jun 2023 14:40:12 -0700 (PDT) Date: Sun, 4 Jun 2023 17:40:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1685914810; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Et8ABs17Zkfn2mGnERyKGLy92viAhCiNpbl07PFjtnE=; b=lJmPSA5rKs24/0LEEceFQVOeSXhUoE0+fis7PHaMYfcE2LZdC95JDmW0A61ctvzkYppcPe W9mzvDnQ++G15OC4MG7fFAFeLDHkLYUk7wWialJK1ki4sRZ8GoqzW1U3lBIfZIfX0tb2f2 f+19wUtFVDPjGlYI9R+Uk+lqqtnlv4Q= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Song Liu 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 Subject: Re: [PATCH 00/13] mm: jit/text allocator Message-ID: References: <20230601101257.530867-1-rppt@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, 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 Sun, Jun 04, 2023 at 02:22:30PM -0700, Song Liu wrote: > On Sun, Jun 4, 2023 at 11:02 AM 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 here. > 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 jitalloc, > 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? Yeah, as long as that's the plan. Maybe one of you could tell us what issues were preventing prog_pack from being used in the first place, it might be relevant - this is the time to get the new allocator API right.