[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 25/26] virtiofsd: Used glib "shared" thread pool
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 25/26] virtiofsd: Used glib "shared" thread pool |
Date: |
Fri, 25 Sep 2020 13:06:54 +0100 |
From: Vivek Goyal <vgoyal@redhat.com>
glib offers thread pools and it seems to support "exclusive" and "shared"
thread pools.
https://developer.gnome.org/glib/stable/glib-Thread-Pools.html#g-thread-pool-new
Currently we use "exlusive" thread pools but its performance seems to be
poor. I tried using "shared" thread pools and performance seems much
better. I posted performance results here.
https://www.redhat.com/archives/virtio-fs/2020-September/msg00080.html
So lets switch to shared thread pools. We can think of making it optional
once somebody can show in what cases exclusive thread pools offer better
results. For now, my simple performance tests across the board see
better results with shared thread pools.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20200921213216.GE13362@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
With seccomp fix from Miklos
---
tools/virtiofsd/fuse_virtio.c | 2 +-
tools/virtiofsd/passthrough_seccomp.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c
index 9e5537506c..d5c8e98253 100644
--- a/tools/virtiofsd/fuse_virtio.c
+++ b/tools/virtiofsd/fuse_virtio.c
@@ -588,7 +588,7 @@ static void *fv_queue_thread(void *opaque)
struct fuse_session *se = qi->virtio_dev->se;
GThreadPool *pool;
- pool = g_thread_pool_new(fv_queue_worker, qi, se->thread_pool_size, TRUE,
+ pool = g_thread_pool_new(fv_queue_worker, qi, se->thread_pool_size, FALSE,
NULL);
if (!pool) {
fuse_log(FUSE_LOG_ERR, "%s: g_thread_pool_new failed\n", __func__);
diff --git a/tools/virtiofsd/passthrough_seccomp.c
b/tools/virtiofsd/passthrough_seccomp.c
index 19fee60011..eb9af8265f 100644
--- a/tools/virtiofsd/passthrough_seccomp.c
+++ b/tools/virtiofsd/passthrough_seccomp.c
@@ -93,6 +93,8 @@ static const int syscall_whitelist[] = {
SCMP_SYS(rt_sigaction),
SCMP_SYS(rt_sigprocmask),
SCMP_SYS(rt_sigreturn),
+ SCMP_SYS(sched_getattr),
+ SCMP_SYS(sched_setattr),
SCMP_SYS(sendmsg),
SCMP_SYS(setresgid),
SCMP_SYS(setresuid),
--
2.26.2
- [PULL 14/26] migration/dirtyrate: Add trace_calls to make it easier to debug, (continued)
- [PULL 14/26] migration/dirtyrate: Add trace_calls to make it easier to debug, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 15/26] migration: Truncate state file in xen-save-devices-state, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 16/26] migration: increase max-bandwidth to 128 MiB/s (1 Gib/s), Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 17/26] migration/tls: save hostname into MigrationState, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 18/26] migration/tls: extract migration_tls_client_create for common-use, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 19/26] migration/tls: add tls_hostname into MultiFDSendParams, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 20/26] migration/tls: extract cleanup function for common-use, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 21/26] migration/tls: add support for multifd tls-handshake, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 22/26] migration/tls: add trace points for multifd-tls, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 24/26] virtiofsd: document cache=auto default, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 25/26] virtiofsd: Used glib "shared" thread pool,
Dr. David Alan Gilbert (git) <=
- [PULL 26/26] virtiofsd: Add -o allow_direct_io|no_allow_direct_io options, Dr. David Alan Gilbert (git), 2020/09/25
- [PULL 23/26] monitor: Use LOCK_GUARD macros, Dr. David Alan Gilbert (git), 2020/09/25
- Re: [PULL 00/26] migration and friends queue, no-reply, 2020/09/25
- Re: [PULL 00/26] migration and friends queue, Peter Maydell, 2020/09/25