Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2016-02-10 Thread Steve Muckle
Hi Ricky, On 02/01/2016 09:10 AM, Ricky Liang wrote: >> +static int cpufreq_sched_policy_init(struct cpufreq_policy *policy) >> > +{ >> > + struct gov_data *gd; >> > + int cpu; >> > + >> > + for_each_cpu(cpu, policy->cpus) >> > +

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2016-02-01 Thread Ricky Liang
Hi Steve, On Wed, Dec 9, 2015 at 2:19 PM, Steve Muckle wrote: [snip...] > +static int cpufreq_sched_policy_init(struct cpufreq_policy *policy) > +{ > + struct gov_data *gd; > + int cpu; > + > + for_each_cpu(cpu, policy->cpus) > +

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2016-01-26 Thread Steve Muckle
Hi Ricky, On 01/25/2016 04:06 AM, Ricky Liang wrote: >> + do { >> + set_current_state(TASK_INTERRUPTIBLE); >> + new_request = gd->requested_freq; >> + if (new_request == last_request) { >> + schedule(); > > Should we check

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2016-01-25 Thread Ricky Liang
Hi Steve, On Wed, Dec 9, 2015 at 2:19 PM, Steve Muckle wrote: [...] > +/* > + * we pass in struct cpufreq_policy. This is safe because changing out the > + * policy requires a call to __cpufreq_governor(policy, CPUFREQ_GOV_STOP), > + * which tears down all of the data

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2015-12-18 Thread Steve Muckle
Hi Leo, On 12/16/2015 11:17 PM, Leo Yan wrote: > Could you check if below corner case will introduce logic error? > The task still will be removed from rq if timer tick is triggered > between two time's set_current_state(). > > set_current_state(TASK_INTERRUPTIBLE); >`--->

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2015-12-18 Thread Leo Yan
Hi Steve, On Fri, Dec 18, 2015 at 11:15:01AM -0800, Steve Muckle wrote: > On 12/16/2015 11:17 PM, Leo Yan wrote: > > Could you check if below corner case will introduce logic error? > > The task still will be removed from rq if timer tick is triggered > > between two time's set_current_state(). >

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2015-12-16 Thread Leo Yan
Hi Steve, On Wed, Dec 16, 2015 at 05:24:56PM -0800, Steve Muckle wrote: > Hi Leo, > > On 12/15/2015 07:48 PM, Leo Yan wrote: > > I also think "set_current_state(TASK_INTERRUPTIBLE)" will introduce > > logic error when software flow run into "else" block. The reason is > > after you set state

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2015-12-16 Thread Steve Muckle
Hi Leo, On 12/15/2015 07:48 PM, Leo Yan wrote: > I also think "set_current_state(TASK_INTERRUPTIBLE)" will introduce > logic error when software flow run into "else" block. The reason is > after you set state with TASK_INTERRUPTIBLE, if there have some > scheduling happen within

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2015-12-15 Thread Juri Lelli
On 14/12/15 18:02, Steve Muckle wrote: > Hi Juri, > > Thanks for the review. > > On 12/11/2015 03:04 AM, Juri Lelli wrote: > >> +config CPU_FREQ_GOV_SCHED > >> + bool "'sched' cpufreq governor" > >> + depends on CPU_FREQ > > > > We depend on IRQ_WORK as well, which in turn I think depends on

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2015-12-15 Thread Leo Yan
Hi Steve, On Tue, Dec 08, 2015 at 10:19:24PM -0800, Steve Muckle wrote: [...] > +static int cpufreq_sched_thread(void *data) > +{ > + struct sched_param param; > + struct cpufreq_policy *policy; > + struct gov_data *gd; > + unsigned int new_request = 0; > + unsigned int

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2015-12-15 Thread Steve Muckle
On 12/15/2015 02:31 AM, Juri Lelli wrote: + do { > >> + set_current_state(TASK_INTERRUPTIBLE); > >> + new_request = gd->requested_freq; > >> + if (new_request == last_request) { > >> + schedule(); > >> +

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2015-12-14 Thread Steve Muckle
Hi Juri, Thanks for the review. On 12/11/2015 03:04 AM, Juri Lelli wrote: >> +config CPU_FREQ_GOV_SCHED >> +bool "'sched' cpufreq governor" >> +depends on CPU_FREQ > > We depend on IRQ_WORK as well, which in turn I think depends on SMP. As > briefly discussed with Peter on IRC, we might

Re: [RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2015-12-11 Thread Juri Lelli
Hi Steve, On 08/12/15 22:19, Steve Muckle wrote: > From: Michael Turquette > > Scheduler-driven CPU frequency selection hopes to exploit both > per-task and global information in the scheduler to improve frequency > selection policy, achieving lower power consumption,

[RFCv6 PATCH 03/10] sched: scheduler-driven cpu frequency selection

2015-12-08 Thread Steve Muckle
From: Michael Turquette Scheduler-driven CPU frequency selection hopes to exploit both per-task and global information in the scheduler to improve frequency selection policy, achieving lower power consumption, improved responsiveness/performance, and less reliance on