Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2016-04-14 Thread Peter Zijlstra
On Tue, Sep 02, 2014 at 02:31:53PM +0800, Jason Wang wrote: > Yes, but current code can not do this. In most of the cases, the new > woke up process have no chance to run if another process is busy loop in > the same cpu. That sounds weird; a process that slept will have an effective vruntime defi

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2016-04-14 Thread Peter Zijlstra
On Wed, Apr 13, 2016 at 04:51:36PM +0300, Michael S. Tsirkin wrote: > On Wed, Apr 13, 2016 at 03:28:03PM +0200, Peter Zijlstra wrote: > > Nope, not true. Current isn't actually in the tree, and any other task > > is subject to being moved at any time. > > Even if current was in the tree, there is

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2016-04-13 Thread Michael S. Tsirkin
On Wed, Apr 13, 2016 at 03:28:03PM +0200, Peter Zijlstra wrote: > On Mon, Apr 11, 2016 at 07:31:57PM +0300, Michael S. Tsirkin wrote: > > +static bool expected_to_run_fair(struct cfs_rq *cfs_rq, s64 t) > > +{ > > + struct sched_entity *left; > > + struct sched_entity *curr = cfs_rq->cur

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2016-04-13 Thread Peter Zijlstra
On Mon, Apr 11, 2016 at 07:31:57PM +0300, Michael S. Tsirkin wrote: > +static bool expected_to_run_fair(struct cfs_rq *cfs_rq, s64 t) > +{ > + struct sched_entity *left; > + struct sched_entity *curr = cfs_rq->curr; > + > + if (!curr || !curr->on_rq) > + return false

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2016-04-13 Thread Ingo Molnar
* Michael S. Tsirkin wrote: > On Fri, Aug 22, 2014 at 09:36:53AM +0200, Ingo Molnar wrote: > > > > > > diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h > > > > index 1d67fb6..8a33fb2 100644 > > > > --- a/include/net/busy_poll.h > > > > +++ b/include/net/busy_poll.h > > > > @@ -109

Re: [PATCH net-next 2/2] net: exit busy loop when another process is runnable

2016-04-11 Thread Michael S. Tsirkin
On Fri, Aug 22, 2014 at 09:36:53AM +0200, Ingo Molnar wrote: > > > > diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h > > > index 1d67fb6..8a33fb2 100644 > > > --- a/include/net/busy_poll.h > > > +++ b/include/net/busy_poll.h > > > @@ -109,7 +109,8 @@ static inline bool sk_busy_loop(