diff options
author | Oleg Nesterov <oleg@redhat.com> | 2025-01-02 17:07:15 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-01-04 12:12:19 +0300 |
commit | aaec5a95d59615523db03dd53c2052f0a87beea7 (patch) | |
tree | c8cf207921c738061065f0b7f3669eeef7263362 /tools/perf/scripts/python/task-analyzer.py | |
parent | d2fc0ed52a284a13a16c914bc83b0b8733f55a4a (diff) | |
download | linux-aaec5a95d59615523db03dd53c2052f0a87beea7.tar.xz |
pipe_read: don't wake up the writer if the pipe is still full
wake_up(pipe->wr_wait) makes no sense if pipe_full() is still true after
the reading, the writer sleeping in wait_event(wr_wait, pipe_writable())
will check the pipe_writable() == !pipe_full() condition and sleep again.
Only wake the writer if we actually released a pipe buf, and the pipe was
full before we did so.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/all/20241229135737.GA3293@redhat.com/
Link: https://lore.kernel.org/r/20250102140715.GA7091@redhat.com
Reported-by: WangYuli <wangyuli@uniontech.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions