Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32292985rwd; Fri, 7 Jul 2023 11:26:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlGOhLYMbDO4bOtUzIhEDE6Bph1ztZ7hGb24CLHog5O5oFlZbH1w9cEGfAwnxHxg6Y3ziquv X-Received: by 2002:a17:907:908b:b0:988:d1d5:cd5b with SMTP id ge11-20020a170907908b00b00988d1d5cd5bmr4183737ejb.75.1688754386964; Fri, 07 Jul 2023 11:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688754386; cv=none; d=google.com; s=arc-20160816; b=X6D2Erty30RDuq8SEpL+XYG4iAHAE6jrnhKK/lcgXwtvNUBM0tydQA+BEQ3zXLdsXd GTXPJdysq1E0NSfkgWIyaJZUYJYNrq5ZxJLXAECdVRAMLzD4sSr/mOt7/Sg46cW7C2LB CguRh8RrrMakWGwrbrcv0uuYw10Z+2MCNR4c2cenPsJ/Pyj1nJPg4V1mDRBujMlwt1aa XNJGVcO9XjYL0GXFEDsW+w29PMnmSdx6dlHMYMRVuDt1IYwGTEhr+xlUNnLNbGZ4waQI bVfGTGU9aa+Wbo/sVGDVvfnaqndyuGCK7PHv49dOuRh2OG3UONYXjqxupBRAU6xNCMk0 msbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=SslnkP80X51uSIcroqhn4NwluHxYbq7es0S39E9aqHU=; fh=mdfFVeRDdEvmPLJV84jyVn3sV91QLw0G+0IOye9V1zE=; b=odi1ZDe5j6EQJS+xJkI2bpWXGVYgu748fC8y7Rl1Sxl858DqTgUuJBKFGj4QPzzqPJ qTzY6RVs47CM+AoklUz79Me6BvYF4UTFh259GOE2zGXX3nidVKNuo8eayYWc2LKek6Rm CKFjnoHe09CY2gVn0fNXdvfq3GQAAUmq/dOlB8m1OKZ1HzN6xuJJ3WGyDSj2YdYEeJiE 19F0tY/WwWXZvnoMGQ1RYHQuXJylQAVlAKe4pgRVGJ7craLRrKgf0j3maPMO6T39WOXu xH4OoWVtLTO/qFkx3C+7r+OZFeEOulXjtlwkDwnRuglmlZdZwCpICFN66wfJL4i00ldu OQnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b="bHrhMZ/x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lr24-20020a170906fb9800b00993d5cdf483si846420ejb.807.2023.07.07.11.26.03; Fri, 07 Jul 2023 11:26:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b="bHrhMZ/x"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbjGGRx7 (ORCPT + 99 others); Fri, 7 Jul 2023 13:53:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbjGGRx6 (ORCPT ); Fri, 7 Jul 2023 13:53:58 -0400 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E92B4AF for ; Fri, 7 Jul 2023 10:53:56 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-760dff4b701so33270239f.0 for ; Fri, 07 Jul 2023 10:53:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20221208.gappssmtp.com; s=20221208; t=1688752436; x=1691344436; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SslnkP80X51uSIcroqhn4NwluHxYbq7es0S39E9aqHU=; b=bHrhMZ/xB4SQzlpnZvtgT17dBX0gt63OtmfrAhjeGSfFfXqFnUUnsLWTyo38zsHvwx eW1gnVsgBQaGJl+pXfLYIn4CaPguC68ET5ihHXFn8iAt/uoOztvNETF4hf0rcs5lwoiu OJfR+VsJgoxUs42nU0HIUtt+Dd5cTHGBDPF8tvU+o7Az+eSW1bw+garJQt6Qcvm0/aB6 1t8ommkcffJbz6e3y4eTLLsouoI8Kd605t7iOU6hKRHOGZf5gclh64nTrfX31MdxTvOA yj+FrDtCxNwv+lOlg4vG9chE4rnpcSJP2I3qqfbUZSFWIV1Pp+//fb8qUSIlo7BS1XRP MBeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688752436; x=1691344436; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SslnkP80X51uSIcroqhn4NwluHxYbq7es0S39E9aqHU=; b=RJhxr84RNjxTd+vCgPZG0fL4aBobZcvfrwH+12EFaZyMia9A1jJhUtDKDm40+yb7Ff NpXEGd6TJVgIDYjrIamqvYRWh9PFBsKTdi/XBQ/vv3pWFYbe53GIwzB6v2N+386zX50R ycD/W+km2Vp6eRKEPVYsLvAht9cilymtNlAlP6H+0Wkq7lZsTm6dnGHqTHrygE6ObBTL fsdnSG70wiG0XzgncDI5ku84VansvgcNSJ/a/sg1v73vgStaEFOm38OhGNXYqWexOVar f1Zsy1FbNZhgrBLzs39ludrhRh4tYYnkaqdl/oOWrKFxKbV/8TGwlG562n3hE/VvlixY d33Q== X-Gm-Message-State: ABy/qLZxZoOn9Y8VFDVik4EDE94gqMs0Bi524HPG1XdZxJuoB+FAIV0w 4Q2aYcLYVThYjQTDQIP+j4W9QQ== X-Received: by 2002:a05:6e02:e04:b0:345:e438:7381 with SMTP id a4-20020a056e020e0400b00345e4387381mr6005599ilk.2.1688752436306; Fri, 07 Jul 2023 10:53:56 -0700 (PDT) Received: from [127.0.0.1] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id cu3-20020a05663848c300b0042b72208aa6sm1353173jab.77.2023.07.07.10.53.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 10:53:55 -0700 (PDT) From: Jens Axboe To: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, Andres Freund Cc: Pavel Begunkov In-Reply-To: <20230707162007.194068-1-andres@anarazel.de> References: <20230707162007.194068-1-andres@anarazel.de> Subject: Re: [PATCH v1] io_uring: Use io_schedule* in cqring wait Message-Id: <168875243541.1538686.6247556523906342367.b4-ty@kernel.dk> Date: Fri, 07 Jul 2023 11:53:55 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.13-dev-099c9 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Fri, 07 Jul 2023 09:20:07 -0700, Andres Freund wrote: > I observed poor performance of io_uring compared to synchronous IO. That > turns out to be caused by deeper CPU idle states entered with io_uring, > due to io_uring using plain schedule(), whereas synchronous IO uses > io_schedule(). > > The losses due to this are substantial. On my cascade lake workstation, > t/io_uring from the fio repository e.g. yields regressions between 20% > and 40% with the following command: > ./t/io_uring -r 5 -X0 -d 1 -s 1 -c 1 -p 0 -S$use_sync -R 0 /mnt/t2/fio/write.0.0 > > [...] Applied, thanks! [1/1] io_uring: Use io_schedule* in cqring wait (no commit info) Best regards, -- Jens Axboe