Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-27 Thread Rafael J. Wysocki
On Tue, Mar 27, 2018 at 8:02 PM, Rik van Riel wrote: > On Tue, 2018-03-27 at 18:42 +0200, Rafael J. Wysocki wrote: >> On Thu, Mar 22, 2018 at 5:32 PM, Rik van Riel >> wrote: >> > On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: >> > >> > > On x86 we

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-27 Thread Rafael J. Wysocki
On Tue, Mar 27, 2018 at 8:02 PM, Rik van Riel wrote: > On Tue, 2018-03-27 at 18:42 +0200, Rafael J. Wysocki wrote: >> On Thu, Mar 22, 2018 at 5:32 PM, Rik van Riel >> wrote: >> > On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: >> > >> > > On x86 we don't have to use that

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-27 Thread Rik van Riel
On Tue, 2018-03-27 at 18:42 +0200, Rafael J. Wysocki wrote: > On Thu, Mar 22, 2018 at 5:32 PM, Rik van Riel > wrote: > > On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: > > > > > On x86 we don't have to use that time_check_counter thing, > > > sched_clock() > > > is

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-27 Thread Rik van Riel
On Tue, 2018-03-27 at 18:42 +0200, Rafael J. Wysocki wrote: > On Thu, Mar 22, 2018 at 5:32 PM, Rik van Riel > wrote: > > On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: > > > > > On x86 we don't have to use that time_check_counter thing, > > > sched_clock() > > > is really cheap, not

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-27 Thread Rafael J. Wysocki
On Thu, Mar 22, 2018 at 5:32 PM, Rik van Riel wrote: > On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: > >> On x86 we don't have to use that time_check_counter thing, >> sched_clock() >> is really cheap, not sure if it makes sense on other platforms. > > Are you sure? I

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-27 Thread Rafael J. Wysocki
On Thu, Mar 22, 2018 at 5:32 PM, Rik van Riel wrote: > On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: > >> On x86 we don't have to use that time_check_counter thing, >> sched_clock() >> is really cheap, not sure if it makes sense on other platforms. > > Are you sure? I saw a 5-10%

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-24 Thread Rafael J. Wysocki
On Friday, March 23, 2018 10:30:03 PM CET Doug Smythies wrote: > On 2018.03.23 02:08 Rafael J. Wysocki wrote: > > On Fri, Mar 23, 2018 at 9:57 AM, Rafael J. Wysocki > > wrote: > >> On Fri, Mar 23, 2018 at 4:19 AM, Doug Smythies wrote: > >>> On 2018.03.22

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-24 Thread Rafael J. Wysocki
On Friday, March 23, 2018 10:30:03 PM CET Doug Smythies wrote: > On 2018.03.23 02:08 Rafael J. Wysocki wrote: > > On Fri, Mar 23, 2018 at 9:57 AM, Rafael J. Wysocki > > wrote: > >> On Fri, Mar 23, 2018 at 4:19 AM, Doug Smythies wrote: > >>> On 2018.03.22 12:12 Doug Smythies wrote: > >

RE: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-23 Thread Doug Smythies
On 2018.03.23 02:08 Rafael J. Wysocki wrote: > On Fri, Mar 23, 2018 at 9:57 AM, Rafael J. Wysocki wrote: >> On Fri, Mar 23, 2018 at 4:19 AM, Doug Smythies wrote: >>> On 2018.03.22 12:12 Doug Smythies wrote: ...[snip]... >> >>> I'm not sure how good it is

RE: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-23 Thread Doug Smythies
On 2018.03.23 02:08 Rafael J. Wysocki wrote: > On Fri, Mar 23, 2018 at 9:57 AM, Rafael J. Wysocki wrote: >> On Fri, Mar 23, 2018 at 4:19 AM, Doug Smythies wrote: >>> On 2018.03.22 12:12 Doug Smythies wrote: ...[snip]... >> >>> I'm not sure how good it is but I made a test. I didn't believe >>>

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-23 Thread Rafael J. Wysocki
On Fri, Mar 23, 2018 at 9:57 AM, Rafael J. Wysocki wrote: > On Fri, Mar 23, 2018 at 4:19 AM, Doug Smythies wrote: >> On 2018.03.22 12:12 Doug Smythies wrote: >>>On 2018.03.22 09:32 Rik van Riel wrote: On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-23 Thread Rafael J. Wysocki
On Fri, Mar 23, 2018 at 9:57 AM, Rafael J. Wysocki wrote: > On Fri, Mar 23, 2018 at 4:19 AM, Doug Smythies wrote: >> On 2018.03.22 12:12 Doug Smythies wrote: >>>On 2018.03.22 09:32 Rik van Riel wrote: On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: > On x86 we don't have

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-23 Thread Rafael J. Wysocki
On Fri, Mar 23, 2018 at 4:19 AM, Doug Smythies wrote: > On 2018.03.22 12:12 Doug Smythies wrote: >>On 2018.03.22 09:32 Rik van Riel wrote: >>> On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: >>> On x86 we don't have to use that time_check_counter thing,

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-23 Thread Rafael J. Wysocki
On Fri, Mar 23, 2018 at 4:19 AM, Doug Smythies wrote: > On 2018.03.22 12:12 Doug Smythies wrote: >>On 2018.03.22 09:32 Rik van Riel wrote: >>> On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: >>> On x86 we don't have to use that time_check_counter thing, sched_clock() is

RE: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-22 Thread Doug Smythies
On 2018.03.22 12:12 Doug Smythies wrote: >On 2018.03.22 09:32 Rik van Riel wrote: >> On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: >> >>> On x86 we don't have to use that time_check_counter thing, >>> sched_clock() >>> is really cheap, not sure if it makes sense on other platforms. >>

RE: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-22 Thread Doug Smythies
On 2018.03.22 12:12 Doug Smythies wrote: >On 2018.03.22 09:32 Rik van Riel wrote: >> On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: >> >>> On x86 we don't have to use that time_check_counter thing, >>> sched_clock() >>> is really cheap, not sure if it makes sense on other platforms. >>

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-22 Thread Peter Zijlstra
On Thu, Mar 22, 2018 at 12:32:18PM -0400, Rik van Riel wrote: > On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: > > > On x86 we don't have to use that time_check_counter thing, > > sched_clock() > > is really cheap, not sure if it makes sense on other platforms. > > Are you sure? I saw

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-22 Thread Peter Zijlstra
On Thu, Mar 22, 2018 at 12:32:18PM -0400, Rik van Riel wrote: > On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: > > > On x86 we don't have to use that time_check_counter thing, > > sched_clock() > > is really cheap, not sure if it makes sense on other platforms. > > Are you sure? I saw

RE: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-22 Thread Doug Smythies
On 2018.03.22 09:32 Rik van Riel wrote: > On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: > >> On x86 we don't have to use that time_check_counter thing, >> sched_clock() >> is really cheap, not sure if it makes sense on other platforms. > > Are you sure? I saw a 5-10% increase in CPU

RE: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-22 Thread Doug Smythies
On 2018.03.22 09:32 Rik van Riel wrote: > On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: > >> On x86 we don't have to use that time_check_counter thing, >> sched_clock() >> is really cheap, not sure if it makes sense on other platforms. > > Are you sure? I saw a 5-10% increase in CPU

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-22 Thread Rik van Riel
On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: > On x86 we don't have to use that time_check_counter thing, > sched_clock() > is really cheap, not sure if it makes sense on other platforms. Are you sure? I saw a 5-10% increase in CPU use, for a constant query rate to a memcache style

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-22 Thread Rik van Riel
On Wed, 2018-03-14 at 13:04 +0100, Peter Zijlstra wrote: > On x86 we don't have to use that time_check_counter thing, > sched_clock() > is really cheap, not sure if it makes sense on other platforms. Are you sure? I saw a 5-10% increase in CPU use, for a constant query rate to a memcache style

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-14 Thread Rafael J. Wysocki
On Wednesday, March 14, 2018 1:04:50 PM CET Peter Zijlstra wrote: > On Mon, Mar 12, 2018 at 10:36:27AM +0100, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > If poll_idle() is allowed to spin until need_resched() returns 'true', > > it may actually spin

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-14 Thread Rafael J. Wysocki
On Wednesday, March 14, 2018 1:04:50 PM CET Peter Zijlstra wrote: > On Mon, Mar 12, 2018 at 10:36:27AM +0100, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > If poll_idle() is allowed to spin until need_resched() returns 'true', > > it may actually spin for a much longer time than

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-14 Thread Peter Zijlstra
On Mon, Mar 12, 2018 at 10:36:27AM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If poll_idle() is allowed to spin until need_resched() returns 'true', > it may actually spin for a much longer time than expected by the idle > governor, since

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-14 Thread Peter Zijlstra
On Mon, Mar 12, 2018 at 10:36:27AM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If poll_idle() is allowed to spin until need_resched() returns 'true', > it may actually spin for a much longer time than expected by the idle > governor, since set_tsk_need_resched() is not always

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-14 Thread Rafael J. Wysocki
On Monday, March 12, 2018 10:36:27 AM CET Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If poll_idle() is allowed to spin until need_resched() returns 'true', > it may actually spin for a much longer time than expected by the idle > governor, since

Re: [PATCH v2] cpuidle: poll_state: Add time limit to poll_idle()

2018-03-14 Thread Rafael J. Wysocki
On Monday, March 12, 2018 10:36:27 AM CET Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If poll_idle() is allowed to spin until need_resched() returns 'true', > it may actually spin for a much longer time than expected by the idle > governor, since set_tsk_need_resched() is not always