Displaying 17 results from an estimated 17 matches for "default_parallel_requests".
2017 Nov 17
0
[nbdkit PATCH 6/6] Add --threads option for supporting true parallel requests
...static int64_t
diff --git a/src/connections.c b/src/connections.c
index 5257032..2d184b0 100644
--- a/src/connections.c
+++ b/src/connections.c
@@ -59,6 +59,9 @@
/* Maximum length of any option data (bytes). */
#define MAX_OPTION_LENGTH 4096
+/* Default number of parallel requests. */
+#define DEFAULT_PARALLEL_REQUESTS 16
+
/* Connection structure. */
struct connection {
pthread_mutex_t request_lock;
@@ -203,9 +206,11 @@ _handle_single_connection (int sockin, int sockout)
{
int r = -1;
struct connection *conn;
- int nworkers = 1; /* TODO default to 16 for parallel plugins, with command-line override...
2018 Jan 17
0
[PATCH 1/9] plugins: Move locking to a new file.
...rnal.h \
+ locks.c \
main.c \
plugins.c \
protocol.h \
diff --git a/src/connections.c b/src/connections.c
index 111a810..74bb8e4 100644
--- a/src/connections.c
+++ b/src/connections.c
@@ -211,7 +211,7 @@ _handle_single_connection (int sockin, int sockout)
int nworkers = threads ? threads : DEFAULT_PARALLEL_REQUESTS;
pthread_t *workers = NULL;
- if (!plugin_is_parallel() || nworkers == 1)
+ if (plugin_thread_model () < NBDKIT_THREAD_MODEL_PARALLEL || nworkers == 1)
nworkers = 0;
conn = new_connection (sockin, sockout, nworkers);
if (!conn)
@@ -287,9 +287,9 @@ handle_single_connection (int...
2018 Jan 16
0
[PATCH nbdkit 1/3] plugins: Move locking to a new file.
...rnal.h \
+ locks.c \
main.c \
plugins.c \
protocol.h \
diff --git a/src/connections.c b/src/connections.c
index 111a810..74bb8e4 100644
--- a/src/connections.c
+++ b/src/connections.c
@@ -211,7 +211,7 @@ _handle_single_connection (int sockin, int sockout)
int nworkers = threads ? threads : DEFAULT_PARALLEL_REQUESTS;
pthread_t *workers = NULL;
- if (!plugin_is_parallel() || nworkers == 1)
+ if (plugin_thread_model () < NBDKIT_THREAD_MODEL_PARALLEL || nworkers == 1)
nworkers = 0;
conn = new_connection (sockin, sockout, nworkers);
if (!conn)
@@ -287,9 +287,9 @@ handle_single_connection (int...
2019 Nov 04
3
[PATCH nbdkit 0/3] server: Fix crash on close.
This fixes the long-standing crash on close when nbdkit exits.
I did try first to fix threads so we're using a proper thread pool,
but that's difficult to implement. So this does the minimal change
needed to fix the crash instead.
There are still two segfaults that happen during running the test
suite. One is deliberately caused (tests/test-captive.sh). The other
appears to be an
2018 Apr 12
3
[PATCH nbdkit 0/2] connections: Protect open and close callbacks with the request lock.
I'm fairly sure that these bugs which appear in the Python plugin:
https://bugzilla.redhat.com/show_bug.cgi?id=1566516
https://bugzilla.redhat.com/show_bug.cgi?id=1566522
are really bugs in the SERIALIZE_ALL_REQUESTS thread model. See
the first patch for the full explanation.
The second patch is a fix for a race condition which is probably
nudged into being by the first patch.
Now this
2017 Nov 17
8
[RFC nbdkit PATCH 0/6] Enable full parallel request handling
I want to make my nbd forwarding plugin fully parallel - but to do
that, I first need to make nbdkit itself fully parallel ;)
With this series, I was finally able to demonstrate out-of-order
responses when using qemu-io (which is great at sending back-to-back
requests prior to waiting for responses) coupled with the nbd file
plugin (which has a great feature of rdelay and wdelay, to make
it
2018 Jan 16
4
[PATCH nbdkit v2 2/3] Refactor plugin_* functions into a backend
v1 -> v2:
- Fixed everything mentioned in the review.
Rich.
2018 Jan 16
6
[PATCH nbdkit 0/3] Refactor plugin_* functions into a backend struct.
Somewhat invasive but mostly mechanical change to how plugins are
called. This patch is in preparation for adding a second backend
subtype for filters.
Rich.
2017 Nov 20
10
[nbdkit PATCH v2 0/8] Support parallel transactions within single connection
I've posted some of these patches or ideas before; but now I'm
confident enough with the series that it should be ready to push;
at any rate, I can now run test-socket-activation in a tight loop
without triggering any crashes or hangs.
With this in place, I'm going back to work on making the nbd
forwarder wort with the parallel thread model.
Eric Blake (8):
sockets: Use
2019 Aug 03
5
[nbdkit PATCH 0/3] More responsive shutdown
We noticed while writing various libnbd tests that when the delay
filter is in use, there are scenarios where we had to resort to
SIGKILL to get rid of nbdkit, because it was non-responsive to SIGINT.
I'm still trying to figure out the best way to add testsuite coverage
of this, but already proved to myself that it works from the command
line, under two scenarios that both used to cause long
2018 Jan 16
0
[PATCH nbdkit 2/3] Refactor plugin_* functions into a backend struct.
...---
5 files changed, 360 insertions(+), 291 deletions(-)
diff --git a/src/connections.c b/src/connections.c
index 74bb8e4..921a5b2 100644
--- a/src/connections.c
+++ b/src/connections.c
@@ -211,16 +211,17 @@ _handle_single_connection (int sockin, int sockout)
int nworkers = threads ? threads : DEFAULT_PARALLEL_REQUESTS;
pthread_t *workers = NULL;
- if (plugin_thread_model () < NBDKIT_THREAD_MODEL_PARALLEL || nworkers == 1)
+ if (backend->thread_model (backend) < NBDKIT_THREAD_MODEL_PARALLEL ||
+ nworkers == 1)
nworkers = 0;
conn = new_connection (sockin, sockout, nworkers);
if (!co...
2018 Jan 17
0
[PATCH 2/9] Refactor plugin_* functions into a backend struct.
...---
5 files changed, 368 insertions(+), 295 deletions(-)
diff --git a/src/connections.c b/src/connections.c
index 74bb8e4..921a5b2 100644
--- a/src/connections.c
+++ b/src/connections.c
@@ -211,16 +211,17 @@ _handle_single_connection (int sockin, int sockout)
int nworkers = threads ? threads : DEFAULT_PARALLEL_REQUESTS;
pthread_t *workers = NULL;
- if (plugin_thread_model () < NBDKIT_THREAD_MODEL_PARALLEL || nworkers == 1)
+ if (backend->thread_model (backend) < NBDKIT_THREAD_MODEL_PARALLEL ||
+ nworkers == 1)
nworkers = 0;
conn = new_connection (sockin, sockout, nworkers);
if (!co...
2018 Jan 16
0
[PATCH nbdkit v2 2/3] Refactor plugin_* functions into a backend struct.
...---
5 files changed, 367 insertions(+), 294 deletions(-)
diff --git a/src/connections.c b/src/connections.c
index 74bb8e4..921a5b2 100644
--- a/src/connections.c
+++ b/src/connections.c
@@ -211,16 +211,17 @@ _handle_single_connection (int sockin, int sockout)
int nworkers = threads ? threads : DEFAULT_PARALLEL_REQUESTS;
pthread_t *workers = NULL;
- if (plugin_thread_model () < NBDKIT_THREAD_MODEL_PARALLEL || nworkers == 1)
+ if (backend->thread_model (backend) < NBDKIT_THREAD_MODEL_PARALLEL ||
+ nworkers == 1)
nworkers = 0;
conn = new_connection (sockin, sockout, nworkers);
if (!co...
2019 Mar 18
3
[PATCH nbdkit 0/2] server: Split out NBD protocol code from connections code.
These are a couple of patches in preparation for the Block Status
implementation. While the patches (especially the second one) are
very large they are really just elementary code motion.
Rich.
2019 Mar 18
0
[PATCH nbdkit 2/2] server: Split out NBD protocol code from connections code.
...we will handle. */
-#define MAX_REQUEST_SIZE (64 * 1024 * 1024)
-
-/* Maximum number of client options we allow before giving up. */
-#define MAX_NR_OPTIONS 32
-
-/* Maximum length of any option data (bytes). */
-#define MAX_OPTION_LENGTH 4096
/* Default number of parallel requests. */
#define DEFAULT_PARALLEL_REQUESTS 16
@@ -65,8 +48,6 @@
static struct connection *new_connection (int sockin, int sockout,
int nworkers);
static void free_connection (struct connection *conn);
-static int negotiate_handshake (struct connection *conn);
-static int recv_request_send_reply (...
2018 Jan 17
14
[PATCH 0/9] Add filters to nbdkit.
The first three patches are identical to:
https://www.redhat.com/archives/libguestfs/2018-January/msg00079.html
"[PATCH nbdkit v2 0/3] Refactor plugin_* functions into a backend"
The rest of the patches add filters using the new filter API
previously described here:
https://www.redhat.com/archives/libguestfs/2018-January/msg00073.html
This needs a lot more testing -- and tests --
2018 Jan 19
16
[nbdkit PATCH v2 00/13] Add filters + FUA support to nbdkit
A combination of the work that both Rich and I have been doing
lately, where filters use only the new API with flags on every
command that the client can send over the wire (we can then
add support for more flags in nbdkit without having to add new
callbacks, as NBD adds more flags upstream).
Eric Blake (4):
protocol: Split flags from cmd field in requests
backend: Pass flags argument through