From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) (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 A19C33D25CB for ; Sat, 6 Jun 2026 21:55:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780782923; cv=none; b=iQY4GsvzFzF/6FBJc4tGoC75CEQDgB20DIEkwYGKfhCP8g/a2GeWpXl/WySuXJSbsM8JHvBVmNKJVYrtZubS9QVb/We4SwVScLFnSbVdjDqnbk1Tu0ososeY+vPZ40A8JLw267eXktTgJoY/v3IkBJih8LpYzZhEzbFbWITll8Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780782923; c=relaxed/simple; bh=TEWLbo8/iNKa29hISjwP1lL4kySPmvoVu3KsMz64d90=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=THgWXas8yiF0GyUzg+4e5qT9sThxnoqkB4RBFIvRRubE55rlFIkWhTnAmAbPLfkyS/0RMLEtx/GfRV7drODJD8fDJ/7HbQ+zGO1iCpXLh12Rq8KgcY0Kgi78mJaFYU1s618le2MCMdA2m6ETN8XavYdRJgQQ9c+wgD3ZNNqO38s= 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=NrHDD/Sq; arc=none smtp.client-ip=209.85.167.175 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="NrHDD/Sq" Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-486304fa184so2691354b6e.1 for ; Sat, 06 Jun 2026 14:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20251104.gappssmtp.com; s=20251104; t=1780782920; x=1781387720; 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=iPnWjGOdOrf1OytOjS78s1pTXmzRpumt7Mjx9WGwmic=; b=NrHDD/Sqd+LIo7PGYxLPMFH9mVrBCYV6mzgt8s/9aolz0gu/4GQh1b7jW0YmJlYapB 8kyLlf+rUDhHayzW5FSVs9OFvAcdFP+kD3FR+Upp6swYh/I7r0IN2B4XK7UJ35e9/LDg ky2hoks5cy3JKctSDOUaWcbBG6Y74mGq6JK4KXunrHkS7V5+iopqm62yTw1RpP4qUOns PQ4sHzRMdN6+/VUM1XRbNKadAzS1KF4p2FQPf3Zop48Fd6hfUSmhaYVAmoZ/24Hh+dfN IWMz/6KHFXOVDJesLdVEW+IV5oL+mVNnbLvsI43f57YwHGzz4cavRTJxN2JK2VuJR6Df 31VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780782920; x=1781387720; 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=iPnWjGOdOrf1OytOjS78s1pTXmzRpumt7Mjx9WGwmic=; b=qG57fXc1up8wlOdFlBuD9YNrL7XCHobyZlSCjNKZWsOBWvrCW0BaT43/ukkO7eV3Jz uiDKBOosQoDQV4hzIvfYn4NijsQIS6reAT+g1JSd5HIkEVZHFEq4EqfiX9xkEtXqAatc 13edoa0BtFz19HQCgRHHtj7SCeq8HgUMz3/N/97zZbtZTsv1Xyfw3WPKuTsQbdlnVIGf m6ct2QYntUzeeIMWwJ3dsyxqPFhhEW31BcL4a0Hd5GfQepcu/Ld09+seW4j+ORhJ4B5a DHWRMKerbzqPJHlujz8qT69UPKb3GKKlaw82foOszPtijq7FvIHEw4JGUClyuUABXuGO 0Ctw== X-Forwarded-Encrypted: i=1; AFNElJ9L8EoTefDEC9OINYwqUxHVz1BfZKm2Ee+a7S3DfD9OD8ukVgUZOZ83jqfZzn0qy0tAs0jpnbtwzxz7a04=@vger.kernel.org X-Gm-Message-State: AOJu0Yyo4+hlA6cus3YuJs4YzQzTnJ/++2P1s4X8SJ3HRpzCATjja5Fr fmNZINAMvUOzxLPnnGbzJYG7bxpbUNs/yB5cVwd552CT8JcwNTIk2Psq1ZOkUCuuuio= X-Gm-Gg: Acq92OEO+Q4810XkRQf9ogSTv71PHhhp/whbi9au0UW8tplldzBcsHaEgesQamNuZZ+ VYTzEqlmqdb/zq+qKLdGEN86N+S0DhbvBZwCW/pHPzr4U62q9nMIhl0Pr15cezD/bIugTv2xd5R sqTXKYPTdBw9trQOY8FXNDNaOUOcsWvLUgMa9jiGltE/LWd2SG95p5AjWjAVSqdIRSQ5WrWnPmT KaayA1sG+Z9wFSSDEfYVa5RAOJ/qarNrvmg0NkE0XayJt5S7qaZ4yNNELRP5AIq/47JZYk8MQAL 2itS2DrXITPwQTzWcfFdWohJpulLdACJHVrKBsZfXADF2r7oR0015xz6CIzA2iKGC1kL4/a49jx 8WI4JIx34fYueR9zhl1aLmomOye2rLtV75MGWNwoA9ejG7+lB2i7BJAA1lrzsijw08ofPlWgQaK udOtUxzLg5V+8ArpgqTmdjBLb+NZtdPaCOjFTPM1z5fVRCdCJnBu8EuHZYyxhLsgqvPxvgFf2zi hftUJxKOdd72doi+JRT X-Received: by 2002:a05:6808:2387:b0:46a:7c00:5cd8 with SMTP id 5614622812f47-4868df60b43mr5814156b6e.22.1780782920315; Sat, 06 Jun 2026 14:55:20 -0700 (PDT) Received: from [192.168.1.150] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4865b5a53bcsm10107618b6e.3.2026.06.06.14.55.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 06 Jun 2026 14:55:19 -0700 (PDT) Message-ID: <9f94f066-ea36-443e-b989-cf920ff9d27e@kernel.dk> Date: Sat, 6 Jun 2026 15:55:18 -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] iouring: Fix min_timeout behaviour To: "Christian A. Ehrhardt" Cc: Tip ten Brink , io-uring@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260606201120.1441447-1-lk@c--e.de> Content-Language: en-US From: Jens Axboe In-Reply-To: <20260606201120.1441447-1-lk@c--e.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/6/26 2:11 PM, Christian A. Ehrhardt wrote: > The wakeup condition if a min timeout is present and has > expired is that at least _one_ CQE was posted. Thus set > the cq_tail target to ->cq_min_tail + 1. Without this > commit a spurious wakeup can result in a premature wakeup > because io_should_wake() will return true even if _no_ CQE > was posted at all. > > Tested by running the liburing testsuite with no regressions. > > Additionally, tested by turning all calls to schedule() in > io_uring/wait.c into calls to schedule_timeout(1) to force > the spurious wakeups. With these spurious wakeups the > min-timeout.t test fails before and passes after this commit. Either this or the test case is broken, with or without the change you sent for the test case. I'll take a look, but it's definitely not passing as-is. -- Jens Axboe