public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: fix include for task_cpu_possible
@ 2024-09-30 16:44 Matthias Männich
  2024-09-30 17:02 ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Männich @ 2024-09-30 16:44 UTC (permalink / raw)
  To: linux-kernel, tj; +Cc: kernel-team, maennich, peterz, void

From: Matthias Maennich <maennich@google.com>

Commit 2c390dda9e03 ("sched_ext: Make task_can_run_on_remote_rq() use
common task_allowed_on_cpu()") moved the call for task_cpu_possible from
kernel/sched/core.c, but did not add an include of linux/mmu_context.h
where this symbol is defined. Fix that by adding the missing include.

Fixes: 2c390dda9e03 ("sched_ext: Make task_can_run_on_remote_rq() use common task_allowed_on_cpu()")
Signed-off-by: Matthias Maennich <maennich@google.com>
---
 kernel/sched/sched.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index e2b7c5282f5d..a7832c53cc92 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -44,6 +44,7 @@
 #include <linux/lockdep.h>
 #include <linux/minmax.h>
 #include <linux/mm.h>
+#include <linux/mmu_context.h>
 #include <linux/module.h>
 #include <linux/mutex_api.h>
 #include <linux/plist.h>
-- 
2.46.1.824.gd892dcdcdd-goog


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

* Re: [PATCH] sched: fix include for task_cpu_possible
  2024-09-30 16:44 [PATCH] sched: fix include for task_cpu_possible Matthias Männich
@ 2024-09-30 17:02 ` Tejun Heo
  2024-09-30 23:48   ` Matthias Männich
  0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2024-09-30 17:02 UTC (permalink / raw)
  To: Matthias Männich; +Cc: linux-kernel, kernel-team, peterz, void

Hello,

On Mon, Sep 30, 2024 at 04:44:56PM +0000, Matthias Männich wrote:
> From: Matthias Maennich <maennich@google.com>
> 
> Commit 2c390dda9e03 ("sched_ext: Make task_can_run_on_remote_rq() use
> common task_allowed_on_cpu()") moved the call for task_cpu_possible from
> kernel/sched/core.c, but did not add an include of linux/mmu_context.h
> where this symbol is defined. Fix that by adding the missing include.
> 
> Fixes: 2c390dda9e03 ("sched_ext: Make task_can_run_on_remote_rq() use common task_allowed_on_cpu()")
> Signed-off-by: Matthias Maennich <maennich@google.com>
> ---
>  kernel/sched/sched.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index e2b7c5282f5d..a7832c53cc92 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -44,6 +44,7 @@
>  #include <linux/lockdep.h>
>  #include <linux/minmax.h>
>  #include <linux/mm.h>
> +#include <linux/mmu_context.h>

Should the patch also remove mmu_context.h from kernel/sched/core.c?

Thanks.

-- 
tejun

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

* Re: [PATCH] sched: fix include for task_cpu_possible
  2024-09-30 17:02 ` Tejun Heo
@ 2024-09-30 23:48   ` Matthias Männich
  2024-10-01 19:46     ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Männich @ 2024-09-30 23:48 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel, kernel-team, peterz, void

On Mon, Sep 30, 2024 at 07:02:41AM -1000, Tejun Heo wrote:
>Hello,
>
>On Mon, Sep 30, 2024 at 04:44:56PM +0000, Matthias Männich wrote:
>> From: Matthias Maennich <maennich@google.com>
>>
>> Commit 2c390dda9e03 ("sched_ext: Make task_can_run_on_remote_rq() use
>> common task_allowed_on_cpu()") moved the call for task_cpu_possible from
>> kernel/sched/core.c, but did not add an include of linux/mmu_context.h
>> where this symbol is defined. Fix that by adding the missing include.
>>
>> Fixes: 2c390dda9e03 ("sched_ext: Make task_can_run_on_remote_rq() use common task_allowed_on_cpu()")
>> Signed-off-by: Matthias Maennich <maennich@google.com>
>> ---
>>  kernel/sched/sched.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
>> index e2b7c5282f5d..a7832c53cc92 100644
>> --- a/kernel/sched/sched.h
>> +++ b/kernel/sched/sched.h
>> @@ -44,6 +44,7 @@
>>  #include <linux/lockdep.h>
>>  #include <linux/minmax.h>
>>  #include <linux/mm.h>
>> +#include <linux/mmu_context.h>
>
>Should the patch also remove mmu_context.h from kernel/sched/core.c?

kernel/sched/core.c has a call to switch_mm_irqs_off, which is defined
in linux/mmu_context.h as well. So, no, the original include needs to
remain.

Cheers,
Matthias

>
>Thanks.
>
>-- 
>tejun

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

* Re: [PATCH] sched: fix include for task_cpu_possible
  2024-09-30 23:48   ` Matthias Männich
@ 2024-10-01 19:46     ` Tejun Heo
  0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2024-10-01 19:46 UTC (permalink / raw)
  To: Matthias Männich; +Cc: linux-kernel, kernel-team, peterz, void

On Mon, Sep 30, 2024 at 11:48:42PM +0000, Matthias Männich wrote:
> > Should the patch also remove mmu_context.h from kernel/sched/core.c?
> 
> kernel/sched/core.c has a call to switch_mm_irqs_off, which is defined
> in linux/mmu_context.h as well. So, no, the original include needs to
> remain.

Hmm... I'm a bit confused. kernel/sched/core.c always includes
kernel/sched/sched.h which collects all the shared includes. Why does it
need to be repeated in core.c?

Thanks.

-- 
tejun

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

end of thread, other threads:[~2024-10-01 19:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 16:44 [PATCH] sched: fix include for task_cpu_possible Matthias Männich
2024-09-30 17:02 ` Tejun Heo
2024-09-30 23:48   ` Matthias Männich
2024-10-01 19:46     ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox