[sheepdog] [PATCH v3 1/3] sheep: allow {register, unregister}_event to be called in worker thread

Liu Yuan namei.unix at gmail.com
Tue Dec 17 09:48:11 CET 2013


On Tue, Dec 17, 2013 at 05:34:44PM +0900, Hitoshi Mitake wrote:
> At Tue, 17 Dec 2013 16:29:43 +0800,
> Liu Yuan wrote:
> > 
> > For now we can only call them in the main thread, which is designed for long
> > running or infrequent events. This would be inefficient if we want to deal with
> > short running and frequent events that register/unregister the events in the
> > worker thread
> > 
> > 1. avoid to be trapped to main thread for performance
> > 2. make sure registeration is done before some other events.
> > 
> > This doesn't mean we can manipulate the same event with multiple threads
> > simultaneously, instead we still adhere to the assumpioin that
> > 
> > - one event will only be manipluated by a single entity.
> > 
> > Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> > ---
> >  include/event.h      |   15 +++++++++++++++
> >  lib/event.c          |   14 ++++++++++++--
> >  shepherd/Makefile.am |    2 +-
> >  3 files changed, 28 insertions(+), 3 deletions(-)
> 
> This series looks good to me.
> Reviewed-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> 

Applied

Yuan



More information about the sheepdog mailing list