From nobody Sun Feb 8 17:41:44 2026 Received: from e2i340.smtp2go.com (e2i340.smtp2go.com [103.2.141.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BBDD225416 for ; Fri, 23 Jan 2026 15:06:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.2.141.84 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769180804; cv=none; b=K4HV6lEw/KyrVNF0kCaYBpEKqyCv04tDXd69Zv8M4x/mnkijA3l3Ik670ERHxesFzeqX4UxvwPEPFwNjjYhfr3oD88FXi9XUPk/AfCemnZYYaM/XmoD3juICyfvMgRJXQ/3GmoEBJzJdKSvz6pquBNAeoi9Jm6eGFe5QEEuNT6E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769180804; c=relaxed/simple; bh=XtiAGoBQ1blzOcjTq8pgxagTyavwnvETQwdQ0jnB2rA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=myT2A0AMM45TDDFtyhDO66OWobqXYt9q/IppHSAj+qsONxagKHzJzJUE8kZDWmmhrUGjZWovrjxzKnzSBxCCL6HmZ2AmlufkZgwy0eLXlHsfJ6hUaFdRU5Sd0zN4YwOxDLFPjFJlPCj0Gk8l9XqZSW6A8pX/ZLA9CiCkeTRRdqs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=triplefau.lt; spf=pass smtp.mailfrom=em510616.triplefau.lt; dkim=fail (0-bit key) header.d=smtpservice.net header.i=@smtpservice.net header.b=rG+YUN+I reason="unknown key version"; dkim=pass (2048-bit key) header.d=triplefau.lt header.i=@triplefau.lt header.b=mqN4wt1+; arc=none smtp.client-ip=103.2.141.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=triplefau.lt Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=em510616.triplefau.lt Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="unknown key version" (0-bit key) header.d=smtpservice.net header.i=@smtpservice.net header.b="rG+YUN+I"; dkim=pass (2048-bit key) header.d=triplefau.lt header.i=@triplefau.lt header.b="mqN4wt1+" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=maxzs0.a1-4.dyn; x=1769181702; h=Feedback-ID: X-Smtpcorp-Track:Message-ID:Date:Subject:To:From:Reply-To:Sender: List-Unsubscribe:List-Unsubscribe-Post; bh=5hlZx6sa9MG8kpnxvIumfa5wATQurfzuGf1yx1tG58U=; b=rG+YUN+IFk2Uo2+3L8g0hJgppq JMvptburONsm6jssNbv8u7IBYv579sPdAFT/OZckPisjjnxPEvEJ02wD9S364vjkOYfGuSZNwlhtr +n/6+IM7ib9YXhczIHVb2NTQBYc1T3U/vFhWmEO6/gPiFTqXiZy0J4bvIwemFd1Lxc7W806z68yTD 8QduczFf14UP+bXhfn0x+miG9vWea/V2t889fRitM0z+KhmawK1blN9kDOrhuUbJADyzQiRG5iW1i kzzyxU/e9Q0uDs8RViAHdslAP2uFl96Qx4FN2I7V0a9gyLmgWUDMLGvipWSK8c0iywuJyoeipRDBc JXztn7SA==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=triplefau.lt; i=@triplefau.lt; q=dns/txt; s=s510616; t=1769180802; h=from : subject : to : message-id : date; bh=5hlZx6sa9MG8kpnxvIumfa5wATQurfzuGf1yx1tG58U=; b=mqN4wt1+1Wshvek+Cu3S5PJXQUXD9ETb9epELp+OHL+fZwoqIXCc5fzuiQpE83ERXwcQm EgsVOWjifYRZExpDVd/2Oj1xifsOHg4gyRZlm5YT3RKkM5o97XuGvq+F8pQiGoYbCwyEvD3 OjcOpWT/5GqzNiMGZ/yZq0+W6QEQI8VvCAv6PYooIr+V1b2WsAxuEr5yVoHymCiR1XOsnLB kqBK1r1rBNVHoZerXn16incK6kqf2HNAWL9sc6B/7nuh5xYUWliCm3r/UE8vvVi0qT8fCnr 4JjjBWDqa26Qr03nLosnhvCoCAsI4fG2eZNQGa4d9vQ7Jci0np7QVBJVDGzw== Received: from [10.172.233.45] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2-S2G) (envelope-from ) id 1vjIjN-TRk3Nn-Sa; Fri, 23 Jan 2026 15:05:49 +0000 Received: from [10.12.239.196] (helo=localhost) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.98.1-S2G) (envelope-from ) id 1vjIjN-AIkwcC8p21S-ImA4; Fri, 23 Jan 2026 15:05:49 +0000 From: Remi Pommarel To: Peter Zijlstra , Ingo Molnar , v9fs@lists.linux.dev Cc: Juri Lelli , Vincent Guittot , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Remi Pommarel Subject: [PATCH v2 1/2] wait: Introduce io_wait_event_killable() Date: Fri, 23 Jan 2026 15:48:07 +0100 Message-ID: <1b2870001ecd34fe6c05be2ddfefb3c798b11701.1769179462.git.repk@triplefau.lt> X-Mailer: git-send-email 2.50.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Smtpcorp-Track: mmyWQFswyAO3.GE0ELv72khhC.TP2jiQ0tFdM Feedback-ID: 510616m:510616apGKSTK:510616siuLes3UuY X-Report-Abuse: Please forward a copy of this message, including all headers, to Content-Type: text/plain; charset="utf-8" Add io_wait_event_killable(), a variant of wait_event_killable() that uses io_schedule() instead of schedule(). This is to be used in situation where waiting time is to be accounted as IO wait time. Signed-off-by: Remi Pommarel Acked-by: Peter Zijlstra (Intel) --- include/linux/wait.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/linux/wait.h b/include/linux/wait.h index f648044466d5..dce055e6add3 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -937,6 +937,21 @@ extern int do_wait_intr_irq(wait_queue_head_t *, wait_= queue_entry_t *); __ret; \ }) =20 +#define __io_wait_event_killable(wq, condition) \ + ___wait_event(wq, condition, TASK_KILLABLE, 0, 0, io_schedule()) + +/* + * wait_event_killable() - link wait_event_killable but with io_schedule() + */ +#define io_wait_event_killable(wq_head, condition) \ +({ \ + int __ret =3D 0; \ + might_sleep(); \ + if (!(condition)) \ + __ret =3D __io_wait_event_killable(wq_head, condition); \ + __ret; \ +}) + #define __wait_event_state(wq, condition, state) \ ___wait_event(wq, condition, state, 0, 0, schedule()) =20 --=20 2.50.1