Re: [PATCH 6/6] sched, wait: Make the __wait_event*() interface more friendly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Hello,

On Tue, 1 Oct 2013, Oleg Nesterov wrote:

> On 10/01, Julian Anastasov wrote:
> >
> > 	Hello,
> >
> > > On Fri, Sep 27, 2013 at 06:15:07PM +0200, Peter Zijlstra wrote:
> > > > +++ b/net/netfilter/ipvs/ip_vs_sync.c
> > > > @@ -1637,12 +1637,9 @@ static int sync_thread_master(void *data
> > > >                     continue;
> > > >             }
> > > >             while (ip_vs_send_sync_msg(tinfo->sock, sb->mesg) < 0) {
> > > > -                   int ret = 0;
> > > > -
> > > > -                   __wait_event_interruptible(*sk_sleep(sk),
> > > > +                   int ret =
> > __wait_event_interruptible(*sk_sleep(sk),
> > > >                                                sock_writeable(sk) ||
> > > > -                                              kthread_should_stop(),
> > > > -                                              ret);
> > > > +                                              kthread_should_stop());
> > > >                     if (unlikely(kthread_should_stop()))
> > > >                             goto done;
> > > >             }
> > >
> > > That site seems to be ignoring the interruptible state... seems wrong.
> >
> > 	This is a kthread which ignores signals by default.
> > It terminates only with kthread_stop.
> 
> This only means that (with or without this change)
> __wait_event_interruptible() generates the dead code but this
> thread doesn't contribute to load_avg.
> 
> Anyway this patch should not makes any difference.

	Yes, your patch looks ok to me. In the past
we used ssleep() but IPVS users were confused why
IPVS threads increase the load average. So, we
switched to _interruptible calls and later the socket
polling was added.

Regards

--
Julian Anastasov <ja@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux