[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250106193336.GH7233@redhat.com>
Date: Mon, 6 Jan 2025 20:33:37 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Manfred Spraul <manfred@...orfullife.com>,
Christian Brauner <brauner@...nel.org>,
David Howells <dhowells@...hat.com>,
WangYuli <wangyuli@...ontech.com>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: wakeup_pipe_readers/writers() && pipe_poll()
Damn ;)
It is amazing how much unnecessary spam I added to these discussions.
But let me ask 2 more questions, hopefully no more.
1. pipe_read() says
* But when we do wake up writers, we do so using a sync wakeup
* (WF_SYNC), because we want them to get going and generate more
* data for us.
OK, WF_SYNC makes sense if pipe_read() or pipe_write() is going to do wait_event()
after wake_up(). But wake_up_interruptible_sync_poll() looks at bit misleading if
we are going to wakeup the writer or next_reader before return.
2. I can't understand this code in pipe_write()
if (ret > 0 && sb_start_write_trylock(file_inode(filp)->i_sb)) {
int err = file_update_time(filp);
if (err)
ret = err;
sb_end_write(file_inode(filp)->i_sb);
}
- it only makes sense in the "fifo" case, right? When
i_sb->s_magic != PIPEFS_MAGIC...
- why should we propogate the error code if "ret > 0" but
file_update_time() fails?
Oleg.
Powered by blists - more mailing lists