[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250730014708.1516-5-daijunbing@vivo.com>
Date: Wed, 30 Jul 2025 09:47:05 +0800
From: Dai Junbing <daijunbing@...o.com>
To: Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Jan Kara <jack@...e.cz>,
Miklos Szeredi <miklos@...redi.hu>,
"Theodore Ts'o" <tytso@....edu>,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-ext4@...r.kernel.org
Cc: opensource.kernel@...o.com,
Dai Junbing <daijunbing@...o.com>
Subject: [PATCH v1 4/5] fuse: Add TASK_FREEZABLE to device read operations
Add the TASK_FREEZABLE flag when sleeping during FUSE device read
operations. This prevents premature wakeups during system suspend/resume
cycles, avoiding unnecessary wakeup overhead and power consumption.
During sleep in the FUSE device read path, no kernel locks are held.
Therefore, adding TASK_FREEZABLE is safe.
Signed-off-by: Dai Junbing <daijunbing@...o.com>
---
fs/fuse/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index e80cd8f2c049..b3dbd113e2e2 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1418,7 +1418,7 @@ static ssize_t fuse_dev_do_read(struct fuse_dev *fud, struct file *file,
if (file->f_flags & O_NONBLOCK)
return -EAGAIN;
- err = wait_event_interruptible_exclusive(fiq->waitq,
+ err = wait_event_freezable_exclusive(fiq->waitq,
!fiq->connected || request_pending(fiq));
if (err)
return err;
--
2.25.1
Powered by blists - more mailing lists