1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

27 Commits

Author SHA1 Message Date
Volker Lendecke
c5d07df6ab pthreadpool: Allow multiple jobs to be received
This can avoid syscalls when multiple jobs are finished simultaneously

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-27 06:06:11 +01:00
Stefan Metzmacher
64145e7958 s3:modules: s/event_add_fd/tevent_add_fd and s/EVENT_FD_/TEVENT_FD_
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:48:00 +01:00
Stefan Metzmacher
9ececaae5c s3:modules: s/struct fd_event/struct tevent_fd
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:59 +01:00
Stefan Metzmacher
00b1ef8853 s3:modules: s/struct event_context/struct tevent_context
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:53 +01:00
Volker Lendecke
c4efaabbd9 s3: Move the aio_pthread read/write functionality to vfs_default
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:46:29 -07:00
Volker Lendecke
715653a335 s3:vfs_aio_pthread: Convert to libasys
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:40:01 -07:00
Jeremy Allison
5a9ce8b94a Use HAVE_FSYNC, we bothered to test for it.
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 13 04:44:42 CEST 2012 on sn-devel-104
2012-07-13 04:44:42 +02:00
Jeremy Allison
e454681276 Linux-specific optimization in aio_open code.
Use initial_allocation_size to allocate on disk if sent. Ignore
failures (upper level will cope).

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 13 00:35:48 CEST 2012 on sn-devel-104
2012-07-13 00:35:47 +02:00
Jeremy Allison
cb405947ca Add an optimization to pthread aio writes to also do fsync if requested.
Should help by ensuring complete writes done in sub-thread, not in
the main thread.
2012-07-12 22:46:07 +02:00
Jeremy Allison
8ee30be431 Add in the threaded async open engine.
Fixes all issues raised originally. This code
will only do threaded opens with thread-specific
credentials (Linux for now) and changes credentials
before doing the call. Also only fires on O_CREAT|O_EXCL
so will only create new files, never open old ones
async.

Volker, this is isolated enough that it shouldn't
prevent you from refactoring it into a new module
when the aio pread/pwrite code is moved into the
default aio path.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul 11 08:04:56 CEST 2012 on sn-devel-104
2012-07-11 08:04:56 +02:00
Jeremy Allison
ed8525265d Allow init_aio_threadpool() to be setup for different threadpool handles with different completion functions. 2012-07-03 15:34:22 -07:00
Volker Lendecke
754b925ccd s3: Fix a typo
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jun 25 17:13:59 CEST 2012 on sn-devel-104
2012-06-25 17:13:59 +02:00
Volker Lendecke
c0936663a8 s3: Avoid a call to server_event_context()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-25 15:28:16 +02:00
Jeremy Allison
fd38486364 Fix return_fn when aio was cancelled. We need to return -1, errno = ECANCELED. 2012-04-12 15:06:59 -07:00
Jeremy Allison
e02a788f60 Simplify the logic around doing an immediate event reschedule.
We don't need to do a talloc here, we already have a long-lived
pointer we can pass in as the private data.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Apr 11 08:05:47 CEST 2012 on sn-devel-104
2012-04-11 08:05:47 +02:00
Volker Lendecke
5f3ac4d6c4 s3: Initialize aio_pending_size from aio_pthread 2012-04-09 18:05:01 +02:00
Jeremy Allison
1ca4df58c7 Use sys_pread/sys_pwrite to cope correctly with 64-bit sizes. As in the default VFS case fall back from pread -> read and pwrite -> write on an ESPIPE error in the worker thread.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jan 26 02:11:28 CET 2012 on sn-devel-104
2012-01-26 02:11:28 +01:00
Volker Lendecke
851b2c1774 s3: Fix a panic in aio_pthread
Found by Nir Drang <nir@fabrix.tv>

Thanks!

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jan 25 18:22:37 CET 2012 on sn-devel-104
2012-01-25 18:22:37 +01:00
Volker Lendecke
6d14128242 s3-aio-pthread: num threads should be int
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jan 18 21:04:20 CET 2012 on sn-devel-104
2012-01-18 21:04:20 +01:00
Jeremy Allison
ddc1f3df51 Ensure we always free aio_ex on all error paths by moving the TALLOC_FREE
call out of smbd_aio_complete_aio_ex() and into the caller.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jan 12 03:10:52 CET 2012 on sn-devel-104
2012-01-12 03:10:52 +01:00
Volker Lendecke
a8441f933e s3-aio_pthread: Fix the build
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jan 10 11:54:01 CET 2012 on sn-devel-104
2012-01-10 11:54:01 +01:00
Volker Lendecke
eae9c74794 s3-aio_pthread: Make "pd_list" static 2012-01-10 10:21:44 +01:00
Jeremy Allison
b8b98b8908 Remove the commented out code. 2012-01-06 14:56:36 -08:00
Jeremy Allison
12bef84607 Add "aio num threads" parameter to allow manual configuration of
threads via smb.conf if required. Ignore the number of cores. See
comments inline.
2012-01-06 14:55:03 -08:00
Jeremy Allison
e8a7d9c822 Add a sys_get_number_of_cores() function that calls sysconf or sysctl
and tunes the aio threads.
2012-01-06 02:42:25 +01:00
Jeremy Allison
5a8c88124b Add some debug to vfs_aio_pthread so I can see when jobs start and stop.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jan  5 20:28:00 CET 2012 on sn-devel-104
2012-01-05 20:28:00 +01:00
Jeremy Allison
3a18a42d13 Add S3 vfs_aio_pthread module to replace broken glibc aio code.
Compiles but not yet tested.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jan  5 01:43:51 CET 2012 on sn-devel-104
2012-01-05 01:43:51 +01:00