[ovs-dev] [ovsdb-server multithreading RFC 7/9] ovsdb: Add --max-num-threads commad line option

Ben Pfaff blp at ovn.org
Sat Mar 19 01:31:32 UTC 2016


On Thu, Mar 03, 2016 at 12:13:26AM -0800, Andy Zhou wrote:
> See ovsdb-server.1.in changes for details.
> 
> Signed-off-by: Andy Zhou <azhou at ovn.org>

s/commad/command/ in the title.

Thanks!

The option name --max-threads is a little shorter than --max-num-threads
and I think it is just as clear.

load_config() and save_config() exist because "ovs-appctl" can be used
to change some aspects of ovsdb-server configuration and we want to
preserve those aspects of configuration even if ovsdb-server segfaults
and the monitor automatically restarts it.  So far, n_max_threads can't
be changed at runtime, only on the command line, so I don't think
there's a need to save and load it.

Here are some style and spelling fix suggestions.  Also, please wrap the
manpage to about 80 columns.

Thanks,

Ben.

diff --git a/ovsdb/ovsdb-server.1.in b/ovsdb/ovsdb-server.1.in
index 0a06e52..197a256 100644
--- a/ovsdb/ovsdb-server.1.in
+++ b/ovsdb/ovsdb-server.1.in
@@ -95,7 +95,7 @@ This option is not supported on Windows platform.
 .
 .IP "\fB\-\-max-num-threads=\fInumber\fR"
 Ordinarily \fBovsdb\-server\fR runs without spawning additional threads. Use this option
-to increase \fBovsdb\-server\fR throughput on a multi-core server by spwaning up to \fInumber\fR
+to increase \fBovsdb\-server\fR throughput on a multi-core server by spawning up to \fInumber\fR
 of additional threads to handle incoming client connections.
 .SS "Daemon Options"
 .ds DD \
diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
index 414106a..fb882cc 100644
--- a/ovsdb/ovsdb-server.c
+++ b/ovsdb/ovsdb-server.c
@@ -1484,8 +1484,8 @@ sset_from_json(struct sset *sset, const struct json *array)
 }
 
 static void
-n_max_threads_from_json(size_t *n_max_threads, const struct json * json)
-{ 
+n_max_threads_from_json(size_t *n_max_threads, const struct json *json)
+{
     if (json && json->type == JSON_INTEGER) {
         *n_max_threads = json->u.integer;
     } else {
@@ -1493,7 +1493,6 @@ n_max_threads_from_json(size_t *n_max_threads, const struct json * json)
     }
 }
 
-
 /* Clears and replaces 'remotes' and 'dbnames' by a configuration read from
  * 'config_file', which must have been previously written by save_config(). */
 static void



More information about the dev mailing list