* Re: [PATCH lttng-modules] Fix: Remove not used PREEMPT_ACTIVE in Linux 4.4
[not found] <1454417813-19236-1-git-send-email-eu@felipetonello.com>
@ 2016-02-02 13:38 ` Mathieu Desnoyers
[not found] ` <523443816.10171.1454420328647.JavaMail.zimbra@efficios.com>
1 sibling, 0 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2016-02-02 13:38 UTC (permalink / raw)
To: Felipe F. Tonello; +Cc: lttng-dev
Hi,
In instrumentation/events/lttng-module/sched.h, there are ifdefs
checking the kernel version against which lttng-modules is build.
Please ensure you don't remove this flag when building against
older kernels.
The mainline/sched.h file should be removed from lttng-modules,
it's a leftover of initial porting of instrumentation from the
kernel.
Thanks,
Mathieu
----- On Feb 2, 2016, at 7:56 AM, Felipe F. Tonello eu@felipetonello.com wrote:
> This flag was removed in Linux 4.4 as it is not necessary to use it any more.
>
> Check Linux commits:
> e61bf1e43b6f ('sched/core: Kill PREEMPT_ACTIVE')
> da7142e2ed73 ('sched/core: Simplify preempt_count tests')
> 3d8f74dd4ca1 ('sched/core: Stop setting PREEMPT_ACTIVE')
>
> Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
> ---
> instrumentation/events/lttng-module/sched.h | 8 ++++----
> instrumentation/events/mainline/sched.h | 2 +-
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/instrumentation/events/lttng-module/sched.h
> b/instrumentation/events/lttng-module/sched.h
> index 4f3676bf54ea..53edd2af0e06 100644
> --- a/instrumentation/events/lttng-module/sched.h
> +++ b/instrumentation/events/lttng-module/sched.h
> @@ -51,7 +51,7 @@ static inline long __trace_sched_switch_state(struct
> task_struct *p)
> /*
> * For all intents and purposes a preempted task is a running task.
> */
> - if (preempt_count() & PREEMPT_ACTIVE)
> + if (preempt_count())
> state = TASK_RUNNING | TASK_STATE_MAX;
> #endif /* CONFIG_PREEMPT */
>
> @@ -68,7 +68,7 @@ static inline long __trace_sched_switch_state(struct
> task_struct *p)
> /*
> * For all intents and purposes a preempted task is a running task.
> */
> - if (task_preempt_count(p) & PREEMPT_ACTIVE)
> + if (task_preempt_count(p))
> state = TASK_RUNNING | TASK_STATE_MAX;
> #endif
>
> @@ -85,7 +85,7 @@ static inline long __trace_sched_switch_state(struct
> task_struct *p)
> /*
> * For all intents and purposes a preempted task is a running task.
> */
> - if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
> + if (task_thread_info(p)->preempt_count)
> state = TASK_RUNNING | TASK_STATE_MAX;
> #endif
>
> @@ -102,7 +102,7 @@ static inline long __trace_sched_switch_state(struct
> task_struct *p)
> /*
> * For all intents and purposes a preempted task is a running task.
> */
> - if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
> + if (task_thread_info(p)->preempt_count)
> state = TASK_RUNNING;
> #endif
>
> diff --git a/instrumentation/events/mainline/sched.h
> b/instrumentation/events/mainline/sched.h
> index ea7a2035456d..790085190a4b 100644
> --- a/instrumentation/events/mainline/sched.h
> +++ b/instrumentation/events/mainline/sched.h
> @@ -100,7 +100,7 @@ static inline long __trace_sched_switch_state(struct
> task_struct *p)
> /*
> * For all intents and purposes a preempted task is a running task.
> */
> - if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
> + if (task_thread_info(p)->preempt_count)
> state = TASK_RUNNING | TASK_STATE_MAX;
> #endif
>
> --
> 2.7.0
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH lttng-modules] Fix: Remove not used PREEMPT_ACTIVE in Linux 4.4
[not found] ` <523443816.10171.1454420328647.JavaMail.zimbra@efficios.com>
@ 2016-02-02 14:22 ` Felipe Tonello
[not found] ` <CAGrhNMz9ZOXTtTkMy8hxVQFyk6Kj3uWY2G4Ksfo2zfY5qGc_ow@mail.gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Felipe Tonello @ 2016-02-02 14:22 UTC (permalink / raw)
To: Mathieu Desnoyers; +Cc: lttng-dev
Hi Mathieu,
On Tue, Feb 2, 2016 at 1:38 PM, Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
> Hi,
>
> In instrumentation/events/lttng-module/sched.h, there are ifdefs
> checking the kernel version against which lttng-modules is build.
> Please ensure you don't remove this flag when building against
> older kernels.
Actually I just realized that this file is correct already.
>
> The mainline/sched.h file should be removed from lttng-modules,
> it's a leftover of initial porting of instrumentation from the
> kernel.
I will send another patch removing this file.
Felipe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH lttng-modules] Fix: Remove not used PREEMPT_ACTIVE in Linux 4.4
[not found] ` <CAGrhNMz9ZOXTtTkMy8hxVQFyk6Kj3uWY2G4Ksfo2zfY5qGc_ow@mail.gmail.com>
@ 2016-02-02 20:03 ` Mathieu Desnoyers
0 siblings, 0 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2016-02-02 20:03 UTC (permalink / raw)
To: Felipe F. Tonello; +Cc: lttng-dev
----- On Feb 2, 2016, at 9:22 AM, Felipe F. Tonello eu@felipetonello.com wrote:
> Hi Mathieu,
>
> On Tue, Feb 2, 2016 at 1:38 PM, Mathieu Desnoyers
> <mathieu.desnoyers@efficios.com> wrote:
>> Hi,
>>
>> In instrumentation/events/lttng-module/sched.h, there are ifdefs
>> checking the kernel version against which lttng-modules is build.
>> Please ensure you don't remove this flag when building against
>> older kernels.
>
> Actually I just realized that this file is correct already.
>
>>
>> The mainline/sched.h file should be removed from lttng-modules,
>> it's a leftover of initial porting of instrumentation from the
>> kernel.
>
> I will send another patch removing this file.
We would need to edit the README file under instrumentation/events too.
Thanks,
Mathieu
>
> Felipe
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH lttng-modules] Fix: Remove not used PREEMPT_ACTIVE in Linux 4.4
@ 2016-02-02 12:56 Felipe F. Tonello
0 siblings, 0 replies; 4+ messages in thread
From: Felipe F. Tonello @ 2016-02-02 12:56 UTC (permalink / raw)
To: lttng-dev
This flag was removed in Linux 4.4 as it is not necessary to use it any more.
Check Linux commits:
e61bf1e43b6f ('sched/core: Kill PREEMPT_ACTIVE')
da7142e2ed73 ('sched/core: Simplify preempt_count tests')
3d8f74dd4ca1 ('sched/core: Stop setting PREEMPT_ACTIVE')
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
---
instrumentation/events/lttng-module/sched.h | 8 ++++----
instrumentation/events/mainline/sched.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/instrumentation/events/lttng-module/sched.h b/instrumentation/events/lttng-module/sched.h
index 4f3676bf54ea..53edd2af0e06 100644
--- a/instrumentation/events/lttng-module/sched.h
+++ b/instrumentation/events/lttng-module/sched.h
@@ -51,7 +51,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
/*
* For all intents and purposes a preempted task is a running task.
*/
- if (preempt_count() & PREEMPT_ACTIVE)
+ if (preempt_count())
state = TASK_RUNNING | TASK_STATE_MAX;
#endif /* CONFIG_PREEMPT */
@@ -68,7 +68,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
/*
* For all intents and purposes a preempted task is a running task.
*/
- if (task_preempt_count(p) & PREEMPT_ACTIVE)
+ if (task_preempt_count(p))
state = TASK_RUNNING | TASK_STATE_MAX;
#endif
@@ -85,7 +85,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
/*
* For all intents and purposes a preempted task is a running task.
*/
- if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
+ if (task_thread_info(p)->preempt_count)
state = TASK_RUNNING | TASK_STATE_MAX;
#endif
@@ -102,7 +102,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
/*
* For all intents and purposes a preempted task is a running task.
*/
- if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
+ if (task_thread_info(p)->preempt_count)
state = TASK_RUNNING;
#endif
diff --git a/instrumentation/events/mainline/sched.h b/instrumentation/events/mainline/sched.h
index ea7a2035456d..790085190a4b 100644
--- a/instrumentation/events/mainline/sched.h
+++ b/instrumentation/events/mainline/sched.h
@@ -100,7 +100,7 @@ static inline long __trace_sched_switch_state(struct task_struct *p)
/*
* For all intents and purposes a preempted task is a running task.
*/
- if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE)
+ if (task_thread_info(p)->preempt_count)
state = TASK_RUNNING | TASK_STATE_MAX;
#endif
--
2.7.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-02 20:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1454417813-19236-1-git-send-email-eu@felipetonello.com>
2016-02-02 13:38 ` [PATCH lttng-modules] Fix: Remove not used PREEMPT_ACTIVE in Linux 4.4 Mathieu Desnoyers
[not found] ` <523443816.10171.1454420328647.JavaMail.zimbra@efficios.com>
2016-02-02 14:22 ` Felipe Tonello
[not found] ` <CAGrhNMz9ZOXTtTkMy8hxVQFyk6Kj3uWY2G4Ksfo2zfY5qGc_ow@mail.gmail.com>
2016-02-02 20:03 ` Mathieu Desnoyers
2016-02-02 12:56 Felipe F. Tonello
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.