[ovs-dev] [worker 08/12] worker: New library for breaking a daemon into multiple processes.

Ben Pfaff blp at nicira.com
Wed Jun 27 17:41:30 UTC 2012


On Tue, Jun 26, 2012 at 06:17:17PM -0700, Ethan Jackson wrote:
> Looks good to me, couple of questions.
> 
> From worker_start() it looks to me like worker_main() never exists?
> What if a user wants to ask ovs-vswitchd to exit cleanly using appctl?
>  Will the child process simply be killed?

worker_main() exits cleanly if the parent process closes the IPC
socket.  See the
        } else if (error == EOF && !rx.header.size) {
case in worker_main().  To clarify this I'm adding a comment
            /* Main process closed the IPC socket.  Exit cleanly. */
there.

> Is the fact that worker_request() can block going to cause problems
> given that we're a soft real time system?

There has to be a limit on the length of the worker process's task
queue somewhere, because if we allow it to grow without bound then it
will eventually exhaust the system's memory.  It seemed like
worker_request() was a reasonable place to put the limit, because it
allowed the client API to be simpler.

> In worker_main() we make a call to ovs_abort(), could that be a call
> to VLOG_ABORT instead?

I think so.  I made that change.

Thanks,

Ben.



More information about the dev mailing list