Skip to content

Add MAX_NICE, MIN_NICE and NICE_WIDTH macros in prio.h.

Dongsheng Yang lkml 1 version Applied

Status from this message: I queued it; I wasn't convinced but people seem to like it, which is

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 15 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/9sched: Prio: Use DEFAULT_PRIO to define NICE_TO_PRIO and PRIO_TO_NICE.include/linux/sched/prio.h+2 -20 replies
2/9sched: prio: Add 3 macros of MAX_NICE, MIN_NICE and NICE_WIDTH in prio.h.include/linux/sched/prio.h+4 -00 replies
3/9sched: prio: Use NICE_WIDTH macro to avoid using of hard coding of 40 and 20 in prio.h.include/linux/sched/prio.h+2 -20 replies
4/9sched: prio: Add spaces before and after operator of '-'.include/linux/sched/prio.h+1 -10 replies
5/9rcu: Use MAX_NICE to replace hard coding of 19.kernel/rcu/torture.c+4 -44 replies
6/9sched: Replace hardcoding of -20 and 19 with MIN_NICE and MAX_NICE.kernel/sched/auto_group.c kernel/sched/core.c+7 -70 replies
7/9sys: Replace hardcoding of -20 and 19 with MIN_NICE and MAX_NICE.kernel/sys.c+4 -43 replies
8/9workqueue: Replace hardcoding of -20 and 19 with MIN_NICE and MAX_NICE.kernel/workqueue.c+1 -11 reply
9/9trace: Replace hardcoding of 19 with MAX_NICE.kernel/trace/ring_buffer_benchmark.c+3 -38 replies

Reviews trailers per patch

2 of 9 patches have a Reviewed-by or Acked-by.

PatchJosh TriplettTejun Heo
1/9
2/9
3/9
4/9
5/9R-b
6/9
7/9
8/9A-b
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] Add MAX_NICE, MIN_NICE and NICE_WIDTH macros in prio.h.

Hi Peter,
There are lots of hardcoding of -20 and 19 in kernel to represent
minimum and maximum of nice value currently. This patch set define three macros in prio.h and replace some of the hardcoding with them.

Please help to take a look at it, thanx :)

Dongsheng Yang (9):
sched: Prio: Use DEFAULT_PRIO to define NICE_TO_PRIO and PRIO_TO_NICE.
sched: prio: Add 3 macros of MAX_NICE, MIN_NICE and NICE_WIDTH in

    prio.h.

sched: prio: Use NICE_WIDTH macro to avoid using of hard coding of 40
and 20 in prio.h.
sched: prio: Add spaces before and after operator of '-'.
rcu: Use MAX_NICE to replace hard coding of 19.
sched: Replace hardcoding of -20 and 19 with MIN_NICE and MAX_NICE.
sys: Replace hardcoding of -20 and 19 with MIN_NICE and MAX_NICE.
workqueue: Replace hardcoding of -20 and 19 with MIN_NICE and
MAX_NICE.
trace: Replace hardcoding of 19 with MAX_NICE.

 include/linux/sched/prio.h           | 14 +++++++++-----
 kernel/rcu/torture.c                 |  8 ++++----
 kernel/sched/auto_group.c            |  2 +-
 kernel/sched/core.c                  | 12 ++++++------
 kernel/sys.c                         |  8 ++++----
 kernel/trace/ring_buffer_benchmark.c |  6 +++---
 kernel/workqueue.c                   |  2 +-
 7 files changed, 28 insertions(+), 24 deletions(-)
Signature · 1 line
1.8.2.1