Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp105802rwb; Fri, 4 Aug 2023 09:48:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHx6yXNET5T2ASg9Gt75JWLA4aC9T5zgBoF8lWOuPvh09peawUWxocXGCyRIazmjIhYwzru X-Received: by 2002:a17:907:2ce8:b0:994:580c:5049 with SMTP id hz8-20020a1709072ce800b00994580c5049mr1659690ejc.5.1691167730931; Fri, 04 Aug 2023 09:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691167730; cv=none; d=google.com; s=arc-20160816; b=yxzwvWzmVo+cYFJq/xkhfQS7R/Sl3TKsi8B7gqg4yTOesK4VYs48l6587ixTSDgn/e FbyH3WL+OWDuR4QqlFFW1NLn3xpupYsBTCV6MxzfZk4unZiN9WSOdToA0jNiGxLkGAXM kx6tpptSxkbd8U2pgn4ljST1MP8ZRGIA9aZ8EoDvioqIT7vo0WIlCnEyjuoFxbOHwdcR bJsNM89PdCVqDmgzOYYSVg/AtaT1idNArL9qcglUAqvbUzSBOqV/uFerUvqw8ssSrjZM T0gu2a3xsONEQY/ci4qZY56HmCw9vDVggcc1e+XwQs09JluqC1pYPpHGUVdEfDWCAeE2 wPeg== 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=/x2HU6+MV/IqQjm0ooiMjVQBEg/IdxB1FJC8ElSTtiQ=; fh=tFtVP2gGqdcKSztmpf7B3N/HCkdchNWex6WAEXupGGA=; b=hsDYeqKxk0dvSZ757G8Ln79QjGjuN6X0ViOg6mqqEZa9Pul/eTcGYl9YEwTzKKIDk2 VqDh0QnHyA//f9CNnd5dGjNUUcPSileAoUbCzR23LqjLjEinsSx8wO3iyXlf8qd4/2+q S5aViNX1j/XWyu4/32viyS8r6sdF3sflS7/SxxtESqy/+PYcIOQ0CETmqLNH4FNsAv8x sXaeD+5YRlvmSUlsblyIUeUiz8m1KpxB/Rm5UAWwaueYuw5V947JIGR4vyesRNU2OfRM Cje2zOKe1CSvAqwFe18KHbLK/IgM1M0/k+bU4HQw9DZ4oo8/B3LAaN1pye4MMWmpeH/9 49ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=TEULtEHQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x13-20020a170906298d00b00974fb8ff39asi1829279eje.580.2023.08.04.09.48.25; Fri, 04 Aug 2023 09:48:50 -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=@gmail.com header.s=20221208 header.b=TEULtEHQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230351AbjHDPLt (ORCPT + 99 others); Fri, 4 Aug 2023 11:11:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231508AbjHDPLl (ORCPT ); Fri, 4 Aug 2023 11:11:41 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 373D349E6; Fri, 4 Aug 2023 08:11:39 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2b9cdba1228so36639401fa.2; Fri, 04 Aug 2023 08:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691161897; x=1691766697; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/x2HU6+MV/IqQjm0ooiMjVQBEg/IdxB1FJC8ElSTtiQ=; b=TEULtEHQBd3bVfKkrwwfcAPuYfhGwt/bgqLMENdx4P9MRoTicS2EO8P2u5uINRulH2 I66yg992gWDo/eOWaA+DcANuDhavotStbDoLFsz7dueS0OuOdpY9mbgYpuWAEmhd5m28 vctyq02R31BzEf/Tt2hUBNLHogdX01iO3cDkDDjPLQFUtuPgYCSQaOFyOWxj8c5PGrG3 U8VRr+5kmZ3cXMVHTsTdfYg1TNmgrbDb/S3p2U7bHbXAElJIc4THO8/I7XwKsMMn4eXz XOY5kYHy6dxrTI4BtmDt5hkvskSXHkaBu0NTtQ5CeBiUxzhYlayTtio/cxBYdZrLPV11 y2Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691161897; x=1691766697; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/x2HU6+MV/IqQjm0ooiMjVQBEg/IdxB1FJC8ElSTtiQ=; b=g6e6ulHAnKwW7fbcSaaWsIU27VQ44uqMVEwwQxs3oD2fRmD3oQxavQhhNx+90P1z6G wLf0qs9vasZdkaIuHeCOAMpimp1urT2bmHhtFT1zkeiYT5SMBxQBp/mGg9K0753pNGR4 2cwK74J/n3C0ckbA96QwBu85isnb9plvqgprHd+kkNhArtndhskOSjrQ4lQZ7JEIJZKt /hPU4AB+VSw035fOiBTNMTu6ABu6hLDBsE4WVettn9kYMx3nBYj3NZM9zx+CpeFq91lt wT/zvVmipWNkjLSAQadKyvW7QGBHaOW+G4jMKnnY9b0mBdErSiljd5H/HxCNyya/GwAz k8dQ== X-Gm-Message-State: AOJu0YxaTaPOc1SRajaW2+oIvdEXguXKs5or2E19hy22YOo3XCfcqQBx kU4pVcqTRnpsx1dU8vzlZMnhpLAmCgGsAWraYPY= X-Received: by 2002:a2e:9d86:0:b0:2b7:339c:f791 with SMTP id c6-20020a2e9d86000000b002b7339cf791mr1751152ljj.25.1691161896946; Fri, 04 Aug 2023 08:11:36 -0700 (PDT) MIME-Version: 1.0 References: <20230626085811.3192402-1-puranjay12@gmail.com> <7e05efe1-0af0-1896-6f6f-dcb02ed8ca27@iogearbox.net> In-Reply-To: From: Puranjay Mohan Date: Fri, 4 Aug 2023 17:11:25 +0200 Message-ID: Subject: Re: [PATCH bpf-next v4 0/3] bpf, arm64: use BPF prog pack allocator in BPF JIT To: Mark Rutland Cc: Alexei Starovoitov , Florent Revest , Daniel Borkmann , Alexei Starovoitov , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Catalin Marinas , bpf , KP Singh , linux-arm-kernel , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 Hi Mark, On Thu, Aug 3, 2023 at 1:13=E2=80=AFPM Mark Rutland = wrote: > > Hi Alexei, > > On Wed, Aug 02, 2023 at 02:02:39PM -0700, Alexei Starovoitov wrote: > > On Sun, Jul 30, 2023 at 10:22=E2=80=AFAM Puranjay Mohan wrote: > > > > > > Hi Mark, > > > I am really looking forward to your feedback on this series. > > > > > > On Mon, Jul 17, 2023 at 9:50=E2=80=AFAM Puranjay Mohan wrote: > > > > > > > > Hi Mark, > > > > > > > > On Mon, Jul 3, 2023 at 7:15=E2=80=AFPM Mark Rutland wrote: > > > > > > > > > > On Mon, Jul 03, 2023 at 06:40:21PM +0200, Daniel Borkmann wrote: > > > > > > Hi Mark, > > > > > > > > > > Hi Daniel, > > > > > > > > > > > On 6/26/23 10:58 AM, Puranjay Mohan wrote: > > > > > > > BPF programs currently consume a page each on ARM64. For syst= ems with many BPF > > > > > > > programs, this adds significant pressure to instruction TLB. = High iTLB pressure > > > > > > > usually causes slow down for the whole system. > > > > > > > > > > > > > > Song Liu introduced the BPF prog pack allocator[1] to mitigat= e the above issue. > > > > > > > It packs multiple BPF programs into a single huge page. It is= currently only > > > > > > > enabled for the x86_64 BPF JIT. > > > > > > > > > > > > > > This patch series enables the BPF prog pack allocator for the= ARM64 BPF JIT. > > > > > > > > > > > If you get a chance to take another look at the v4 changes from= Puranjay and > > > > > > in case they look good to you reply with an Ack, that would be = great. > > > > > > > > > > Sure -- this is on my queue of things to look at; it might just t= ake me a few > > > > > days to get the time to give this a proper look. > > > > > > > > > > Thanks, > > > > > Mark. > > > > > > > > I am eagerly looking forward to your feedback on this series. > > > > Mark, Catalin, Florent, KP, > > > > This patch set was submitted on June 26 ! > > I appreciate this was sent a while ago, but I have been stuck on some urg= ent > bug-fixing for the last few weeks, and my review bandwidth is therfore ve= ry > limited. > > Given Puranjay had previously told me he was doing this as a side project= for > fun, and given no-one had told me this was urgent, I assumed that this wa= sn't a > major blocker and could wait. Yes, I am just doing it as a side project for fun. It is not a major blocke= r. > > I should have sent a holding reply to that effect; sorry. > > The series addresses my original concern. However, in looking at it I thi= nk > there may me a wider potential isssue w.r.t. the way instruction memory g= ets > reused, because as writtten today the architecture doesn't seem to have a > guarantee on when instruction fetches are completed and therefore when it= 's > safe to modify instruction memory. Usually we're saved by TLB maintenance= , > which this series avoids by design. > > I unfortunately haven't had the time to dig into that, poke our architect= s, > etc. > > So how urgent is this? This is not urgent as this is not a blocker for anything. I just wanted to know if there was something pending from my side. Please review it whenever you have spare time. Thanks for helping me debug = the issue with the cache maintenance. Thanks, Puranjay