Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-08-03 Thread Cong Wang
On Wed, Aug 1, 2018 at 10:17 AM wrote: > Yes, in practice what's actually going to happen is that the > runtime_remaining will be put to 1 by distribute, the cfs_rq will be > unthrottled, and then when it runs it will go negative immediately and > hit the negative check in expires, so expires_seq

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-08-03 Thread Cong Wang
On Wed, Aug 1, 2018 at 10:17 AM wrote: > Yes, in practice what's actually going to happen is that the > runtime_remaining will be put to 1 by distribute, the cfs_rq will be > unthrottled, and then when it runs it will go negative immediately and > hit the negative check in expires, so expires_seq

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-08-03 Thread Cong Wang
On Tue, Jul 31, 2018 at 8:24 PM Xunlei Pang wrote: > > Let's see the unthrottle cases. > 1. for the periodic timer > distribute_cfs_runtime updates the throttled cfs_rq->runtime_expires to > be a new value, so expire_cfs_rq_runtime does nothing because of: > rq_clock(rq_of(cfs_rq)) -

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-08-03 Thread Cong Wang
On Tue, Jul 31, 2018 at 8:24 PM Xunlei Pang wrote: > > Let's see the unthrottle cases. > 1. for the periodic timer > distribute_cfs_runtime updates the throttled cfs_rq->runtime_expires to > be a new value, so expire_cfs_rq_runtime does nothing because of: > rq_clock(rq_of(cfs_rq)) -

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-08-01 Thread bsegall
Cong Wang writes: > On Tue, Jul 31, 2018 at 10:13 AM wrote: >> >> Xunlei Pang writes: >> >> > On 7/31/18 1:55 AM, Cong Wang wrote: >> >> On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang >> >> wrote: >> >>> >> >>> Hi Cong, >> >>> >> >>> On 7/28/18 8:24 AM, Cong Wang wrote: >> Each time we

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-08-01 Thread bsegall
Cong Wang writes: > On Tue, Jul 31, 2018 at 10:13 AM wrote: >> >> Xunlei Pang writes: >> >> > On 7/31/18 1:55 AM, Cong Wang wrote: >> >> On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang >> >> wrote: >> >>> >> >>> Hi Cong, >> >>> >> >>> On 7/28/18 8:24 AM, Cong Wang wrote: >> Each time we

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-31 Thread Xunlei Pang
On 8/1/18 4:55 AM, Cong Wang wrote: > On Tue, Jul 31, 2018 at 10:13 AM wrote: >> >> Xunlei Pang writes: >> >>> On 7/31/18 1:55 AM, Cong Wang wrote: On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang wrote: > > Hi Cong, > > On 7/28/18 8:24 AM, Cong Wang wrote: >> Each

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-31 Thread Xunlei Pang
On 8/1/18 4:55 AM, Cong Wang wrote: > On Tue, Jul 31, 2018 at 10:13 AM wrote: >> >> Xunlei Pang writes: >> >>> On 7/31/18 1:55 AM, Cong Wang wrote: On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang wrote: > > Hi Cong, > > On 7/28/18 8:24 AM, Cong Wang wrote: >> Each

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-31 Thread Cong Wang
On Tue, Jul 31, 2018 at 10:13 AM wrote: > > Xunlei Pang writes: > > > On 7/31/18 1:55 AM, Cong Wang wrote: > >> On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang > >> wrote: > >>> > >>> Hi Cong, > >>> > >>> On 7/28/18 8:24 AM, Cong Wang wrote: > Each time we sync cfs_rq->runtime_expires with

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-31 Thread Cong Wang
On Tue, Jul 31, 2018 at 10:13 AM wrote: > > Xunlei Pang writes: > > > On 7/31/18 1:55 AM, Cong Wang wrote: > >> On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang > >> wrote: > >>> > >>> Hi Cong, > >>> > >>> On 7/28/18 8:24 AM, Cong Wang wrote: > Each time we sync cfs_rq->runtime_expires with

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-31 Thread bsegall
Xunlei Pang writes: > On 7/31/18 1:55 AM, Cong Wang wrote: >> On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang >> wrote: >>> >>> Hi Cong, >>> >>> On 7/28/18 8:24 AM, Cong Wang wrote: Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, we should sync its ->expires_seq

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-31 Thread bsegall
Xunlei Pang writes: > On 7/31/18 1:55 AM, Cong Wang wrote: >> On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang >> wrote: >>> >>> Hi Cong, >>> >>> On 7/28/18 8:24 AM, Cong Wang wrote: Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, we should sync its ->expires_seq

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-31 Thread Xunlei Pang
On 7/31/18 1:55 AM, Cong Wang wrote: > On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang wrote: >> >> Hi Cong, >> >> On 7/28/18 8:24 AM, Cong Wang wrote: >>> Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, >>> we should sync its ->expires_seq too. However it is missing >>> for

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-31 Thread Xunlei Pang
On 7/31/18 1:55 AM, Cong Wang wrote: > On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang wrote: >> >> Hi Cong, >> >> On 7/28/18 8:24 AM, Cong Wang wrote: >>> Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, >>> we should sync its ->expires_seq too. However it is missing >>> for

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-30 Thread Cong Wang
On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang wrote: > > Hi Cong, > > On 7/28/18 8:24 AM, Cong Wang wrote: > > Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, > > we should sync its ->expires_seq too. However it is missing > > for distribute_cfs_runtime(), especially the

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-30 Thread Cong Wang
On Sun, Jul 29, 2018 at 10:29 PM Xunlei Pang wrote: > > Hi Cong, > > On 7/28/18 8:24 AM, Cong Wang wrote: > > Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, > > we should sync its ->expires_seq too. However it is missing > > for distribute_cfs_runtime(), especially the

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-30 Thread bsegall
Xunlei Pang writes: > Hi Cong, > > On 7/28/18 8:24 AM, Cong Wang wrote: >> Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, >> we should sync its ->expires_seq too. However it is missing >> for distribute_cfs_runtime(), especially the slack timer call path. > > I don't

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-30 Thread bsegall
Xunlei Pang writes: > Hi Cong, > > On 7/28/18 8:24 AM, Cong Wang wrote: >> Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, >> we should sync its ->expires_seq too. However it is missing >> for distribute_cfs_runtime(), especially the slack timer call path. > > I don't

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-29 Thread Xunlei Pang
Hi Cong, On 7/28/18 8:24 AM, Cong Wang wrote: > Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, > we should sync its ->expires_seq too. However it is missing > for distribute_cfs_runtime(), especially the slack timer call path. I don't think it's a problem, as expires_seq

Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-29 Thread Xunlei Pang
Hi Cong, On 7/28/18 8:24 AM, Cong Wang wrote: > Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, > we should sync its ->expires_seq too. However it is missing > for distribute_cfs_runtime(), especially the slack timer call path. I don't think it's a problem, as expires_seq

[PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-27 Thread Cong Wang
Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, we should sync its ->expires_seq too. However it is missing for distribute_cfs_runtime(), especially the slack timer call path. Fixes: 512ac999d275 ("sched/fair: Fix bandwidth timer clock drift condition") Cc: Xunlei Pang Cc:

[PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime()

2018-07-27 Thread Cong Wang
Each time we sync cfs_rq->runtime_expires with cfs_b->runtime_expires, we should sync its ->expires_seq too. However it is missing for distribute_cfs_runtime(), especially the slack timer call path. Fixes: 512ac999d275 ("sched/fair: Fix bandwidth timer clock drift condition") Cc: Xunlei Pang Cc: