All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Sched: Change type of 'overrun' from int to u64
@ 2019-07-05  8:56 ` puranjay12
  0 siblings, 0 replies; 7+ messages in thread
From: Puranjay Mohan @ 2019-07-05  8:56 UTC (permalink / raw)
  To: skhan
  Cc: Puranjay Mohan, Ingo Molnar, Peter Zijlstra, open list:SCHEDULER,
	linux-kernel-mentees

Callers of hrtimer_forward_now() should save the return value in u64.
function sched_rt_period_timer() stores
it in variable 'overrun' of type int
change type of overrun from int to u64 to solve the issue.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
---
 kernel/sched/rt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 1e6b909dca36..f5d3893914f5 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -19,7 +19,7 @@ static enum hrtimer_restart sched_rt_period_timer(struct hrtimer *timer)
 	struct rt_bandwidth *rt_b =
 		container_of(timer, struct rt_bandwidth, rt_period_timer);
 	int idle = 0;
-	int overrun;
+	u64 overrun;
 
 	raw_spin_lock(&rt_b->rt_runtime_lock);
 	for (;;) {
-- 
2.21.0


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

* [Linux-kernel-mentees] [PATCH] Sched: Change type of 'overrun' from int to u64
@ 2019-07-05  8:56 ` puranjay12
  0 siblings, 0 replies; 7+ messages in thread
From: puranjay12 @ 2019-07-05  8:56 UTC (permalink / raw)


Callers of hrtimer_forward_now() should save the return value in u64.
function sched_rt_period_timer() stores
it in variable 'overrun' of type int
change type of overrun from int to u64 to solve the issue.

Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
---
 kernel/sched/rt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 1e6b909dca36..f5d3893914f5 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -19,7 +19,7 @@ static enum hrtimer_restart sched_rt_period_timer(struct hrtimer *timer)
 	struct rt_bandwidth *rt_b =
 		container_of(timer, struct rt_bandwidth, rt_period_timer);
 	int idle = 0;
-	int overrun;
+	u64 overrun;
 
 	raw_spin_lock(&rt_b->rt_runtime_lock);
 	for (;;) {
-- 
2.21.0

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

* [Linux-kernel-mentees] [PATCH] Sched: Change type of 'overrun' from int to u64
@ 2019-07-05  8:56 ` puranjay12
  0 siblings, 0 replies; 7+ messages in thread
From: Puranjay Mohan @ 2019-07-05  8:56 UTC (permalink / raw)


Callers of hrtimer_forward_now() should save the return value in u64.
function sched_rt_period_timer() stores
it in variable 'overrun' of type int
change type of overrun from int to u64 to solve the issue.

Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
---
 kernel/sched/rt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 1e6b909dca36..f5d3893914f5 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -19,7 +19,7 @@ static enum hrtimer_restart sched_rt_period_timer(struct hrtimer *timer)
 	struct rt_bandwidth *rt_b =
 		container_of(timer, struct rt_bandwidth, rt_period_timer);
 	int idle = 0;
-	int overrun;
+	u64 overrun;
 
 	raw_spin_lock(&rt_b->rt_runtime_lock);
 	for (;;) {
-- 
2.21.0

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

* Re: [PATCH] Sched: Change type of 'overrun' from int to u64
  2019-07-05  8:56 ` puranjay12
  (?)
@ 2019-07-05 11:52   ` peterz
  -1 siblings, 0 replies; 7+ messages in thread
From: Peter Zijlstra @ 2019-07-05 11:52 UTC (permalink / raw)
  To: Puranjay Mohan
  Cc: skhan, Ingo Molnar, open list:SCHEDULER, linux-kernel-mentees

On Fri, Jul 05, 2019 at 02:26:09PM +0530, Puranjay Mohan wrote:
> Callers of hrtimer_forward_now() should save the return value in u64.
> function sched_rt_period_timer() stores
> it in variable 'overrun' of type int
> change type of overrun from int to u64 to solve the issue.

Is there an actual issue? If we've missed _that_ many periods, something
is really buggered.

From a code consistency PoV this patch makes sense, but I don't think
there anything really wrong with the current code.

> Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
> ---
>  kernel/sched/rt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 1e6b909dca36..f5d3893914f5 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -19,7 +19,7 @@ static enum hrtimer_restart sched_rt_period_timer(struct hrtimer *timer)
>  	struct rt_bandwidth *rt_b =
>  		container_of(timer, struct rt_bandwidth, rt_period_timer);
>  	int idle = 0;
> -	int overrun;
> +	u64 overrun;
>  
>  	raw_spin_lock(&rt_b->rt_runtime_lock);
>  	for (;;) {
> -- 
> 2.21.0
> 

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

* [Linux-kernel-mentees] [PATCH] Sched: Change type of 'overrun' from int to u64
@ 2019-07-05 11:52   ` peterz
  0 siblings, 0 replies; 7+ messages in thread
From: peterz @ 2019-07-05 11:52 UTC (permalink / raw)


On Fri, Jul 05, 2019 at 02:26:09PM +0530, Puranjay Mohan wrote:
> Callers of hrtimer_forward_now() should save the return value in u64.
> function sched_rt_period_timer() stores
> it in variable 'overrun' of type int
> change type of overrun from int to u64 to solve the issue.

Is there an actual issue? If we've missed _that_ many periods, something
is really buggered.

>From a code consistency PoV this patch makes sense, but I don't think
there anything really wrong with the current code.

> Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
> ---
>  kernel/sched/rt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 1e6b909dca36..f5d3893914f5 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -19,7 +19,7 @@ static enum hrtimer_restart sched_rt_period_timer(struct hrtimer *timer)
>  	struct rt_bandwidth *rt_b =
>  		container_of(timer, struct rt_bandwidth, rt_period_timer);
>  	int idle = 0;
> -	int overrun;
> +	u64 overrun;
>  
>  	raw_spin_lock(&rt_b->rt_runtime_lock);
>  	for (;;) {
> -- 
> 2.21.0
> 

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

* [Linux-kernel-mentees] [PATCH] Sched: Change type of 'overrun' from int to u64
@ 2019-07-05 11:52   ` peterz
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Zijlstra @ 2019-07-05 11:52 UTC (permalink / raw)


On Fri, Jul 05, 2019 at 02:26:09PM +0530, Puranjay Mohan wrote:
> Callers of hrtimer_forward_now() should save the return value in u64.
> function sched_rt_period_timer() stores
> it in variable 'overrun' of type int
> change type of overrun from int to u64 to solve the issue.

Is there an actual issue? If we've missed _that_ many periods, something
is really buggered.

>From a code consistency PoV this patch makes sense, but I don't think
there anything really wrong with the current code.

> Signed-off-by: Puranjay Mohan <puranjay12 at gmail.com>
> ---
>  kernel/sched/rt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 1e6b909dca36..f5d3893914f5 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -19,7 +19,7 @@ static enum hrtimer_restart sched_rt_period_timer(struct hrtimer *timer)
>  	struct rt_bandwidth *rt_b =
>  		container_of(timer, struct rt_bandwidth, rt_period_timer);
>  	int idle = 0;
> -	int overrun;
> +	u64 overrun;
>  
>  	raw_spin_lock(&rt_b->rt_runtime_lock);
>  	for (;;) {
> -- 
> 2.21.0
> 

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

* [PATCH] Sched: Change type of 'overrun' from int to u64
@ 2019-06-18 16:59 Puranjay Mohan
  0 siblings, 0 replies; 7+ messages in thread
From: Puranjay Mohan @ 2019-06-18 16:59 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Puranjay Mohan, Ingo Molnar, Peter Zijlstra, linux-kernel,
	linux-kernel-mentees

Callers of hrtimer_forward_now() should save the return value in u64.
function sched_cfs_period_timer() stores
it in variable 'overrun' of type int
change type of overrun from int to u64 to solve the issue.

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f35930f5e528..c6bcae7d4e49 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4896,7 +4896,7 @@ static enum hrtimer_restart sched_cfs_period_timer(struct hrtimer *timer)
 	struct cfs_bandwidth *cfs_b =
 		container_of(timer, struct cfs_bandwidth, period_timer);
 	unsigned long flags;
-	int overrun;
+	u64 overrun;
 	int idle = 0;
 	int count = 0;
 
-- 
2.21.0


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

end of thread, other threads:[~2019-07-05 11:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05  8:56 [PATCH] Sched: Change type of 'overrun' from int to u64 Puranjay Mohan
2019-07-05  8:56 ` [Linux-kernel-mentees] " Puranjay Mohan
2019-07-05  8:56 ` puranjay12
2019-07-05 11:52 ` Peter Zijlstra
2019-07-05 11:52   ` [Linux-kernel-mentees] " Peter Zijlstra
2019-07-05 11:52   ` peterz
  -- strict thread matches above, loose matches on Subject: below --
2019-06-18 16:59 Puranjay Mohan

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.