From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1D24C433EF for ; Thu, 3 Mar 2022 20:02:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235469AbiCCUDQ (ORCPT ); Thu, 3 Mar 2022 15:03:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231695AbiCCUDM (ORCPT ); Thu, 3 Mar 2022 15:03:12 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6660ECF3; Thu, 3 Mar 2022 12:02:25 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id p17so5723578plo.9; Thu, 03 Mar 2022 12:02:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tWjI86b7R3B3kMyOH13PFG9bWZbWpn8g1Sw0hYy2D/U=; b=MAM6J173JByHHRAPuVsty9X85WMvv3RyH+xNsN8ibIXt8C5YjxtQkgHfeoXEdagV1t Dtn9pKz/OM0PW0dH94Igmy9+lvbbaWMsVhoO4xM+rYnHcf8XasjF0qqfou0+Kd1I3BYX NQPeFDaw3fx/MRYAGEowZy7HxUl8vZBITqUbDYRlDyWRBdZ7J0DrrHjuNk5oIcJtd0nD /HAXWY0bdA5MxZbDTQK7TcqmjU613oPXEGFPVfN2+p7Z7LxbCYgsPnZef8NDfHmI+kyX Gh1clstWJgmVgjZ+AwQ4Uj80X1eEiII0XGZJg5iwdZNnbvUrzIUVuIuZ6g/bw0B6+hCl AWkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tWjI86b7R3B3kMyOH13PFG9bWZbWpn8g1Sw0hYy2D/U=; b=67PkGCOWQLTGkBl24GIaiUGLz4mR4aUSv68C1VB37tdys6ni9S2+UeC8u5vewB0Irr Ox63f7zXZZaP5tgJbaQ5LyG46ZM64mmvP94NPpuw9lG1cbJC2mqajBySL0ar0TO3W+Fo jZzY/rt1RytUd/s0eo8Ael457IWOdQEWjyMY6O6/wEGuPFc6tSZp0uVcxcshrYtZWWyr s5F4113DQSthDsdmxMa5gpiSQQfjgY9PiajOk2mR29Tf45RPU6n6H1qLZrsz/1+agGi4 gB2+I8HCumvd+rhF8EuPZqZKqH1Lhpbvi5WPgCIsX5cDfo0aaUw3EMg1KAcT1pZXdGBg moig== X-Gm-Message-State: AOAM531nD4tGaDPbUhtvNrdutK5FSwesb0iiKxKKizoHIgGqA1B6kGh3 VsG6IDpc5wGU5xDSqDvN4yMxMm8OG74VOA1KXKRsSbzh X-Google-Smtp-Source: ABdhPJwObUr+x7WNvTmIry3wywx51F71HLMzi+NquCizbt6XTffjUgZSVRe2BLbNkyjZxVNK3m/29HA8WwiDiLUPTEw= X-Received: by 2002:a17:90b:10b:b0:1bc:6f86:b209 with SMTP id p11-20020a17090b010b00b001bc6f86b209mr7058410pjz.33.1646337744857; Thu, 03 Mar 2022 12:02:24 -0800 (PST) MIME-Version: 1.0 References: <20220225234339.2386398-1-haoluo@google.com> <20220225234339.2386398-5-haoluo@google.com> <93c3fc30-ad38-96fa-cf8e-20e55b267a3b@fb.com> In-Reply-To: From: Alexei Starovoitov Date: Thu, 3 Mar 2022 12:02:13 -0800 Message-ID: Subject: Re: [PATCH bpf-next v1 4/9] bpf: Introduce sleepable tracepoints To: Hao Luo Cc: Yonghong Song , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Martin KaFai Lau , Song Liu , KP Singh , Shakeel Butt , Joe Burton , Tejun Heo , Josh Don , Stanislav Fomichev , bpf , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 3, 2022 at 11:43 AM Hao Luo wrote: > > On Wed, Mar 2, 2022 at 6:29 PM Alexei Starovoitov > wrote: > > > > On Wed, Mar 2, 2022 at 5:09 PM Yonghong Song wrote: > > > > > > > > > > > > On 3/2/22 1:30 PM, Alexei Starovoitov wrote: > > > > On Wed, Mar 2, 2022 at 1:23 PM Yonghong Song wrote: > > > >> > > > >> > > > >> > > > >> On 2/25/22 3:43 PM, Hao Luo wrote: > > > >>> Add a new type of bpf tracepoints: sleepable tracepoints, which allows > > > >>> the handler to make calls that may sleep. With sleepable tracepoints, a > > > >>> set of syscall helpers (which may sleep) may also be called from > > > >>> sleepable tracepoints. > > > >> > > > >> There are some old discussions on sleepable tracepoints, maybe > > > >> worthwhile to take a look. > > > >> > > > >> https://lore.kernel.org/bpf/20210218222125.46565-5-mjeanson@efficios.com/T/ > > > > > > > > Right. It's very much related, but obsolete too. > > > > We don't need any of that for sleeptable _raw_ tps. > > > > I prefer to stay with "sleepable" name as well to > > > > match the rest of the bpf sleepable code. > > > > In all cases it's faultable. > > > > > > sounds good to me. Agree that for the bpf user case, Hao's > > > implementation should be enough. > > > > Just remembered that we can also do trivial noinline __weak > > nop function and mark it sleepable on the verifier side. > > That's what we were planning to do to trace map update/delete ops > > in Joe Burton's series. > > Then we don't need to extend tp infra. > > I'm fine whichever way. I see pros and cons in both options. > > Joe is also cc'ed in this patchset, I will sync up with him on the > status of trace map work. > > Alexei, do we have potentially other variants of tp? We can make the > current u16 sleepable a flag, so we can reuse this flag later when we > have another type of tracepoints. When we added the ability to attach to kernel functions and mark them as allow_error_inject the usefulness of tracepoints and even writeable tracepoints was deminissed. If we do sleepable tracepoint, I suspect, it may be the last extension in that area. I guess I'm convincing myself that noinline weak nop func is better here. Just like it's better for Joe's map tracing.