* [tip: timers/core] posix-cpu-timers: Pass the task into arm_timer()
@ 2020-02-29 20:49 tip-bot2 for Eric W. Biederman
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Eric W. Biederman @ 2020-02-29 20:49 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Eric W. Biederman, Thomas Gleixner, x86, LKML
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 197ba902548386e966bb7848d3148a130bb01bd9
Gitweb: https://git.kernel.org/tip/197ba902548386e966bb7848d3148a130bb01bd9
Author: Eric W. Biederman <ebiederm@xmission.com>
AuthorDate: Fri, 28 Feb 2020 11:09:46 -06:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sat, 29 Feb 2020 21:44:46 +01:00
posix-cpu-timers: Pass the task into arm_timer()
The task has been already computed to take siglock before calling
arm_timer. So pass the benefit of that labor into arm_timer().
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/posix-cpu-timers.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index 40c2d83..ef936c5 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -482,12 +482,11 @@ void posix_cpu_timers_exit_group(struct task_struct *tsk)
* Insert the timer on the appropriate list before any timers that
* expire later. This must be called with the sighand lock held.
*/
-static void arm_timer(struct k_itimer *timer)
+static void arm_timer(struct k_itimer *timer, struct task_struct *p)
{
int clkidx = CPUCLOCK_WHICH(timer->it_clock);
struct cpu_timer *ctmr = &timer->it.cpu;
u64 newexp = cpu_timer_getexpires(ctmr);
- struct task_struct *p = ctmr->task;
struct posix_cputimer_base *base;
if (CPUCLOCK_PERTHREAD(timer->it_clock))
@@ -660,7 +659,7 @@ static int posix_cpu_timer_set(struct k_itimer *timer, int timer_flags,
*/
cpu_timer_setexpires(ctmr, new_expires);
if (new_expires != 0 && val < new_expires) {
- arm_timer(timer);
+ arm_timer(timer, p);
}
unlock_task_sighand(p, &flags);
@@ -980,7 +979,7 @@ static void posix_cpu_timer_rearm(struct k_itimer *timer)
/*
* Now re-arm for the new expiry time.
*/
- arm_timer(timer);
+ arm_timer(timer, p);
unlock_task_sighand(p, &flags);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip: timers/core] posix-cpu-timers: Pass the task into arm_timer()
2020-02-28 17:09 [PATCH 3/5] posix-cpu-timers: Pass the task into arm_timer Eric W. Biederman
@ 2020-03-01 10:27 ` tip-bot2 for Eric W. Biederman
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Eric W. Biederman @ 2020-03-01 10:27 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Eric W. Biederman, Thomas Gleixner, x86, LKML
The following commit has been merged into the timers/core branch of tip:
Commit-ID: beb41d9cbe4179058634e05d60235b6155c7b6c6
Gitweb: https://git.kernel.org/tip/beb41d9cbe4179058634e05d60235b6155c7b6c6
Author: Eric W. Biederman <ebiederm@xmission.com>
AuthorDate: Fri, 28 Feb 2020 11:09:46 -06:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sun, 01 Mar 2020 11:21:44 +01:00
posix-cpu-timers: Pass the task into arm_timer()
The task has been already computed to take siglock before calling
arm_timer. So pass the benefit of that labor into arm_timer().
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/8736auvdt1.fsf@x220.int.ebiederm.org
---
kernel/time/posix-cpu-timers.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index 40c2d83..ef936c5 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -482,12 +482,11 @@ void posix_cpu_timers_exit_group(struct task_struct *tsk)
* Insert the timer on the appropriate list before any timers that
* expire later. This must be called with the sighand lock held.
*/
-static void arm_timer(struct k_itimer *timer)
+static void arm_timer(struct k_itimer *timer, struct task_struct *p)
{
int clkidx = CPUCLOCK_WHICH(timer->it_clock);
struct cpu_timer *ctmr = &timer->it.cpu;
u64 newexp = cpu_timer_getexpires(ctmr);
- struct task_struct *p = ctmr->task;
struct posix_cputimer_base *base;
if (CPUCLOCK_PERTHREAD(timer->it_clock))
@@ -660,7 +659,7 @@ static int posix_cpu_timer_set(struct k_itimer *timer, int timer_flags,
*/
cpu_timer_setexpires(ctmr, new_expires);
if (new_expires != 0 && val < new_expires) {
- arm_timer(timer);
+ arm_timer(timer, p);
}
unlock_task_sighand(p, &flags);
@@ -980,7 +979,7 @@ static void posix_cpu_timer_rearm(struct k_itimer *timer)
/*
* Now re-arm for the new expiry time.
*/
- arm_timer(timer);
+ arm_timer(timer, p);
unlock_task_sighand(p, &flags);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-01 10:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-29 20:49 [tip: timers/core] posix-cpu-timers: Pass the task into arm_timer() tip-bot2 for Eric W. Biederman
-- strict thread matches above, loose matches on Subject: below --
2020-02-28 17:09 [PATCH 3/5] posix-cpu-timers: Pass the task into arm_timer Eric W. Biederman
2020-03-01 10:27 ` [tip: timers/core] posix-cpu-timers: Pass the task into arm_timer() tip-bot2 for Eric W. Biederman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).