All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-5.2.y-rt only] hrtimer: correct the logic for grab expiry lock
@ 2020-08-12 10:50 zhantao.tang
  2020-08-12 11:45 ` Rasmus Villemoes
  0 siblings, 1 reply; 4+ messages in thread
From: zhantao.tang @ 2020-08-12 10:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: bigeasy, tglx, rostedt, linux-rt-users

From: Zhantao Tang <zhantao.tang@windriver.com>

In commit: 47b6de0b7f22 ("hrtimer: Add a missing bracket and hide `migration_base' on !SMP")
a inline function is_migration_base() is introduced. But
the logic of the hrtimer_grab_expiry_lock was changed.

This patch is to correct it.

Signed-off-by: Zhantao Tang <zhantao.tang@windriver.com>
---
 kernel/time/hrtimer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index b3adac366fd1..6b47e310c68e 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -944,7 +944,7 @@ void hrtimer_grab_expiry_lock(const struct hrtimer *timer)
 {
 	struct hrtimer_clock_base *base = READ_ONCE(timer->base);
 
-	if (timer->is_soft && is_migration_base(base)) {
+	if (timer->is_soft && !is_migration_base(base)) {
 		spin_lock(&base->cpu_base->softirq_expiry_lock);
 		spin_unlock(&base->cpu_base->softirq_expiry_lock);
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH linux-5.2.y-rt only] hrtimer: correct the logic for grab expiry lock
  2020-08-12 10:50 [PATCH linux-5.2.y-rt only] hrtimer: correct the logic for grab expiry lock zhantao.tang
@ 2020-08-12 11:45 ` Rasmus Villemoes
  2020-08-12 15:08   ` Steven Rostedt
  2020-08-13  1:57   ` Zhantao Tang
  0 siblings, 2 replies; 4+ messages in thread
From: Rasmus Villemoes @ 2020-08-12 11:45 UTC (permalink / raw)
  To: zhantao.tang, linux-kernel; +Cc: bigeasy, tglx, rostedt, linux-rt-users

On 12/08/2020 12.50, zhantao.tang@windriver.com wrote:
> From: Zhantao Tang <zhantao.tang@windriver.com>
> 
> In commit: 47b6de0b7f22 ("hrtimer: Add a missing bracket and hide `migration_base' on !SMP")
> a inline function is_migration_base() is introduced. But
> the logic of the hrtimer_grab_expiry_lock was changed.
> 
> This patch is to correct it.
> 

Yup, same patch sent back in April, which also had a fixes tag for 5.2.

https://lore.kernel.org/lkml/20200428144026.5882-1-rasmus.villemoes@prevas.dk/

It got picked up for 4.19-rt, dunno why it wasn't for 5.2-rt.

Rasmus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH linux-5.2.y-rt only] hrtimer: correct the logic for grab expiry lock
  2020-08-12 11:45 ` Rasmus Villemoes
@ 2020-08-12 15:08   ` Steven Rostedt
  2020-08-13  1:57   ` Zhantao Tang
  1 sibling, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2020-08-12 15:08 UTC (permalink / raw)
  To: Rasmus Villemoes
  Cc: zhantao.tang, linux-kernel, bigeasy, tglx, linux-rt-users

On Wed, 12 Aug 2020 13:45:02 +0200
Rasmus Villemoes <rasmus.villemoes@prevas.dk> wrote:

> Yup, same patch sent back in April, which also had a fixes tag for 5.2.
> 
> https://lore.kernel.org/lkml/20200428144026.5882-1-rasmus.villemoes@prevas.dk/
> 
> It got picked up for 4.19-rt, dunno why it wasn't for 5.2-rt.

5.2-rt is no longer supported. The -rt trees follow mainline trees.
When a mainline version is EOL so is the -rt version associated with it.

-- Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH linux-5.2.y-rt only] hrtimer: correct the logic for grab expiry lock
  2020-08-12 11:45 ` Rasmus Villemoes
  2020-08-12 15:08   ` Steven Rostedt
@ 2020-08-13  1:57   ` Zhantao Tang
  1 sibling, 0 replies; 4+ messages in thread
From: Zhantao Tang @ 2020-08-13  1:57 UTC (permalink / raw)
  To: Rasmus Villemoes, linux-kernel; +Cc: bigeasy, tglx, rostedt, linux-rt-users


在 2020/8/12 下午7:45, Rasmus Villemoes 写道:
> On 12/08/2020 12.50, zhantao.tang@windriver.com wrote:
>> From: Zhantao Tang <zhantao.tang@windriver.com>
>>
>> In commit: 47b6de0b7f22 ("hrtimer: Add a missing bracket and hide `migration_base' on !SMP")
>> a inline function is_migration_base() is introduced. But
>> the logic of the hrtimer_grab_expiry_lock was changed.
>>
>> This patch is to correct it.
>>
> Yup, same patch sent back in April, which also had a fixes tag for 5.2.
>
> https://lore.kernel.org/lkml/20200428144026.5882-1-rasmus.villemoes@prevas.dk/
>
> It got picked up for 4.19-rt, dunno why it wasn't for 5.2-rt.

Yes, currently 5.2 rt kernel not fix the issue.

And I checked the 4.19 rt kernel, but  did not find the implementation 
of hrtimer_grab_expiry_lock().

It used hrtimer_wait_for_timer() and the logic is OK.


Thanks,

Zhantao

>
> Rasmus

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-13  1:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12 10:50 [PATCH linux-5.2.y-rt only] hrtimer: correct the logic for grab expiry lock zhantao.tang
2020-08-12 11:45 ` Rasmus Villemoes
2020-08-12 15:08   ` Steven Rostedt
2020-08-13  1:57   ` Zhantao Tang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.