mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
virtiofsd: add --thread-pool-size=NUM option
Add an option to control the size of the thread pool. Requests are now processed in parallel by default. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
28f7a3b026
commit
951b3120db
3 changed files with 10 additions and 3 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <sys/file.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define THREAD_POOL_SIZE 64
|
||||
|
||||
#define OFFSET_MAX 0x7fffffffffffffffLL
|
||||
|
||||
|
@ -2519,6 +2520,7 @@ static const struct fuse_opt fuse_ll_opts[] = {
|
|||
LL_OPTION("allow_root", deny_others, 1),
|
||||
LL_OPTION("--socket-path=%s", vu_socket_path, 0),
|
||||
LL_OPTION("--fd=%d", vu_listen_fd, 0),
|
||||
LL_OPTION("--thread-pool-size=%d", thread_pool_size, 0),
|
||||
FUSE_OPT_END
|
||||
};
|
||||
|
||||
|
@ -2537,7 +2539,9 @@ void fuse_lowlevel_help(void)
|
|||
printf(
|
||||
" -o allow_root allow access by root\n"
|
||||
" --socket-path=PATH path for the vhost-user socket\n"
|
||||
" --fd=FDNUM fd number of vhost-user socket\n");
|
||||
" --fd=FDNUM fd number of vhost-user socket\n"
|
||||
" --thread-pool-size=NUM thread pool size limit (default %d)\n",
|
||||
THREAD_POOL_SIZE);
|
||||
}
|
||||
|
||||
void fuse_session_destroy(struct fuse_session *se)
|
||||
|
@ -2591,6 +2595,7 @@ struct fuse_session *fuse_session_new(struct fuse_args *args,
|
|||
}
|
||||
se->fd = -1;
|
||||
se->vu_listen_fd = -1;
|
||||
se->thread_pool_size = THREAD_POOL_SIZE;
|
||||
se->conn.max_write = UINT_MAX;
|
||||
se->conn.max_readahead = UINT_MAX;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue