1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

s3:modules: add vfs_io_uring module

The module makes use of the new io_uring infrastructure
(intruduced in linux 5.1), see https://lwn.net/Articles/778411/ and
http://git.kernel.dk/cgit/liburing/

Currently this only implements SMB_VFS_{PREAD,PWRITE,FSYNC}_SEND/RECV
and avoids the overhead of our userspace threadpool.

In future we'll hopefully make more use of more advanced io_uring
features.

For now we don't have automated tests as our test infrastructure
doesn't use a recent kernel. At least we're able to do compile tests
on fedora31.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Feb 15 11:37:45 UTC 2020 on sn-devel-184
This commit is contained in:
Stefan Metzmacher
2019-06-05 17:01:49 +02:00
parent fb5a99fa02
commit 195e88cea3
5 changed files with 670 additions and 0 deletions

View File

@ -1754,6 +1754,14 @@ main() {
and conf.CHECK_LIB('dbus-1', shlib=True)):
conf.DEFINE('HAVE_DBUS', '1')
if conf.CHECK_CFG(package='liburing', args='--cflags --libs',
msg='Checking for liburing package', uselib_store="URING"):
if (conf.CHECK_HEADERS('liburing.h', lib='uring')
and conf.CHECK_LIB('uring', shlib=True)):
conf.CHECK_FUNCS_IN('io_uring_ring_dontfork', 'uring',
headers='liburing.h')
conf.DEFINE('HAVE_LIBURING', '1')
conf.env.build_regedit = False
if not Options.options.with_regedit == False:
conf.PROCESS_SEPARATE_RULE('system_ncurses')
@ -1932,6 +1940,9 @@ main() {
if (conf.CONFIG_SET('HAVE_STRUCT_MSGHDR_MSG_CONTROL') or conf.CONFIG_SET('HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS')):
default_shared_modules.extend(TO_LIST('vfs_aio_fork'))
if conf.CONFIG_SET('HAVE_LIBURING'):
default_shared_modules.extend(TO_LIST('vfs_io_uring'))
if Options.options.with_pthreadpool:
default_shared_modules.extend(TO_LIST('vfs_aio_pthread'))