Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp407224pxm; Wed, 2 Mar 2022 18:36:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxn5t3FflgERpuecZv3m/K35AysD1xCJlNWnAGpioCTFwPImJ54jGxCtLqLyr7h0hjTkU/C X-Received: by 2002:a63:1a54:0:b0:375:82eb:7449 with SMTP id a20-20020a631a54000000b0037582eb7449mr28935529pgm.341.1646274964000; Wed, 02 Mar 2022 18:36:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646274963; cv=none; d=google.com; s=arc-20160816; b=CAVWcX/fEThjGg7NVwC6czx+niaAti6EfEejvAriyQdmEHnut8ViH11xofXGJxT1/A 9YM1UDah5MU0GfPiC1a75OgQ/cf+Y1mmukq19/LNViSmYy8O3EwxfycVq7on4LJ4OAt6 m8kyF2g5WUC/Oio7b/4aVECBVzXfo1wN//qrnFv4cUYqpfIZR6xZkVlBeOZ2mH2VldoG X5zfyjkvmj0EzW4S5bp/ehg9w/gwaZsOPGPOWbPT+KjWuFZvkaZpG0g5wlQcoLsqTGQ8 692fw7HGGGK9Nb0dWsgjy/o7XQufsEjxYe+ovqHoZHVElEgNeGnbtvbjlu5ZjbaCeAn9 FqwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=t11rGjeJbaPKo4iIzfdlK+BfedmdNwblLmmUNHyIl/s=; b=0EN0E4cXYaKssiBeDMvpFGDWYiyvmcRRKDDfloLx1xN8dwNemsblUKgCVal8I0zWUW JmwJvxKDY+zgF9MU0Qh/VUecrcG35W05A5OlOkKgMjPEnBFvZCLU3ctFikcPcGPUkR0D Ldtu30tD+oaLpVvJdnTPxdxNisAz5lD+xHRBb8xib+0rTt1o7p2RD97pcmUqtzu8FSMZ IDbKzgGrCgf8kejL2LqoWqJ9RR68+YFYiRzRvk1WLN+yauknIIkWeTM+MPRRRyd4C7iV uMRSVMxPggFz+3+DAqGeppzIENMuiy9MFt1m5AbJ9SBExsZyaz4N/5VGsSOup2AGQTFF dcPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LaBwsIw2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id pg18-20020a17090b1e1200b001bef856c75dsi4139892pjb.88.2022.03.02.18.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 18:36:03 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LaBwsIw2; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ABB9745AC3; Wed, 2 Mar 2022 18:29:52 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231704AbiCCCac (ORCPT + 99 others); Wed, 2 Mar 2022 21:30:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231702AbiCCCab (ORCPT ); Wed, 2 Mar 2022 21:30:31 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C46D3EF3C; Wed, 2 Mar 2022 18:29:47 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id z12-20020a17090ad78c00b001bf022b69d6so2432055pju.2; Wed, 02 Mar 2022 18:29:47 -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=t11rGjeJbaPKo4iIzfdlK+BfedmdNwblLmmUNHyIl/s=; b=LaBwsIw262WVf/mDTL0709lGkwF46Jcxad+J+nwwx7JjWd4qP096eOqaCM2VAmSIht wGxm4Dsv9k9gRui1sH4PxWNSfMr07ZeSTBdu1yvsxFYMayiLCpAJGOXhwznx97zPCd2W 1t93LsQ18l0E1hu4RqFZVvUk1p86GbTKRhnUeH8akfZt/XrDqNqDkrZzcOipXqJ+L7ml uIVGnzLKp3MVN2HSwJwj+7wpJxJiyPXq4Gi12UuFMWI8IOxJkUUBRD2AkEogjNA0i68d 4BpnbqaKb2RkRn1asKsRKgctWPsFugfnLi8nIQ9HUAfJDJzzJrhcSFNGHxuV2Zed0enA 0qTQ== 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=t11rGjeJbaPKo4iIzfdlK+BfedmdNwblLmmUNHyIl/s=; b=mQoPCob4Vj1yweEyvBDCP5q2qtkq++HQfSMtCjgelS2ECRD9k6oiIeRz44yY6kDumr I/KaOHo8HP5WQTyRZHhCqGqOTOGVKvIYSx3MbgxsA+6fOWw38Va3Z4IEAJiEGRc5V3sb YNC4U+B/zFMRXqO4c4qSquCRA2+AjDEI8pu7KaVUGsHIiV85CzJjfMqPG2O1EWTNmqXT Mc9lnyxpp/xcfItQyaB5KfVmaSqnbd+qMJUY+b2upW7ZmftqtrcVraXudYYahhQkffu5 09brjf4FUUHSzt2quyJwIrbA9VJFLHllEpQ5dHky7WOhx+Ym7EKA9ZjlWtLi74N/H9NB pKiQ== X-Gm-Message-State: AOAM532n0/RKzPPrqxiA99a2ilNmiwA/dWG2ay35cli26MaWCFV3lwxB c9vIHzh1qKCGdKlVuSK4RbdU9lVqwwaHvli/JgGe60Cm X-Received: by 2002:a17:902:76c5:b0:14e:e325:9513 with SMTP id j5-20020a17090276c500b0014ee3259513mr33748266plt.55.1646274586726; Wed, 02 Mar 2022 18:29:46 -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: <93c3fc30-ad38-96fa-cf8e-20e55b267a3b@fb.com> From: Alexei Starovoitov Date: Wed, 2 Mar 2022 18:29:35 -0800 Message-ID: Subject: Re: [PATCH bpf-next v1 4/9] bpf: Introduce sleepable tracepoints To: Yonghong Song Cc: Hao Luo , 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" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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.