diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-06-14 13:53:53 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-08-08 22:37:17 -0400 |
commit | 8fad7767edcfd3f93e0d9985cb2dc1db270b8719 (patch) | |
tree | 87018b8809edaa081c98a00fd11a252b4ec685b9 /tools/perf/scripts/python/stackcollapse.py | |
parent | 47b7fcae419dc940e3fb8e58088a5b80ad813bbf (diff) |
ITER_PIPE: allocate buffers as we go in copy-to-pipe primitives
New helper: append_pipe(). Extends the last buffer if possible,
allocates a new one otherwise. Returns page and offset in it
on success, NULL on failure. iov_iter is advanced past the
data we've got.
Use that instead of push_pipe() in copy-to-pipe primitives;
they get simpler that way. Handling of short copy (in "mc" one)
is done simply by iov_iter_revert() - iov_iter is in consistent
state after that one, so we can use that.
[Fix for braino caught by Liu Xinpeng <liuxp11@chinatelecom.cn> folded in]
[another braino fix, this time in copy_pipe_to_iter() and pipe_zero();
caught by testcase from Hugh Dickins]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions