Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp714546ybh; Wed, 15 Jul 2020 13:11:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye9GTI2icHClDo8PT+CGLBor7/MqlcgMe8wg9zoEwIjUu5AYNckrVg0ggHcouRhONcZKNy X-Received: by 2002:a17:906:7b54:: with SMTP id n20mr641564ejo.144.1594843870338; Wed, 15 Jul 2020 13:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594843870; cv=none; d=google.com; s=arc-20160816; b=Wu/LLNBthiueJ4WRNxunYrXDtsEvXGUGDHyTMEfIZljNaqvwBb86fTwUAe8Oycdrfe bFNFiwbe+shFAG7IbGCXUOd7JleHn0mhfr3VoigNbkFwVzTp9K9tR+hn7F3j1rLb4ICx 2pLE/v3E8b6deE70CBBJpN6k0OA6YJ8Ii5Js3wXDw0RQnjJaK96I9qw4eyXscA3umFr3 KG17phZc38BkjbrpJ3ioIfQMl4csHNyzugCSb5NP6/wVtu8qisV0s/kqNJowWiMnPjak /sGyWH3Ei2Tv89tDALB9jfQEUV3aQV/ov4fCe/vQ1ZxuZQ+gcJa9pbMUM2WhhIiqcfbR EB7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NBZwz/iJDyturYfYwj1u5a/ly72Q32flNreT+u4AFMs=; b=DRY3k9PCrtqMgERceyWp135JkMAjPNB61qTzPOz90OwS8EDRaAkfzrKcNhT+S8gDv+ 3ae4PxnDaNx9S+UMQR0SeUekMHn8pqnE+eUMRSmEPuiEQ9U6a76Wqwyei83jv4eO7JiU IU7xuOb9gXTqJWEblp8XNOM7Gf1qBT3i9OTDR9IhRI6EqlYVTGA1J5NO3msRYBSzNA2D 5EwWYcAZOlwPf2K83Rrr47k5INsxe1SeGN0gfrrRJtnAl/ZO5rf1mhD5ZPFdrHjXT9iL KAYdX4LwSe6mqnfs+uUD9PqxJ9Itxe3xvk+PH5UH9pnApkwlpeOnRUJ7oOhY1Esa3zip MBCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=oZxSTMfM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y18si1848387edw.583.2020.07.15.13.10.46; Wed, 15 Jul 2020 13:11:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=oZxSTMfM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727067AbgGOUKK (ORCPT + 99 others); Wed, 15 Jul 2020 16:10:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbgGOUKH (ORCPT ); Wed, 15 Jul 2020 16:10:07 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DA1AC08C5DB for ; Wed, 15 Jul 2020 13:10:06 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id dm19so2585502edb.13 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=AVTuJb34oQDODHdf4lgigEpCzHotJIfPHprZl0NE74v0I4EsccuuOL0MiHj4F5O2mH CurjbDcs0l1AIjxcrJwtjc5NX9eQdrvllxezEBlsglfnslo5k8uw5/8qL2vGcVzMyzSg KxvEmjekgZ1z+xz0DyqqLXAwJxVDW9uImAHmbrjuGQqwCXEbGMEKR03wjDqve60rP9eK N9p+FvXQ4LpZfbPmvgQLmL3J4FNQ/VHpmGOs5MuL55BF5nnEwajgCFBZYyonJiSujvq9 HG4GJM1BQL3H0PLsnrQ51RAYeCi0v+7fDIIinFq9CjqL++QMY6DY1CVvTE3uUEPfvUoq yYVA== X-Gm-Message-State: AOAM533LM4tmsjhsrDRMnQcrYjl0yVBa91uztslT21zG/1gZiFV3Ps3J STQG62ADYwBfwFnS+GL2LFUzoLiMMw+UX59UwKAIZg== 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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