From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 518E31DC730; Mon, 28 Oct 2024 13:38:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730122706; cv=none; b=QtpfRi7kJ75EES7xX/1Diydmtkz6Cwnn/t3Ybzwu4NVYYf3UTzJMXoBOK990n3HGaZNJCmCu5eNfUmIwIkiKDS3QNRB2GQayj+xJ+/hj0s9cCduEchXk9tx01IihNqK0CkR24ZrKQWYr2GHK1hnsGJZ+8gZpNbvXaViYJ7kwVnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730122706; c=relaxed/simple; bh=PQsmwnRSoJgBKYMVwQrVMe6PPvEJe4g9uksm+f7pXQM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=A0QgoUoTSQlvchg0odUxsfmSWs8OEUtmH0aMC89hRDKouh5D3sffshKrqeLlYI+MtpYOHsFYkR+5spRjKPhHRmflOqmMJFZDjylxO2rZIJTnDdv3XxEPQEdCyP4hwEB82YZqSgWwPnifmVIt0uSAMrjNuzlASRMf+0e8lHPzMek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=KQNM9MEj; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="KQNM9MEj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1730122703; bh=PQsmwnRSoJgBKYMVwQrVMe6PPvEJe4g9uksm+f7pXQM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=KQNM9MEjXDLUu0yqHqwIby5UG0G53zP7C2Bzr5Yl8aHYzhbmYPZ10w9P+E7zZNzlY w10/bMA491wRvTFKTUZjSKb4kkiHpDT2e5zlzJPgrDMoyiB1ZqOGvONkK26R50vHDf uciHd4u8G6sWPDAC7UJyAXzjz+iR9T2hiYE2LrMq0H9dNgyYlpdpMzVqlVOTbmXHJy 2ZEqqdc2VqYZFgf+TFB64d3JKtak492tIs2u/qCNR+ItDY0vatVrz0X1i+emMe0siY W2KxAnLmqeJp90ijjrLTFdtIddopbOqDofW1MPth8ziddQglcGzNW+b0JuoIoaeq51 ukxIJ5RIQyyhg== Received: from [172.16.0.134] (96-127-217-162.qc.cable.ebox.net [96.127.217.162]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4XcZGQ6gp1zpxS; Mon, 28 Oct 2024 09:38:22 -0400 (EDT) Message-ID: <459b9e7d-be9b-41d8-8ae3-4aa707def641@efficios.com> Date: Mon, 28 Oct 2024 09:36:43 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v3 2/3] tracing: Introduce tracepoint_is_syscall() To: Andrii Nakryiko , Masami Hiramatsu Cc: Steven Rostedt , linux-kernel@vger.kernel.org, Michael Jeanson , Peter Zijlstra , Alexei Starovoitov , Yonghong Song , "Paul E . McKenney" , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Namhyung Kim , bpf@vger.kernel.org, Joel Fernandes , Jordan Rife References: <20241026154629.593041-1-mathieu.desnoyers@efficios.com> <20241026154629.593041-2-mathieu.desnoyers@efficios.com> <20241026200840.17171eb2@rorschach.local.home> <20241027231930.941d6c1f21e2b4668af44df8@kernel.org> From: Mathieu Desnoyers Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024-10-27 21:23, Andrii Nakryiko wrote: > On Sun, Oct 27, 2024 at 7:19 AM Masami Hiramatsu wrote: [...] >>>> include/linux/tracepoint-defs.h | 2 ++ >>>> include/linux/tracepoint.h | 24 ++++++++++++++++++++++++ >>>> include/trace/define_trace.h | 2 +- >>>> 3 files changed, 27 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/include/linux/tracepoint-defs.h b/include/linux/tracepoint-defs.h >>>> index 967c08d9da84..53119e074c87 100644 >>>> --- a/include/linux/tracepoint-defs.h >>>> +++ b/include/linux/tracepoint-defs.h >>>> @@ -32,6 +32,8 @@ struct tracepoint_func { >>>> struct tracepoint_ext { >>>> int (*regfunc)(void); >>>> void (*unregfunc)(void); >>>> + /* Flags. */ >>>> + unsigned int syscall:1; >>> >>> I wonder if we should call it "sleepable" instead? For this patch set >>> do we really care if it's a system call or not? It's really if the >>> tracepoint is sleepable or not that's the issue. System calls are just >>> one user of it, there may be more in the future, and the changes to BPF >>> will still be needed. >> >> I agree with this. Even if currently we restrict only syscall events >> can be sleep, "tracepoint_is_syscall()" requires to add comment to >> explain why on all call sites e.g. >> > > +1 to naming this "sleepable" (or at least "faultable"). BPF world > uses "sleepable BPF" terminology for BPF programs and attachment hooks > that can take page fault (and wait/sleep waiting for those to be > handled), so this would be consistent with that. Also, from BPF > standpoint this will be advertised as attaching to sleepable > tracepoints regardless, so "syscall" terminology is too specific and > misleading, because while current set of tracepoints are > syscall-specific, the important part is taking page fault, no tracing > syscalls. +1 for "faultable". Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com