From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBDDF3E5EC4 for ; Mon, 27 Apr 2026 17:19:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777310343; cv=none; b=OxV7x0b6Ho7H6Hkihwg1CMzNxhw8YsTYevMfDqqVopCXFkqZ8GRCu56MU6u0Teb1KlKRtLdKx4Ru178en3EEAduXrbxuCwZsvPMKxlekr2fMCS+C9d5MJG+wcFg/zk1YU6YEsHbJ4tH0S08o+r3vj+/QP3K3tqRpMLbIGITXF+M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777310343; c=relaxed/simple; bh=7mRmTxhM8o7fkPuIJQIEDZpRPVbM7kzS6bf4WRUAe60=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VK2C/iYI3KBZIjaFCkzDitMbf+5kzAV307TC2PxJ2Z+Dl6+KcQm5v0sVDRtMhRG7Us4SrY9wRX+5ypTZ3oAi3P0g2sSw9NoncDx//XhBUM9/L3ymT8sJVoEm7J9x01Y4THmT0oQkNvbpdReTrLxUuci2c+6YnWuOI5/qXrOmlDI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20251104.gappssmtp.com header.i=@kernel-dk.20251104.gappssmtp.com header.b=k53tF2ek; arc=none smtp.client-ip=209.85.210.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20251104.gappssmtp.com header.i=@kernel-dk.20251104.gappssmtp.com header.b="k53tF2ek" Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-7dbe07d3ec3so5237330a34.0 for ; Mon, 27 Apr 2026 10:19:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20251104.gappssmtp.com; s=20251104; t=1777310339; x=1777915139; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=PRkfESzpeh+im0S7tgGzCdtmk7Rwulth9e9Q6iCRAWA=; b=k53tF2ekHzVr1AxRvcPHCLn7d1dbbdaTSARGcbj+rkdkBBRMJrgWt6dmVEEM5FRFyw DZU7qkif0WeAf/eZXnl41BumIfBqowQAXDC28wCFZbibV78frFdIO5D1HAEcJyRlR2pV UPF35Vhd9RDHw1P2mHtji2BhbAVmHs/9Rhdz65/o2o0o24gRnGwKw2d/qvwIssGdEPXI qk3jkoE7hneD13z6ZxuOMW+ha4d3iFoz8uKD+dzA11IPX9eQJSyoq3Rt2SBGgt2z/0K1 jwBN22EjF45zlkI/WaBVv8c/pnJU3s52SNqft5wNI/RhliP7eiW90agdKoSkQyVYGND0 JLwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777310339; x=1777915139; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PRkfESzpeh+im0S7tgGzCdtmk7Rwulth9e9Q6iCRAWA=; b=pCHpcuAGa9pJn5ltIZVUH02MdjAD9TEK3+RELWSu4v2fsFt3+TAxp3pidcosFb2tYZ AuaQoibEYCe6JSQwVoZiGWdo8OKSafGYbJ8pfZRUKWdfpVDklA4vPwcg5698HPAJ+quJ 2ybf1LcBL9w/CnI1775ND2XD0SmgkINAEsJs6B90o8u4kF27pQDhprCWeDq+AjNALPuK 8oBfSreYZnmvb+HprHblEowTj5XdGLj8+d4cDSlCJDINClBiwNcheSE9a/NP8V0IFSge 0JArWo10H6IGDgNC2CZDSPiUVtyBWHuAd8EkoBVqKebXqFyDzDG7lEnawO50nCsPUoaK LCEQ== X-Gm-Message-State: AOJu0Yy0ArcY4vrXmyAmPGM/jvi6E/I0iH7nhK+S0iO4yCLx1RonQ+3D mVtcwnH/3Kkl/J3hj8+L+b7ib9pd3c4PJA0bNUtrTDpkNW6LrnfTfq3D7L+gsLJgz4/1L5Yzue9 8JFjsyVw= X-Gm-Gg: AeBDievJmpmchX4Gx9QiW9+R3Zy3ULLZuzLVFRjnDKSIaTImvlhWE7+6wVPzVt9vlPd uTz8ZOJfRGF0wA3CAnO0gVmsXB5UXwn89J+y7//ySthsJmMqNu5lxz6k6NwinVaARAM/ExV+Mlj CogeSzSLG18A0TBMHbks/xGB4jbw8D9tq6DXVAleUtreC0Sa43xOznjU1efBiKqHhyhi1i6xOSL KQn7iiLuyYF3YkE/Rd3Tca5/Qd1DSt7YJdge79jnKL7SjxxfyfmBQc4cT5y9izLge89U2DqDbu3 ob+KOy2FWnywOONpyBF4ZB0O3+vgSt5Kj1rj0PM3kJVG/iSktBZ29HvQUI1q6TuVI7AwY6bd6/N curfk6g+Y6afkIx2469a2qZfgvjKbatTHvoqvMt8gj5JsEtTaCb42fX/50krsB/oh/Pg56DPShP NBqe0SAd66NYUMLdAcaG3YHV4wckGKmcyw+fOS1PZm3qihYv5ezrxtes7rw/a6/PjtSRXS1MNcK cv/fq8dJr2+VUg/K0KkXfvQSfdNYg== X-Received: by 2002:a05:6820:210f:b0:694:84e9:4a35 with SMTP id 006d021491bc7-69484e94b74mr19605136eaf.46.1777310339557; Mon, 27 Apr 2026 10:18:59 -0700 (PDT) Received: from [192.168.1.102] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-42b934a2dd1sm31143919fac.9.2026.04.27.10.18.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Apr 2026 10:18:59 -0700 (PDT) Message-ID: <81c9150f-1f19-417f-bdb8-ada97f0b8ea2@kernel.dk> Date: Mon, 27 Apr 2026 11:18:58 -0600 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: [PATCH] io_uring/wait: make check for pending io consider cached task references To: Fiona Ebner , io-uring@vger.kernel.org Cc: linux-kernel@vger.kernel.org, t.lamprecht@proxmox.com References: <20260427165910.683941-1-f.ebner@proxmox.com> Content-Language: en-US From: Jens Axboe In-Reply-To: <20260427165910.683941-1-f.ebner@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/27/26 10:58 AM, Fiona Ebner wrote: > The io_uring task's inflight count also includes the reservations for > task references from io_task_refs_refill(), not just in-flight > requests. Thus, pending requests are present if the inflight count is > larger than the number of cached references. > > Co-developed-by: Thomas Lamprecht > Signed-off-by: Thomas Lamprecht > Signed-off-by: Fiona Ebner Looks go to me! Just needs: Cc: stable@vger.kernel.org Fixes: 7b72d661f1f2 ("io_uring: gate iowait schedule on having pending requests") tags added, I will do that. Thanks for debugging this and sending a fix. -- Jens Axboe