Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp733207lqt; Fri, 19 Apr 2024 08:51:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX9L48QY7hp1NSpFzgGlqnVUhwGUt5/hlFNYTRSNOXklH4LL8y3fF9x7ZZgQR/qtNZHPt61ydF17xZY+y3/3wOBDa4noG4DMIa7g0PSrw== X-Google-Smtp-Source: AGHT+IHfW06na6S7tEu9ry5dJEBF47c57kqq8LYBewv6Xwt5nMczSVOYutXMYL5YxEQ7advN/4RN X-Received: by 2002:a17:902:b40a:b0:1e8:6729:5146 with SMTP id x10-20020a170902b40a00b001e867295146mr2448071plr.57.1713541877983; Fri, 19 Apr 2024 08:51:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713541877; cv=pass; d=google.com; s=arc-20160816; b=r8AlMplFu3p8ytJEpVCuuBrVP6rRCj2MVdOEsa6tjFr4476rMAjoSUw+zU12VCayy8 5CfhXuXG7OGWsC2F0qcBvnT8bb6n9ATrYNlauGr+QN1afyt+FO5+TcsA/URDoW1nrrXj cS4F1VLIkNOa5Z52Kdb+HMLe2il/ekBMRCRE6WEKyWkpAvLyQPBNiLMElUIJ91s9LERF IsMXI7TzM7AHG4RU2+IqSJvzlaARX0NkajlBa7B89BNmx2lgUOL9K3lya/rg7L0RT7ze xUR8sT3w6IRZe8naH/ck0T+7353rtZFgGvuAbPC2NUydmHY9ulPDDEr83N3r6ET6mcke 5Fvw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=WWJM97CcvSF3993rmBMTv0D7IMRw9Z8Se5HS1FM9dCc=; fh=o4wFYckQl2aoP8hb4XPIacN0fVe8f3IGxGKFL3Cznn8=; b=bwh1626t83KigxV82hY3Nf+XUuLI/OcKYRrgpQmW+KnLkXTECgMP1vA2+wr1d4SpQF 4y2gkgpJXLUiRZiZMeeIb770djIgpuHCrWmLf3Xlkl2V+pu8ryWADOxIbtFFhNG9Lott S52l3n/k3HgRN5BwwNdL+UetlU3/HHtHVslrcSHWDiZzDz4ExJKjS4HKqRtmQxYvEKqR Gh942iWVCEczUhVr94K4koJP/ULJpzF00oahDFoowNAcVAnRkmfbjKSlfxaE1l3IES1o 4Vc4rdvOhIG1S3YiDL5HS+oRtt/Ptwx4juIAn8KWdeS8hHETT015wieGFvuqfBQbMre4 hrCg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kmYMhp6L; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-151704-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151704-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l10-20020a170903120a00b001e4638c9bcasi3518331plh.592.2024.04.19.08.51.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 08:51:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151704-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kmYMhp6L; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-151704-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151704-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 38027B22F4A for ; Fri, 19 Apr 2024 15:50:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 556F7130A72; Fri, 19 Apr 2024 15:49:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kmYMhp6L" Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07B131304A5; Fri, 19 Apr 2024 15:49:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713541791; cv=none; b=gZs1g8EC/zaLNAgpYCBluhOhdZ9l6N0TbkSCx1Nb+XIFq/o5TV6RdD+NE/WZhggekbyVwuZvQxGL9++F8N87Z+erLccpOA7TdCH8oVMRzIK2l6eZ4rhNJ91GBQuR3+FOQH7zpuBq/mb1BR/ccApl/4Hj13cqefNRMpEPQ7vNrDs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713541791; c=relaxed/simple; bh=WWJM97CcvSF3993rmBMTv0D7IMRw9Z8Se5HS1FM9dCc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=juM07VQTd6gHNjixM6Iu4vpBI7CoQFXGMwneKN/2bSRrEzHhtW3eAu7e6QN/Jn/hCd0xftRjnbI/cbeqdmLM3yrSS69q4fN6gg081sl1c027LTjm2vfgsmQjVm0g03B5FL9GiLioE0/EfyCQLCEWJd0U14U6tiaDgP5ecsBWaEE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kmYMhp6L; arc=none smtp.client-ip=209.85.208.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2da01cb187cso38815321fa.0; Fri, 19 Apr 2024 08:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713541788; x=1714146588; darn=vger.kernel.org; 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=WWJM97CcvSF3993rmBMTv0D7IMRw9Z8Se5HS1FM9dCc=; b=kmYMhp6LRdt/pghJaBvQj6WbF6GqXMtpUAEhZK0d2NdAFc6DCgAZqfSnb4plb5Zd+l 58cn/Z9mUPVU8LZpZgBVMGRo1doOHE8s3odLMyWdKZrqcmh3oVMPDaz6ACTLr6DqrG/N 7/Ejhfq+3pJ9aRsZBAMeTHWbkkCGBeNnLqFUUAJ/D2lTd+Z1WsfHIFQ6ka1UHTLCEwGW 5efgVwRq6vhcMF6m+ped9WKAlH84SHWYU9b2pAW9GxEiGoSxo9jxizM+Tov729mEBZOt HKE20TKgnhFYwgZYebOaLUGC3CKwmGmYKEuE/1+CYTaljYQwMD6Vc5yReg3TZ7l3skl/ +2fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713541788; x=1714146588; 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=WWJM97CcvSF3993rmBMTv0D7IMRw9Z8Se5HS1FM9dCc=; b=G+z/Fu7vFcNFFrquMB4/fDHgbGXC+49mTakdt0GHgTYH22yXDNdo28IxJFsNRX1Opk R0866oqyI9igAQS8Yeb4xEBDqnZP8c1ki3sb27qtbyDjS88XLDstxqw00OUXJGT/4Lli CPUnBl1SNRlh3uPjDrKaDAGLpYgGMH4EfD9HNz2MaCF39w6IA4GRdWBd5lmcckN9gITJ qOFIS75wTxGCDXaw2N5O4w+3URZaybNiScNaL+pZQmFIoe7ro3g6kwlQm/f2n3PjHgVn t4incPZds7I7VkIL//G+0j17UDt+nSimXyraB5rSo6Mh4ZP6NgYbtNR/xQLpn/sliV0T flRA== X-Forwarded-Encrypted: i=1; AJvYcCUzG3Ww9PtQwC+9qqzZ0+RqyzRwynmM8cpl3umth9xsVfHg/uzOBD4O/7hHpLZ6QF+cE2J/yMfKNplWmNO/aeWl8/swEym5FojOex7RG11Ydj8e5mbeVZrqg0t0ySYfD0/2tLCmgs2ciGr21tHcsI4Q+0KuMXB9Dv6O8xrFLTmASwd0 X-Gm-Message-State: AOJu0YzuvAL0JSGR2Qby7NKpfwCiH3MWWmA7Ggf6R8PPwc8JCxgH/WTQ IiqiIrdeM1LluReDIcdVb5jmU7XecjthSpsZVwdAb4RdAp0fVpzasM7/YBjEKrmXDci5J8dMCaY NewhrAC8zJ1gZxvdW8/1clIQPTrk3G2/y X-Received: by 2002:a2e:bea7:0:b0:2d6:fa7a:a670 with SMTP id a39-20020a2ebea7000000b002d6fa7aa670mr2311881ljr.33.1713541787684; Fri, 19 Apr 2024 08:49:47 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240416-bpf_wq-v1-0-c9e66092f842@kernel.org> <20240416-bpf_wq-v1-17-c9e66092f842@kernel.org> In-Reply-To: From: Alexei Starovoitov Date: Fri, 19 Apr 2024 08:49:36 -0700 Message-ID: Subject: Re: [PATCH bpf-next 17/18] bpf: add bpf_wq_start To: Benjamin Tissoires Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , bpf , LKML , "open list:KERNEL SELFTEST FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Apr 19, 2024 at 8:14=E2=80=AFAM Benjamin Tissoires wrote: > > > Honestly I just felt the patch series was big enough for a PoC and > comparison with sleepable bpf_timer. But if we think this needs not to > be added, I guess that works too :) It certainly did its job to compare the two and imo bpf_wq with kfunc appro= ach looks cleaner overall and will be easier to extend in the long term. I mean that we'll be adding 3 kfuncs initially: bpf_wq_init, bpf_wq_start, bpf_wq_set_callback. imo that's good enough to land it and get some exposure. I'll be using it right away to refactor bpf_arena_alloc.h into actual arena allocator for bpf progs that is not just a selftest. I'm currently working on locks for bpf_arena. Kumar has a patch set that adds bpf_preempt_disble kfunc and coupled with bpf_wq we'll have all mechanisms to build arbitrary data structures/algorithms as bpf programs.