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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B3EEC433DF for ; Wed, 15 Jul 2020 20:10:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1440F2075B for ; Wed, 15 Jul 2020 20:10:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="oZxSTMfM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726998AbgGOUKK (ORCPT ); Wed, 15 Jul 2020 16:10:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726786AbgGOUKI (ORCPT ); Wed, 15 Jul 2020 16:10:08 -0400 Received: from mail-ed1-x541.google.com (mail-ed1-x541.google.com [IPv6:2a00:1450:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A69B1C08C5DD for ; Wed, 15 Jul 2020 13:10:06 -0700 (PDT) Received: by mail-ed1-x541.google.com with SMTP id dg28so2624144edb.3 for ; Wed, 15 Jul 2020 13:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NBZwz/iJDyturYfYwj1u5a/ly72Q32flNreT+u4AFMs=; b=oZxSTMfMImLKJUtIiMgUf5gj0cNhaT6bR7vnph9913MaReYlVEart7NBd42sLC0ROc KBhL/e4b6KJXNBPowk8KgMKzFPs37ZxVr9V7P2136toqRe8FJ3BrPPUVqJR2abR1Fj60 ycFHshZU5Shfy9PmwmEgB16QqoRI0ZTGrJsdM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NBZwz/iJDyturYfYwj1u5a/ly72Q32flNreT+u4AFMs=; b=nfV1ArcBmj8PtXWyKEohGBh4auJD1noTqwPQPuu+6nXehtHEHWJZLdO/0MCw0gxQLg qD4Iwz7Pgf3xGkzDOHUngtKdEMeg648OoZLtN0JLFZlWQhZzBSjB6y1FkjD5eWb8cpYK aBr+V/Fwuw5yTFpfRrxZKa0/oqVm8K5b9X+rHvU7z7qhCWjDowJJRwIQIPyfINpJs82I ZOULlj8O4gSAlRzWCdm2GqTNschelCvci4cG7I5sZzQwv80DTupYNrLdONx8LFJ+bxgY bCOKqAQ/0QUzLrgQErpH2l4bcjW6ghIWT/ikux3orL0Uzp4ZathCr/2Pn1pJe8sslUUh NMsw== X-Gm-Message-State: AOAM532+7XgTO0U+ZP9ogjkFasIOQwR5Mn3XczmM5VcxumXOKR2aJ2kW cPZm4pEwrVK3OlKVc6eVwfX7LheOm7LKT/50lpDrIw== X-Google-Smtp-Source: ABdhPJxmiwfGPdXuAL/Cm/iBN4GQDNpUgVqb1mhfqKEEu8zlIX3pRbGp59TjObNIRuwsiYpzoCYIpAxQXU0MuNuaGEM= X-Received: by 2002:aa7:d04e:: with SMTP id n14mr1329981edo.161.1594843805238; Wed, 15 Jul 2020 13:10:05 -0700 (PDT) MIME-Version: 1.0 References: <20200715171130.GG12769@casper.infradead.org> <7c09f6af-653f-db3f-2378-02dca2bc07f7@gmail.com> In-Reply-To: <7c09f6af-653f-db3f-2378-02dca2bc07f7@gmail.com> From: Miklos Szeredi Date: Wed, 15 Jul 2020 22:09:54 +0200 Message-ID: Subject: Re: strace of io_uring events? To: Pavel Begunkov Cc: Matthew Wilcox , Andy Lutomirski , Stefano Garzarella , Kees Cook , Christian Brauner , strace-devel@lists.strace.io, io-uring@vger.kernel.org, Linux API , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: io-uring-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Wed, Jul 15, 2020 at 9:43 PM Pavel Begunkov wrote: > > To clear details for those who are not familiar with io_uring: > > io_uring has a pair of queues, submission (SQ) and completion queues (CQ), > both shared between kernel and user spaces. The userspace submits requests > by filling a chunk of memory in SQ. The kernel picks up SQ entries in > (syscall io_uring_enter) or asynchronously by polling SQ. > > CQ entries are filled by the kernel completely asynchronously and > in parallel. Some users just poll CQ to get them, but also have a way > to wait for them. > > >>> > >>> What do people think? > >>> > >>> From what I can tell, listing the submitted requests on > >>> io_uring_enter() would not be hard. Request completion is > >>> asynchronous, however, and may not require io_uring_enter() syscall. > >>> Am I correct? > > Both, submission and completion sides may not require a syscall. Okay. > >>> Is there some existing tracing infrastructure that strace could use to > >>> get async completion events? Should we be introducing one? > > There are static trace points covering all needs. This needs to be unprivileged, or its usefulness is again compromized. > > And if not used the whole thing have to be zero-overhead. Otherwise > there is perf, which is zero-overhead, and this IMHO won't fly. Obviously it needs to be zero overhead if not tracing. What won't fly? Thanks, Miklos