Jens Axboe
edafccee56
io_uring: add support for pre-mapped user IO buffers
...
If we have fixed user buffers, we can map them into the kernel when we
setup the io_uring. That avoids the need to do get_user_pages() for
each and every IO.
To utilize this feature, the application must call io_uring_register()
after having setup an io_uring instance, passing in
IORING_REGISTER_BUFFERS as the opcode. The argument must be a pointer to
an iovec array, and the nr_args should contain how many iovecs the
application wishes to map.
If successful, these buffers are now mapped into the kernel, eligible
for IO. To use these fixed buffers, the application must use the
IORING_OP_READ_FIXED and IORING_OP_WRITE_FIXED opcodes, and then
set sqe->index to the desired buffer index. sqe->addr..sqe->addr+seq->len
must point to somewhere inside the indexed buffer.
The application may register buffers throughout the lifetime of the
io_uring instance. It can call io_uring_register() with
IORING_UNREGISTER_BUFFERS as the opcode to unregister the current set of
buffers, and then register a new set. The application need not
unregister buffers explicitly before shutting down the io_uring
instance.
It's perfectly valid to setup a larger buffer, and then sometimes only
use parts of it for an IO. As long as the range is within the originally
mapped region, it will work just fine.
For now, buffers must not be file backed. If file backed buffers are
passed in, the registration will fail with -1/EOPNOTSUPP. This
restriction may be relaxed in the future.
RLIMIT_MEMLOCK is used to check how much memory we can pin. A somewhat
arbitrary 1G per buffer size is also imposed.
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2019-02-28 08:24:23 -07:00
..
9p
adfs
affs
afs
afs: Fix race in async call refcounting
2019-01-17 15:17:28 +00:00
autofs
autofs: fix error return in autofs_fill_super()
2019-02-01 15:46:24 -08:00
befs
bfs
bfs: extra sanity checking and static inode bitmap
2019-01-04 13:13:47 -08:00
btrfs
Linux 5.0-rc6
2019-02-15 08:43:59 -07:00
cachefiles
fscache, cachefiles: remove redundant variable 'cache'
2018-11-30 16:00:58 +00:00
ceph
ceph: quota: cleanup license mess
2019-01-21 14:53:23 +01:00
cifs
cifs: update internal module version number
2019-01-31 07:05:06 -06:00
coda
configfs
cramfs
crypto
block: allow bio_for_each_segment_all() to iterate over multi-page bvec
2019-02-15 08:40:11 -07:00
debugfs
debugfs: debugfs_lookup() should return NULL if not found
2019-01-30 12:39:49 +01:00
devpts
dlm
dlm: fix invalid cluster name warning
2018-12-03 15:30:24 -06:00
ecryptfs
efivarfs
efs
exofs
block: allow bio_for_each_segment_all() to iterate over multi-page bvec
2019-02-15 08:40:11 -07:00
exportfs
exportfs: do not read dentry after free
2018-11-23 09:08:17 -05:00
ext2
\n
2018-12-27 17:00:35 -08:00
ext4
block: allow bio_for_each_segment_all() to iterate over multi-page bvec
2019-02-15 08:40:11 -07:00
f2fs
block: allow bio_for_each_segment_all() to iterate over multi-page bvec
2019-02-15 08:40:11 -07:00
fat
Merge branch 'akpm' (patches from Andrew)
2019-01-05 09:16:18 -08:00
freevxfs
fscache
fscache: fix race between enablement and dropping of object
2018-11-30 15:57:31 +00:00
fuse
fuse: decrement NR_WRITEBACK_TEMP on the right page
2019-01-16 10:27:59 +01:00
gfs2
iomap: wire up the iopoll method
2019-02-24 08:20:17 -07:00
hfs
hfs: do not free node before using
2018-11-30 14:56:14 -08:00
hfsplus
hfsplus: return file attributes on statx
2019-01-04 13:13:47 -08:00
hostfs
hpfs
hugetlbfs
hugetlbfs: revert "Use i_mmap_rwsem to fix page fault/truncate race"
2019-01-08 17:15:11 -08:00
isofs
jbd2
jbd2: clean up indentation issue, replace spaces with tab
2018-12-04 00:20:10 -05:00
jffs2
jffs2: Fix use of uninitialized delayed_work, lockdep breakage
2018-12-02 09:20:34 +01:00
jfs
kernfs
kernfs: Improve kernfs_notify() poll notification latency
2018-11-27 11:59:33 +01:00
lockd
NFS client updates for Linux 4.21
2019-01-02 16:35:23 -08:00
minix
nfs
NFS: Fix up return value on fatal errors in nfs_page_async_flush()
2019-01-29 16:33:24 -05:00
nfs_common
nfsd
nfsd: Fix error return values for nfsd4_clone_file_range()
2019-02-06 15:32:05 -05:00
nilfs2
nilfs2: Use xa_erase_irq
2018-11-05 14:57:05 -05:00
nls
notify
inotify: Fix fd refcount leak in inotify_add_watch().
2019-01-02 18:28:37 +01:00
ntfs
mm: convert totalram_pages and totalhigh_pages variables to atomic
2018-12-28 12:11:47 -08:00
ocfs2
Merge branch 'akpm' (patches from Andrew)
2019-01-05 09:16:18 -08:00
omfs
openpromfs
fs/openpromfs: Use of_node_name_eq for node name comparisons
2018-11-18 13:35:19 -08:00
orangefs
fs: don't open code lru_to_page()
2019-01-04 13:13:48 -08:00
overlayfs
Revert "ovl: relax permission checking on underlying layers"
2018-12-04 11:31:30 +01:00
proc
proc: fix /proc/net/* after setns(2)
2019-02-01 15:46:22 -08:00
pstore
pstore/ram: Avoid allocation and leak of platform data
2019-01-20 14:44:52 -08:00
qnx4
qnx6
quota
quota: Lock s_umount in exclusive mode for Q_XQUOTA{ON,OFF} quotactls.
2018-12-18 18:29:15 +01:00
ramfs
reiserfs
romfs
squashfs
sysfs
sysfs: convert BUG_ON to WARN_ON
2019-01-07 08:53:32 +01:00
sysv
sysv: return 'err' instead of 0 in __sysv_write_inode
2018-11-10 08:02:40 -05:00
tracefs
ubifs
mm: migrate: drop unused argument of migrate_page_move_mapping()
2018-12-28 12:11:51 -08:00
udf
\n
2018-12-27 17:00:35 -08:00
ufs
xfs
iomap: wire up the iopoll method
2019-02-24 08:20:17 -07:00
aio.c
aio: initialize kiocb private in case any filesystems expect it.
2019-02-06 08:04:22 -07:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
Remove 'type' argument from access_ok() function
2019-01-03 18:57:57 -08:00
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
exec: load_script: don't blindly truncate shebang string
2019-01-04 13:13:47 -08:00
block_dev.c
block: add bio_set_polled() helper
2019-02-24 08:20:17 -07:00
buffer.c
Linux 5.0-rc6
2019-02-15 08:43:59 -07:00
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c
coredump.c
d_path.c
dax.c
dax fix 4.21
2018-12-31 09:46:39 -08:00
dcache.c
fs/dcache: Track & report number of negative dentries
2019-01-30 11:02:11 -08:00
dcookies.c
direct-io.c
block: allow bio_for_each_segment_all() to iterate over multi-page bvec
2019-02-15 08:40:11 -07:00
drop_caches.c
fs/drop_caches.c: avoid softlockups in drop_pagecache_sb()
2019-02-01 15:46:24 -08:00
eventfd.c
eventpoll.c
Merge branch 'akpm' (patches from Andrew)
2019-01-05 09:16:18 -08:00
exec.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2019-01-05 13:18:59 -08:00
fcntl.c
fhandle.c
file.c
fs: add fget_many() and fput_many()
2019-02-28 08:24:23 -07:00
file_table.c
fs: add fget_many() and fput_many()
2019-02-28 08:24:23 -07:00
filesystems.c
fs-writeback.c
writeback: synchronize sync(2) against cgroup writeback membership switches
2019-01-22 14:39:38 -07:00
fs_pin.c
fs_struct.c
inode.c
y2038: more syscalls and cleanups
2018-12-28 12:45:04 -08:00
internal.h
io_uring.c
io_uring: add support for pre-mapped user IO buffers
2019-02-28 08:24:23 -07:00
ioctl.c
Remove 'type' argument from access_ok() function
2019-01-03 18:57:57 -08:00
iomap.c
iomap: wire up the iopoll method
2019-02-24 08:20:17 -07:00
Kconfig
Kconfig.binfmt
libfs.c
locks.c
locks: fix error in locks_move_blocks()
2019-01-02 20:14:50 -05:00
Makefile
Add io_uring IO interface
2019-02-28 08:24:23 -07:00
mbcache.c
mount.h
mpage.c
block: allow bio_for_each_segment_all() to iterate over multi-page bvec
2019-02-15 08:40:11 -07:00
namei.c
Revert "vfs: Allow userns root to call mknod on owned filesystems."
2018-12-22 14:18:34 -08:00
namespace.c
Merge branch 'mount.part1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
2019-01-05 13:25:58 -08:00
no-block.c
nsfs.c
open.c
pipe.c
pnode.c
vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled
2018-12-20 16:32:56 +00:00
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
Remove 'type' argument from access_ok() function
2019-01-03 18:57:57 -08:00
readdir.c
Remove 'type' argument from access_ok() function
2019-01-03 18:57:57 -08:00
select.c
Remove 'type' argument from access_ok() function
2019-01-03 18:57:57 -08:00
seq_file.c
signalfd.c
splice.c
splice: don't read more than available pipe space
2018-12-04 08:50:49 -08:00
stack.c
stat.c
statfs.c
super.c
mount_fs: suppress MAC on MS_SUBMOUNT as well as MS_KERNMOUNT
2018-12-21 11:51:23 -05:00
sync.c
timerfd.c
userfaultfd.c
userfaultfd: clear flag if remap event not enabled
2018-12-28 12:11:51 -08:00
utimes.c
xattr.c