mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] splice: add direct fd <-> fd splicing support
It's more efficient for sendfile() emulation. Basically we cache an internal private pipe and just use that as the intermediate area for pages. Direct splicing is not available from sys_splice(), it is only meant to be used for sendfile() emulation. Additional patch from Ingo Molnar to avoid the PIPE_BUFFERS loop at exit for the normal fast path. Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
parent
529565dcb1
commit
b92ce55893
6 changed files with 150 additions and 21 deletions
|
@ -684,6 +684,7 @@ static inline void prefetch_stack(struct task_struct *t) { }
|
|||
|
||||
struct audit_context; /* See audit.c */
|
||||
struct mempolicy;
|
||||
struct pipe_inode_info;
|
||||
|
||||
enum sleep_type {
|
||||
SLEEP_NORMAL,
|
||||
|
@ -882,6 +883,11 @@ struct task_struct {
|
|||
|
||||
atomic_t fs_excl; /* holding fs exclusive resources */
|
||||
struct rcu_head rcu;
|
||||
|
||||
/*
|
||||
* cache last used pipe for splice
|
||||
*/
|
||||
struct pipe_inode_info *splice_pipe;
|
||||
};
|
||||
|
||||
static inline pid_t process_group(struct task_struct *tsk)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue