RE: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-17 Thread David Laight
From: Yunfeng Ye > Sent: 17 October 2019 15:20 > On 2019/10/17 22:00, David Laight wrote: > > From: Yunfeng Ye > >> Sent: 17 October 2019 14:26 > > ... > -for (i = 0; i < 10; i++) { > +i = 0; > +timeout = jiffies + msecs_to_jiffies(100); > +do {

Re: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-17 Thread Yunfeng Ye
On 2019/10/17 21:54, Sudeep Holla wrote: > On Thu, Oct 17, 2019 at 09:26:15PM +0800, Yunfeng Ye wrote: >> >> >> On 2019/10/16 23:32, Sudeep Holla wrote: >>> On Wed, Oct 09, 2019 at 12:45:16PM +0800, Yunfeng Ye wrote: If psci_ops.affinity_info() fails, it will sleep 10ms, which will not

Re: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-17 Thread Yunfeng Ye
On 2019/10/17 22:00, David Laight wrote: > From: Yunfeng Ye >> Sent: 17 October 2019 14:26 > ... - for (i = 0; i < 10; i++) { + i = 0; + timeout = jiffies + msecs_to_jiffies(100); + do { err = psci_ops.affinity_info(cpu_logical_map(cpu), 0);

Re: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-17 Thread Yunfeng Ye
On 2019/10/16 23:05, Sudeep Holla wrote: > On Wed, Oct 16, 2019 at 07:29:59PM +0800, Yunfeng Ye wrote: >> >> >> On 2019/10/16 18:25, Sudeep Holla wrote: >>> On Wed, Oct 16, 2019 at 11:22:23AM +0800, Yunfeng Ye wrote: On 2019/10/16 0:23, Will Deacon wrote: > Hi, > > On

RE: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-17 Thread David Laight
From: Yunfeng Ye > Sent: 17 October 2019 14:26 ... > >> - for (i = 0; i < 10; i++) { > >> + i = 0; > >> + timeout = jiffies + msecs_to_jiffies(100); > >> + do { > >>err = psci_ops.affinity_info(cpu_logical_map(cpu), 0); > >>if (err == PSCI_0_2_AFFINITY_LEVEL_OFF) { > >>

Re: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-17 Thread Sudeep Holla
On Thu, Oct 17, 2019 at 09:26:15PM +0800, Yunfeng Ye wrote: > > > On 2019/10/16 23:32, Sudeep Holla wrote: > > On Wed, Oct 09, 2019 at 12:45:16PM +0800, Yunfeng Ye wrote: > >> If psci_ops.affinity_info() fails, it will sleep 10ms, which will not > >> take so long in the right case. Use usleep_range

Re: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-17 Thread Yunfeng Ye
On 2019/10/16 23:32, Sudeep Holla wrote: > On Wed, Oct 09, 2019 at 12:45:16PM +0800, Yunfeng Ye wrote: >> If psci_ops.affinity_info() fails, it will sleep 10ms, which will not >> take so long in the right case. Use usleep_range() instead of msleep(), >> reduce the waiting time, and give a chance

Re: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-16 Thread Sudeep Holla
On Wed, Oct 09, 2019 at 12:45:16PM +0800, Yunfeng Ye wrote: > If psci_ops.affinity_info() fails, it will sleep 10ms, which will not > take so long in the right case. Use usleep_range() instead of msleep(), > reduce the waiting time, and give a chance to busy wait before sleep. > > Signed-off-by: Yu

Re: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-16 Thread Sudeep Holla
On Wed, Oct 16, 2019 at 07:29:59PM +0800, Yunfeng Ye wrote: > > > On 2019/10/16 18:25, Sudeep Holla wrote: > > On Wed, Oct 16, 2019 at 11:22:23AM +0800, Yunfeng Ye wrote: > >> > >> > >> On 2019/10/16 0:23, Will Deacon wrote: > >>> Hi, > >>> > >>> On Sat, Sep 21, 2019 at 07:21:17PM +0800, Yunfeng Ye

Re: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-16 Thread Yunfeng Ye
On 2019/10/16 18:25, Sudeep Holla wrote: > On Wed, Oct 16, 2019 at 11:22:23AM +0800, Yunfeng Ye wrote: >> >> >> On 2019/10/16 0:23, Will Deacon wrote: >>> Hi, >>> >>> On Sat, Sep 21, 2019 at 07:21:17PM +0800, Yunfeng Ye wrote: If psci_ops.affinity_info() fails, it will sleep 10ms, which wil

Re: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-16 Thread Sudeep Holla
On Wed, Oct 16, 2019 at 11:22:23AM +0800, Yunfeng Ye wrote: > > > On 2019/10/16 0:23, Will Deacon wrote: > > Hi, > > > > On Sat, Sep 21, 2019 at 07:21:17PM +0800, Yunfeng Ye wrote: > >> If psci_ops.affinity_info() fails, it will sleep 10ms, which will not > >> take so long in the right case. Use us

Re: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-15 Thread Yunfeng Ye
On 2019/10/16 0:23, Will Deacon wrote: > Hi, > > On Sat, Sep 21, 2019 at 07:21:17PM +0800, Yunfeng Ye wrote: >> If psci_ops.affinity_info() fails, it will sleep 10ms, which will not >> take so long in the right case. Use usleep_range() instead of msleep(), >> reduce the waiting time, and give a

Re: [PATCH V2] arm64: psci: Reduce waiting time of cpu_psci_cpu_kill()

2019-10-15 Thread Will Deacon
Hi, On Sat, Sep 21, 2019 at 07:21:17PM +0800, Yunfeng Ye wrote: > If psci_ops.affinity_info() fails, it will sleep 10ms, which will not > take so long in the right case. Use usleep_range() instead of msleep(), > reduce the waiting time, and give a chance to busy wait before sleep. Can you elabora