All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing: Use task_nice() in function __update_max_tr() to get the nice value of task.
@ 2014-01-22 22:41 Dongsheng Yang
  2014-01-23  3:56 ` Steven Rostedt
  2014-02-11  3:19 ` Dongsheng Yang
  0 siblings, 2 replies; 29+ messages in thread
From: Dongsheng Yang @ 2014-01-22 22:41 UTC (permalink / raw)
  To: linux-kernel; +Cc: rostedt, fweisbec, mingo, Dongsheng Yang

There is already a function named task_nice in sched.h to get the nice value
of task_struct. We can use it in __update_max_tr() rather than calculate it
manually.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 9d20cd9..ec149b4 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -970,7 +970,7 @@ __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu)
 	else
 		max_data->uid = task_uid(tsk);
 
-	max_data->nice = tsk->static_prio - 20 - MAX_RT_PRIO;
+	max_data->nice = task_nice(tsk);
 	max_data->policy = tsk->policy;
 	max_data->rt_priority = tsk->rt_priority;
 
-- 
1.8.2.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread
* [PATCH 0/3 V2] sched: Collect the bits about priority into a new header file, include/linux/sched/prio.h.
@ 2014-02-10  9:05 Dongsheng Yang
  2014-02-10  9:05 ` [PATCH 1/3] sched: Move the priority specific bits into a new header file Dongsheng Yang
  0 siblings, 1 reply; 29+ messages in thread
From: Dongsheng Yang @ 2014-02-10  9:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: raistlin, juri.lelli, clark.williams, peterz, mingo, namhyung,
	Dongsheng Yang

Hi Peter,
    This patchset is version 2 about priority of sched. Please help to review. 

    Sorry for the late update about it, coming back from vacation.

    v2:
    	* leave the task_prio() in kernel/sched/core.c
    	* remove macro TASK_NICE and implement it as static inline
      	  function in include/linux/sched.h.
	* remove #ifndef when include prio.h.

Dongsheng Yang (3):
  sched: Move the priority specific bits into a new header file.
  sched: Expose some macros related with priority.
  sched: Implement task_nice as static inline function.

 include/linux/sched.h      | 12 +++++++++++-
 include/linux/sched/prio.h | 40 ++++++++++++++++++++++++++++++++++++++++
 include/linux/sched/rt.h   | 19 +------------------
 kernel/sched/core.c        | 26 +++++++-------------------
 kernel/sched/cputime.c     |  4 ++--
 kernel/sched/sched.h       | 18 ------------------
 6 files changed, 61 insertions(+), 58 deletions(-)
 create mode 100644 include/linux/sched/prio.h

-- 
1.8.2.1


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

end of thread, other threads:[~2014-02-11  3:19 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-22 22:41 [PATCH] tracing: Use task_nice() in function __update_max_tr() to get the nice value of task Dongsheng Yang
2014-01-23  3:56 ` Steven Rostedt
2014-01-23  4:00   ` Steven Rostedt
2014-01-23 17:11     ` Dongsheng Yang
2014-01-23  8:26       ` Peter Zijlstra
2014-01-23 11:52         ` Steven Rostedt
2014-01-27 22:15           ` [PATCH 0/3] sched: Collect the bits about priority into a new header file, include/linux/sched/prio.h Dongsheng Yang
2014-01-27 15:45             ` Steven Rostedt
     [not found]               ` <CA+qeAOqW58894hGvCP0N0E-EUESfFPeqMmXUuhqxEZrRjDV97A@mail.gmail.com>
2014-01-28 16:06                 ` Steven Rostedt
2014-01-27 22:15             ` [PATCH 1/3] sched: Move the priority specific bits into a new header file Dongsheng Yang
2014-01-29  5:28               ` Namhyung Kim
2014-02-10  2:56                 ` Dongsheng Yang
2014-02-10 14:09                   ` Steven Rostedt
2014-02-11  1:10                     ` Dongsheng Yang
2014-02-10 13:30               ` [tip:sched/core] " tip-bot for Dongsheng Yang
2014-01-27 22:15             ` [PATCH 2/3] sched: Expose some macros related with priority Dongsheng Yang
2014-02-10 13:30               ` [tip:sched/core] sched: Expose some macros related to priority tip-bot for Dongsheng Yang
2014-01-27 22:15             ` [PATCH 3/3] sched: Implement task_nice and task_prio as static inline functions Dongsheng Yang
2014-01-27 10:32               ` Peter Zijlstra
2014-01-28  1:09                 ` Dongsheng Yang
2014-01-27 12:16                   ` Peter Zijlstra
2014-01-28  1:59                     ` Dongsheng Yang
2014-01-27 13:08                       ` Peter Zijlstra
2014-01-28  3:00                         ` [PATCH 3/3 V2] sched: Implement task_nice as static inline function Dongsheng Yang
2014-01-28  3:27                           ` Dongsheng Yang
2014-02-10 13:32                           ` [tip:sched/core] sched: Implement task_nice() " tip-bot for Dongsheng Yang
2014-01-23 21:43         ` [PATCH] tracing: Use task_nice() in function __update_max_tr() to get the nice value of task Dongsheng Yang
2014-02-11  3:19 ` Dongsheng Yang
  -- strict thread matches above, loose matches on Subject: below --
2014-02-10  9:05 [PATCH 0/3 V2] sched: Collect the bits about priority into a new header file, include/linux/sched/prio.h Dongsheng Yang
2014-02-10  9:05 ` [PATCH 1/3] sched: Move the priority specific bits into a new header file Dongsheng Yang

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.