From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (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 5F268274B23 for ; Sat, 6 Jun 2026 21:55:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780782923; cv=none; b=tcSPkdY3HljOo8yTocbFnSymRUNckxprtpXLez0P7TWlu57hhVqY/0IHzVk2BN8GgPDQDVdE3k3fDbmkfnBzU3Q1fZpU2VNtcSqeil9Ju/mZozeSdBsJqXio9vFO+GvjfqaidIkO8cC5J+o8PB5O4qZB24u8iBbqF46PqELRTAg= 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.171 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-f171.google.com with SMTP id 5614622812f47-48657fc84a3so2645796b6e.3 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=ZLS1s9v7GgywethF09lHc0veBmgwI1/ExiNILoNkcoHm15TSGrLPLRUVCEF8J+vRwl WpI3A4OJCrWn/04lEiXPRfL7bKj8JhmCZAnR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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: io-uring@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