[ovs-dev] [PATCH 2/2] ofproto-dpif-upcall: Give each miss_handler thread a unique name.
Ben Pfaff
blp at nicira.com
Tue Sep 17 17:02:53 UTC 2013
OK, done.
I reposted the series since this had been left dormant a while.
On Thu, Sep 05, 2013 at 01:49:58PM -0700, Ethan Jackson wrote:
> I think ovsthread_id_self() is the best choice. It might be nice to
> make that return the result of gettid() on linux, but I don't feel
> strongly about it.
>
> Ethan
>
> On Thu, Sep 5, 2013 at 1:05 PM, Ben Pfaff <blp at nicira.com> wrote:
> > There is at least:
> >
> > * pthread_t, which one cannot portably format in a sane way.
> >
> > * gettid(), which is Linux specific.
> >
> > * ovsthread_id_self() from ovs-thread.h.
> >
> > and I didn't know which one you meant.
> >
> > gettid() is Linux specific.
> >
> > On Thu, Sep 05, 2013 at 12:46:23PM -0700, Ethan Jackson wrote:
> >> Basically the result of gettid(). There's more than one thread ID?
> >>
> >> Ethan
> >>
> >> On Thu, Sep 5, 2013 at 12:43 PM, Ben Pfaff <blp at nicira.com> wrote:
> >> > Which thread ID do you mean?
> >> >
> >> > On Thu, Sep 05, 2013 at 10:55:26AM -0700, Ethan Jackson wrote:
> >> >> Does it make sense to use the thread ID instead? That way it'd be
> >> >> clear if some reconfiguration happens that destroys and recreates
> >> >> them.
> >> >>
> >> >> Ethan
> >> >>
> >> >> On Thu, Sep 5, 2013 at 10:38 AM, Ben Pfaff <blp at nicira.com> wrote:
> >> >> > This may occasionally make debugging easier.
> >> >> >
> >> >> > Suggested-by: Keith Amidon <keith at nicira.com>
> >> >> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> >> >> > ---
> >> >> > ofproto/ofproto-dpif-upcall.c | 3 ++-
> >> >> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >> >> >
> >> >> > diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
> >> >> > index 54f441b..1605c63 100644
> >> >> > --- a/ofproto/ofproto-dpif-upcall.c
> >> >> > +++ b/ofproto/ofproto-dpif-upcall.c
> >> >> > @@ -448,7 +448,8 @@ udpif_miss_handler(void *arg)
> >> >> > struct list misses = LIST_INITIALIZER(&misses);
> >> >> > struct handler *handler = arg;
> >> >> >
> >> >> > - set_subprogram_name("miss_handler");
> >> >> > + set_subprogram_name("miss_handler_%td",
> >> >> > + handler - handler->udpif->handlers);
> >> >> > for (;;) {
> >> >> > size_t i;
> >> >> >
> >> >> > --
> >> >> > 1.7.10.4
> >> >> >
> >> >> > _______________________________________________
> >> >> > dev mailing list
> >> >> > dev at openvswitch.org
> >> >> > http://openvswitch.org/mailman/listinfo/dev
More information about the dev
mailing list