All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/17 for-tip V3] A series patches about sched priority.
@ 2014-03-11 10:09 Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 01/17] sched/prio: Add a inline function named nice_to_rlimit() in prio.h Dongsheng Yang
                   ` (18 more replies)
  0 siblings, 19 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang

Hi all,
	This patchset is all about priority. 

1. Add two inline functions in prio.h named nice_to_rlimit and rlimit_to_nice.
   They are converting the value between nice value [-20, 19] and 
   rlimit style value [1, 40].
2. Add a macro in ioprio.h named NICE_TO_IOPRIO.
   It convert nice value [-20, 19] to io priority [0, 7].
3. Others are all about replace hardcoding value about nice to MIN_NICE or MAX_NICE.

Changelog:
	-v2:
	  *Splite [2/16] into two patches, one is about the whitespace changes, and
	   the other is about nice_to_rlimit().
	-v1:
	  *Implement nice_to_rlimit and rlimit_to_nice with inline functions
	   rather than macro.
	  *Add a patch[16/16] to replace opened code implement with nice_to_rlimit().

Dongsheng Yang (16):
  sched/prio: Add a inline function named nice_to_rlimit() in prio.h.
  kernel/sys: Replace opened code implementation with nice_to_rlimit().
  workqueue: Replace hardcoding of -20 with MIN_NICE.
  locktorture: Replace hardcoding of 19 with MAX_NICE.
  tools/mq_perf_tests: Replace hardcoding of -20 with MIN_NICE.
  mm: Replace hardcoding of 19 with MAX_NICE.
  ioprio: Add a macro named NICE_TO_IOPRIO.
  fs/hearbeat: Replace hardcoding of -20 with MIN_NICE.
  driver/block: Replace hardcoding of -20 with MIN_NICE.
  driver/char: Replace hardcoding of 19 with MAX_NICE.
  drivers/s390: Replace hardcoding of 19 with MAX_NICE.
  sched/prio: Add an inline function named rlimit_to_nice in prio.h.
  driver/staging/android: Use rlimit_to_nice to replace opened code
    implementation.
  driver/staging/lustre: Replace hardcoding of -20 with MIN_NICE.
  driver/scsi: Replace hardcoding of -20 with MIN_NICE.
  sched: Get rid of opened code implementation of funtion
    nice_to_rlimit().

Joe Perches (1):
  kernel/sys: Fix the indent issue in switch.

 drivers/block/loop.c                           |   2 +-
 drivers/block/nbd.c                            |   2 +-
 drivers/block/pktcdvd.c                        |   2 +-
 drivers/char/ipmi/ipmi_si_intf.c               |   2 +-
 drivers/s390/crypto/ap_bus.c                   |   2 +-
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c              |   4 +-
 drivers/scsi/bnx2i/bnx2i_hwi.c                 |   2 +-
 drivers/scsi/fcoe/fcoe.c                       |   2 +-
 drivers/scsi/ibmvscsi/ibmvfc.c                 |   2 +-
 drivers/scsi/ibmvscsi/ibmvscsi.c               |   2 +-
 drivers/scsi/lpfc/lpfc_hbadisc.c               |   2 +-
 drivers/scsi/qla2xxx/qla_os.c                  |   2 +-
 drivers/staging/android/binder.c               |   4 +-
 drivers/staging/lustre/lustre/llite/lloop.c    |   2 +-
 fs/ocfs2/cluster/heartbeat.c                   |   2 +-
 include/linux/ioprio.h                         |   7 +-
 include/linux/sched/prio.h                     |  16 ++
 kernel/locking/locktorture.c                   |   2 +-
 kernel/sched/core.c                            |   2 +-
 kernel/sys.c                                   | 206 ++++++++++++-------------
 kernel/workqueue.c                             |   6 +-
 mm/huge_memory.c                               |   2 +-
 tools/testing/selftests/mqueue/mq_perf_tests.c |   4 +-
 23 files changed, 150 insertions(+), 129 deletions(-)

-- 
1.8.2.1


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

* [PATCH 01/17] sched/prio: Add a inline function named nice_to_rlimit() in prio.h.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 02/17] kernel/sys: Fix the indent issue in switch Dongsheng Yang
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang

This patch add an inline function named nice_to_rlimit() in prio.h to
convert nice value [19,-20] to rlimit style value [1,40].

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 include/linux/sched/prio.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/sched/prio.h b/include/linux/sched/prio.h
index ac32258..29756f8 100644
--- a/include/linux/sched/prio.h
+++ b/include/linux/sched/prio.h
@@ -41,4 +41,12 @@
 #define TASK_USER_PRIO(p)	USER_PRIO((p)->static_prio)
 #define MAX_USER_PRIO		(USER_PRIO(MAX_PRIO))
 
+/*
+ * Convert nice value [19,-20] to rlimit style value [1,40].
+ */
+static inline long nice_to_rlimit(long nice)
+{
+	return (MAX_NICE - nice + 1);
+}
+
 #endif /* _SCHED_PRIO_H */
-- 
1.8.2.1


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

* [PATCH 02/17] kernel/sys: Fix the indent issue in switch.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 01/17] sched/prio: Add a inline function named nice_to_rlimit() in prio.h Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 03/17] kernel/sys: Replace opened code implementation with nice_to_rlimit() Dongsheng Yang
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang

From: Joe Perches <joe@perches.com>

Fix the indent issue and add a comment line for /* fall-through */.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 kernel/sys.c | 204 +++++++++++++++++++++++++++++------------------------------
 1 file changed, 102 insertions(+), 102 deletions(-)

diff --git a/kernel/sys.c b/kernel/sys.c
index adaeab6..61a2ae9 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -182,39 +182,39 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval)
 	rcu_read_lock();
 	read_lock(&tasklist_lock);
 	switch (which) {
-		case PRIO_PROCESS:
-			if (who)
-				p = find_task_by_vpid(who);
-			else
-				p = current;
-			if (p)
-				error = set_one_prio(p, niceval, error);
-			break;
-		case PRIO_PGRP:
-			if (who)
-				pgrp = find_vpid(who);
-			else
-				pgrp = task_pgrp(current);
-			do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
+	case PRIO_PROCESS:
+		if (who)
+			p = find_task_by_vpid(who);
+		else
+			p = current;
+		if (p)
+			error = set_one_prio(p, niceval, error);
+		break;
+	case PRIO_PGRP:
+		if (who)
+			pgrp = find_vpid(who);
+		else
+			pgrp = task_pgrp(current);
+		do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
+			error = set_one_prio(p, niceval, error);
+		} while_each_pid_thread(pgrp, PIDTYPE_PGID, p);
+		break;
+	case PRIO_USER:
+		uid = make_kuid(cred->user_ns, who);
+		user = cred->user;
+		if (!who)
+			uid = cred->uid;
+		else if (!uid_eq(uid, cred->uid) &&
+			 !(user = find_user(uid)))
+			goto out_unlock;	/* No processes for this user */
+
+		do_each_thread(g, p) {
+			if (uid_eq(task_uid(p), uid))
 				error = set_one_prio(p, niceval, error);
-			} while_each_pid_thread(pgrp, PIDTYPE_PGID, p);
-			break;
-		case PRIO_USER:
-			uid = make_kuid(cred->user_ns, who);
-			user = cred->user;
-			if (!who)
-				uid = cred->uid;
-			else if (!uid_eq(uid, cred->uid) &&
-				 !(user = find_user(uid)))
-				goto out_unlock;	/* No processes for this user */
-
-			do_each_thread(g, p) {
-				if (uid_eq(task_uid(p), uid))
-					error = set_one_prio(p, niceval, error);
-			} while_each_thread(g, p);
-			if (!uid_eq(uid, cred->uid))
-				free_uid(user);		/* For find_user() */
-			break;
+		} while_each_thread(g, p);
+		if (!uid_eq(uid, cred->uid))
+			free_uid(user);		/* For find_user() */
+		break;
 	}
 out_unlock:
 	read_unlock(&tasklist_lock);
@@ -244,47 +244,47 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
 	rcu_read_lock();
 	read_lock(&tasklist_lock);
 	switch (which) {
-		case PRIO_PROCESS:
-			if (who)
-				p = find_task_by_vpid(who);
-			else
-				p = current;
-			if (p) {
+	case PRIO_PROCESS:
+		if (who)
+			p = find_task_by_vpid(who);
+		else
+			p = current;
+		if (p) {
+			niceval = 20 - task_nice(p);
+			if (niceval > retval)
+				retval = niceval;
+		}
+		break;
+	case PRIO_PGRP:
+		if (who)
+			pgrp = find_vpid(who);
+		else
+			pgrp = task_pgrp(current);
+		do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
+			niceval = 20 - task_nice(p);
+			if (niceval > retval)
+				retval = niceval;
+		} while_each_pid_thread(pgrp, PIDTYPE_PGID, p);
+		break;
+	case PRIO_USER:
+		uid = make_kuid(cred->user_ns, who);
+		user = cred->user;
+		if (!who)
+			uid = cred->uid;
+		else if (!uid_eq(uid, cred->uid) &&
+			 !(user = find_user(uid)))
+			goto out_unlock;	/* No processes for this user */
+
+		do_each_thread(g, p) {
+			if (uid_eq(task_uid(p), uid)) {
 				niceval = 20 - task_nice(p);
 				if (niceval > retval)
 					retval = niceval;
 			}
-			break;
-		case PRIO_PGRP:
-			if (who)
-				pgrp = find_vpid(who);
-			else
-				pgrp = task_pgrp(current);
-			do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
-				niceval = 20 - task_nice(p);
-				if (niceval > retval)
-					retval = niceval;
-			} while_each_pid_thread(pgrp, PIDTYPE_PGID, p);
-			break;
-		case PRIO_USER:
-			uid = make_kuid(cred->user_ns, who);
-			user = cred->user;
-			if (!who)
-				uid = cred->uid;
-			else if (!uid_eq(uid, cred->uid) &&
-				 !(user = find_user(uid)))
-				goto out_unlock;	/* No processes for this user */
-
-			do_each_thread(g, p) {
-				if (uid_eq(task_uid(p), uid)) {
-					niceval = 20 - task_nice(p);
-					if (niceval > retval)
-						retval = niceval;
-				}
-			} while_each_thread(g, p);
-			if (!uid_eq(uid, cred->uid))
-				free_uid(user);		/* for find_user() */
-			break;
+		} while_each_thread(g, p);
+		if (!uid_eq(uid, cred->uid))
+			free_uid(user);		/* for find_user() */
+		break;
 	}
 out_unlock:
 	read_unlock(&tasklist_lock);
@@ -1541,41 +1541,41 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r)
 		return;
 
 	switch (who) {
-		case RUSAGE_BOTH:
-		case RUSAGE_CHILDREN:
-			utime = p->signal->cutime;
-			stime = p->signal->cstime;
-			r->ru_nvcsw = p->signal->cnvcsw;
-			r->ru_nivcsw = p->signal->cnivcsw;
-			r->ru_minflt = p->signal->cmin_flt;
-			r->ru_majflt = p->signal->cmaj_flt;
-			r->ru_inblock = p->signal->cinblock;
-			r->ru_oublock = p->signal->coublock;
-			maxrss = p->signal->cmaxrss;
-
-			if (who == RUSAGE_CHILDREN)
-				break;
-
-		case RUSAGE_SELF:
-			thread_group_cputime_adjusted(p, &tgutime, &tgstime);
-			utime += tgutime;
-			stime += tgstime;
-			r->ru_nvcsw += p->signal->nvcsw;
-			r->ru_nivcsw += p->signal->nivcsw;
-			r->ru_minflt += p->signal->min_flt;
-			r->ru_majflt += p->signal->maj_flt;
-			r->ru_inblock += p->signal->inblock;
-			r->ru_oublock += p->signal->oublock;
-			if (maxrss < p->signal->maxrss)
-				maxrss = p->signal->maxrss;
-			t = p;
-			do {
-				accumulate_thread_rusage(t, r);
-			} while_each_thread(p, t);
+	case RUSAGE_BOTH:
+	case RUSAGE_CHILDREN:
+		utime = p->signal->cutime;
+		stime = p->signal->cstime;
+		r->ru_nvcsw = p->signal->cnvcsw;
+		r->ru_nivcsw = p->signal->cnivcsw;
+		r->ru_minflt = p->signal->cmin_flt;
+		r->ru_majflt = p->signal->cmaj_flt;
+		r->ru_inblock = p->signal->cinblock;
+		r->ru_oublock = p->signal->coublock;
+		maxrss = p->signal->cmaxrss;
+
+		if (who == RUSAGE_CHILDREN)
 			break;
+		/* fall-through */
+	case RUSAGE_SELF:
+		thread_group_cputime_adjusted(p, &tgutime, &tgstime);
+		utime += tgutime;
+		stime += tgstime;
+		r->ru_nvcsw += p->signal->nvcsw;
+		r->ru_nivcsw += p->signal->nivcsw;
+		r->ru_minflt += p->signal->min_flt;
+		r->ru_majflt += p->signal->maj_flt;
+		r->ru_inblock += p->signal->inblock;
+		r->ru_oublock += p->signal->oublock;
+		if (maxrss < p->signal->maxrss)
+			maxrss = p->signal->maxrss;
+		t = p;
+		do {
+			accumulate_thread_rusage(t, r);
+		} while_each_thread(p, t);
+		break;
 
-		default:
-			BUG();
+	default:
+		BUG();
 	}
 	unlock_task_sighand(p, &flags);
 
-- 
1.8.2.1


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

* [PATCH 03/17] kernel/sys: Replace opened code implementation with nice_to_rlimit().
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 01/17] sched/prio: Add a inline function named nice_to_rlimit() in prio.h Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 02/17] kernel/sys: Fix the indent issue in switch Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 04/17] workqueue: Replace hardcoding of -20 with MIN_NICE Dongsheng Yang
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 kernel/sys.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/sys.c b/kernel/sys.c
index 61a2ae9..1bfe79a 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -250,7 +250,7 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
 		else
 			p = current;
 		if (p) {
-			niceval = 20 - task_nice(p);
+			niceval = nice_to_rlimit(task_nice(p));
 			if (niceval > retval)
 				retval = niceval;
 		}
@@ -261,7 +261,7 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
 		else
 			pgrp = task_pgrp(current);
 		do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
-			niceval = 20 - task_nice(p);
+			niceval = nice_to_rlimit(task_nice(p));
 			if (niceval > retval)
 				retval = niceval;
 		} while_each_pid_thread(pgrp, PIDTYPE_PGID, p);
@@ -277,7 +277,7 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
 
 		do_each_thread(g, p) {
 			if (uid_eq(task_uid(p), uid)) {
-				niceval = 20 - task_nice(p);
+				niceval = nice_to_rlimit(task_nice(p));
 				if (niceval > retval)
 					retval = niceval;
 			}
-- 
1.8.2.1


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

* [PATCH 04/17] workqueue: Replace hardcoding of -20 with MIN_NICE.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (2 preceding siblings ...)
  2014-03-11 10:09 ` [PATCH 03/17] kernel/sys: Replace opened code implementation with nice_to_rlimit() Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 12:22   ` Tejun Heo
  2014-04-18 13:06   ` [tip:sched/core] sched, treewide: Replace hardcoded nice values with MIN_NICE/MAX_NICE tip-bot for Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 05/17] locktorture: Replace hardcoding of 19 with MAX_NICE Dongsheng Yang
                   ` (14 subsequent siblings)
  18 siblings, 2 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang, Tejun Heo

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: Tejun Heo <tj@kernel.org>
---
 kernel/workqueue.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 3fa5b8f..7528bec 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -100,10 +100,10 @@ enum {
 
 	/*
 	 * Rescue workers are used only on emergencies and shared by
-	 * all cpus.  Give -20.
+	 * all cpus.  Give MIN_NICE.
 	 */
-	RESCUER_NICE_LEVEL	= -20,
-	HIGHPRI_NICE_LEVEL	= -20,
+	RESCUER_NICE_LEVEL	= MIN_NICE,
+	HIGHPRI_NICE_LEVEL	= MIN_NICE,
 
 	WQ_NAME_LEN		= 24,
 };
-- 
1.8.2.1


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

* [PATCH 05/17] locktorture: Replace hardcoding of 19 with MAX_NICE.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (3 preceding siblings ...)
  2014-03-11 10:09 ` [PATCH 04/17] workqueue: Replace hardcoding of -20 with MIN_NICE Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 06/17] tools/mq_perf_tests: Replace hardcoding of -20 with MIN_NICE Dongsheng Yang
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang

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

diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
index f26b1a1..23343be 100644
--- a/kernel/locking/locktorture.c
+++ b/kernel/locking/locktorture.c
@@ -216,7 +216,7 @@ static int lock_torture_writer(void *arg)
 	static DEFINE_TORTURE_RANDOM(rand);
 
 	VERBOSE_TOROUT_STRING("lock_torture_writer task started");
-	set_user_nice(current, 19);
+	set_user_nice(current, MAX_NICE);
 
 	do {
 		schedule_timeout_uninterruptible(1);
-- 
1.8.2.1


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

* [PATCH 06/17] tools/mq_perf_tests: Replace hardcoding of -20 with MIN_NICE.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (4 preceding siblings ...)
  2014-03-11 10:09 ` [PATCH 05/17] locktorture: Replace hardcoding of 19 with MAX_NICE Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09   ` Dongsheng Yang
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 tools/testing/selftests/mqueue/mq_perf_tests.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/mqueue/mq_perf_tests.c b/tools/testing/selftests/mqueue/mq_perf_tests.c
index 2fadd4b..09dce51 100644
--- a/tools/testing/selftests/mqueue/mq_perf_tests.c
+++ b/tools/testing/selftests/mqueue/mq_perf_tests.c
@@ -527,9 +527,9 @@ void increase_limits(void)
 	while (try_set(max_msgsize, cur_max_msgsize += 1024))
 		;
 	cur_max_msgsize = get(max_msgsize);
-	if (setpriority(PRIO_PROCESS, 0, -20) != 0)
+	if (setpriority(PRIO_PROCESS, 0, MIN_NICE) != 0)
 		shutdown(2, "setpriority()", __LINE__);
-	cur_nice = -20;
+	cur_nice = MIN_NICE;
 }
 
 int main(int argc, char *argv[])
-- 
1.8.2.1


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

* [PATCH 07/17] mm: Replace hardcoding of 19 with MAX_NICE.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
@ 2014-03-11 10:09   ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 02/17] kernel/sys: Fix the indent issue in switch Dongsheng Yang
                     ` (17 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang,
	linux-mm, Bob Liu, Aneesh Kumar K.V, Kirill A. Shutemov,
	Mel Gorman, Rik van Riel, Andrew Morton

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: linux-mm@kvack.org
cc: Bob Liu <lliubbo@gmail.com>
cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
cc: Mel Gorman <mgorman@suse.de>
cc: Rik van Riel <riel@redhat.com>
cc: Andrew Morton <akpm@linux-foundation.org>
---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 1546655..dcdb6f9 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2803,7 +2803,7 @@ static int khugepaged(void *none)
 	struct mm_slot *mm_slot;
 
 	set_freezable();
-	set_user_nice(current, 19);
+	set_user_nice(current, MAX_NICE);
 
 	while (!kthread_should_stop()) {
 		khugepaged_do_scan();
-- 
1.8.2.1


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

* [PATCH 07/17] mm: Replace hardcoding of 19 with MAX_NICE.
@ 2014-03-11 10:09   ` Dongsheng Yang
  0 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang,
	linux-mm, Bob Liu, Aneesh Kumar K.V, Kirill A. Shutemov,
	Mel Gorman, Rik van Riel, Andrew Morton

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: linux-mm@kvack.org
cc: Bob Liu <lliubbo@gmail.com>
cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
cc: Mel Gorman <mgorman@suse.de>
cc: Rik van Riel <riel@redhat.com>
cc: Andrew Morton <akpm@linux-foundation.org>
---
 mm/huge_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 1546655..dcdb6f9 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2803,7 +2803,7 @@ static int khugepaged(void *none)
 	struct mm_slot *mm_slot;
 
 	set_freezable();
-	set_user_nice(current, 19);
+	set_user_nice(current, MAX_NICE);
 
 	while (!kthread_should_stop()) {
 		khugepaged_do_scan();
-- 
1.8.2.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* [PATCH 08/17] ioprio: Add a macro named NICE_TO_IOPRIO.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (6 preceding siblings ...)
  2014-03-11 10:09   ` Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-12  9:41   ` Dongsheng Yang
  2014-03-19  8:26   ` Peter Zijlstra
  2014-03-11 10:13   ` [Ocfs2-devel] " Dongsheng Yang
                   ` (10 subsequent siblings)
  18 siblings, 2 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang

As the task nice value is in [-20, 19] and the io priority is in [0, 7],
and the convert method from niceval to ioprio is implemented with an
opened code in task_nice_ioprio().

This patch move the implementation to a macro NICE_TO_IOPRIO, making
it more readable and modular.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 include/linux/ioprio.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h
index beb9ce1..c0faa0b 100644
--- a/include/linux/ioprio.h
+++ b/include/linux/ioprio.h
@@ -18,6 +18,11 @@
 #define ioprio_valid(mask)	(IOPRIO_PRIO_CLASS((mask)) != IOPRIO_CLASS_NONE)
 
 /*
+ * Convert the nice value [19,-20] to io priority value [0,7].
+ */
+#define NICE_TO_IOPRIO(nice)	(nice_to_rlimit(nice) / 5)
+
+/*
  * These are the io priority groups as implemented by CFQ. RT is the realtime
  * class, it always gets premium service. BE is the best-effort scheduling
  * class, the default for any process. IDLE is the idle scheduling class, it
@@ -52,7 +57,7 @@ enum {
  */
 static inline int task_nice_ioprio(struct task_struct *task)
 {
-	return (task_nice(task) + 20) / 5;
+	return NICE_TO_IOPRIO(task_nice(task));
 }
 
 /*
-- 
1.8.2.1


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

* [PATCH 09/17] fs/hearbeat: Replace hardcoding of -20 with MIN_NICE.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
@ 2014-03-11 10:13   ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 02/17] kernel/sys: Fix the indent issue in switch Dongsheng Yang
                     ` (17 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang,
	ocfs2-devel, Dong Fang

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: ocfs2-devel@oss.oracle.com
cc: Dong Fang <yp.fangdong@gmail.com>
---
 fs/ocfs2/cluster/heartbeat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index bf482df..7303929 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1107,7 +1107,7 @@ static int o2hb_thread(void *data)
 
 	mlog(ML_HEARTBEAT|ML_KTHREAD, "hb thread running\n");
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	/* Pin node */
 	o2nm_depend_this_node();
-- 
1.8.2.1


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

* [PATCH 10/17] driver/block: Replace hardcoding of -20 with MIN_NICE.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (8 preceding siblings ...)
  2014-03-11 10:13   ` [Ocfs2-devel] " Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 11/17] driver/char: Replace hardcoding of 19 with MAX_NICE Dongsheng Yang
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang,
	nbd-general, Wei Yongjun, Tejun Heo

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: nbd-general@lists.sourceforge.net
cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
cc: Tejun Heo <tj@kernel.org>
---
 drivers/block/loop.c    | 2 +-
 drivers/block/nbd.c     | 2 +-
 drivers/block/pktcdvd.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 66e8c3b..c8bf270 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -548,7 +548,7 @@ static int loop_thread(void *data)
 	struct loop_device *lo = data;
 	struct bio *bio;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	while (!kthread_should_stop() || !bio_list_empty(&lo->lo_bio_list)) {
 
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 55298db..2a1f26b 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -533,7 +533,7 @@ static int nbd_thread(void *data)
 	struct nbd_device *nbd = data;
 	struct request *req;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 	while (!kthread_should_stop() || !list_empty(&nbd->waiting_queue)) {
 		/* wait for something to do */
 		wait_event_interruptible(nbd->waiting_wq,
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index a2af73d..ef166ad 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -1463,7 +1463,7 @@ static int kcdrwd(void *foobar)
 	struct packet_data *pkt;
 	long min_sleep_time, residue;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 	set_freezable();
 
 	for (;;) {
-- 
1.8.2.1


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

* [PATCH 11/17] driver/char: Replace hardcoding of 19 with MAX_NICE.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (9 preceding siblings ...)
  2014-03-11 10:09 ` [PATCH 10/17] driver/block: " Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 12/17] drivers/s390: " Dongsheng Yang
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang,
	openipmi-developer, Corey Minyard

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: openipmi-developer@lists.sourceforge.net
cc: Corey Minyard <minyard@acm.org>
---
 drivers/char/ipmi/ipmi_si_intf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 03f4189..03c0eed 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -999,7 +999,7 @@ static int ipmi_thread(void *data)
 	struct timespec busy_until;
 
 	ipmi_si_set_not_busy(&busy_until);
-	set_user_nice(current, 19);
+	set_user_nice(current, MAX_NICE);
 	while (!kthread_should_stop()) {
 		int busy_wait;
 
-- 
1.8.2.1


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

* [PATCH 12/17] drivers/s390: Replace hardcoding of 19 with MAX_NICE.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (10 preceding siblings ...)
  2014-03-11 10:09 ` [PATCH 11/17] driver/char: Replace hardcoding of 19 with MAX_NICE Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 13/17] sched/prio: Add an inline function named rlimit_to_nice in prio.h Dongsheng Yang
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang,
	linux-s390, Martin Schwidefsky, Ingo Tuchscherer

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: linux-s390@vger.kernel.org
cc: Heiko Carstens <heiko.carstens@de.ibm.com>
cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
cc: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
---
 drivers/s390/crypto/ap_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index ab3baa7..8eec165 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -1803,7 +1803,7 @@ static int ap_poll_thread(void *data)
 	int requests;
 	struct ap_device *ap_dev;
 
-	set_user_nice(current, 19);
+	set_user_nice(current, MAX_NICE);
 	while (1) {
 		if (ap_suspend_flag)
 			return 0;
-- 
1.8.2.1


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

* [PATCH 13/17] sched/prio: Add an inline function named rlimit_to_nice in prio.h.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (11 preceding siblings ...)
  2014-03-11 10:09 ` [PATCH 12/17] drivers/s390: " Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 14/17] driver/staging/android: Use rlimit_to_nice to replace opened code implementation Dongsheng Yang
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang

This patch add an inline function named rlimit_to_nice to convert
rlimit style value in [1, 40] to nice value in [-20, 19].

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 include/linux/sched/prio.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/sched/prio.h b/include/linux/sched/prio.h
index 29756f8..d9cf5a5 100644
--- a/include/linux/sched/prio.h
+++ b/include/linux/sched/prio.h
@@ -49,4 +49,12 @@ static inline long nice_to_rlimit(long nice)
 	return (MAX_NICE - nice + 1);
 }
 
+/*
+ * Convert rlimit style value [1,40] to nice value [-20, 19].
+ */
+static inline long rlimit_to_nice(long prio)
+{
+	return (MAX_NICE - prio + 1);
+}
+
 #endif /* _SCHED_PRIO_H */
-- 
1.8.2.1


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

* [PATCH 14/17] driver/staging/android: Use rlimit_to_nice to replace opened code implementation.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (12 preceding siblings ...)
  2014-03-11 10:09 ` [PATCH 13/17] sched/prio: Add an inline function named rlimit_to_nice in prio.h Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 15/17] driver/staging/lustre: Replace hardcoding of -20 with MIN_NICE Dongsheng Yang
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang, devel,
	Masanari Iida, Bojan Prtvar, Serban Constantinescu

There is a macro rlimit_to_nice in linux/sched/prio.h to convert priority in rlimit
to nice value.

This patch replace the opened implementation with rlimit_to_nice.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: devel@driverdev.osuosl.org
cc: Masanari Iida <standby24x7@gmail.com>
cc: Bojan Prtvar <prtvar.b@gmail.com>
cc: Serban Constantinescu <serban.constantinescu@arm.com>
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
---
 drivers/staging/android/binder.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 1432d95..19e844b 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -436,12 +436,12 @@ static void binder_set_nice(long nice)
 		set_user_nice(current, nice);
 		return;
 	}
-	min_nice = 20 - current->signal->rlim[RLIMIT_NICE].rlim_cur;
+	min_nice = rlimit_to_nice(current->signal->rlim[RLIMIT_NICE].rlim_cur);
 	binder_debug(BINDER_DEBUG_PRIORITY_CAP,
 		     "%d: nice value %ld not allowed use %ld instead\n",
 		      current->pid, nice, min_nice);
 	set_user_nice(current, min_nice);
-	if (min_nice < 20)
+	if (min_nice <= MAX_NICE)
 		return;
 	binder_user_error("%d RLIMIT_NICE not set\n", current->pid);
 }
-- 
1.8.2.1


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

* [PATCH 15/17] driver/staging/lustre: Replace hardcoding of -20 with MIN_NICE.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (13 preceding siblings ...)
  2014-03-11 10:09 ` [PATCH 14/17] driver/staging/android: Use rlimit_to_nice to replace opened code implementation Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 16/17] driver/scsi: " Dongsheng Yang
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang, devel,
	Xiong Zhou, Andreas Dilger, Cyril Roelandt, Kent Overstreet,
	Peng Tao

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: devel@driverdev.osuosl.org
cc: Xiong Zhou <jencce.kernel@gmail.com>
cc: Andreas Dilger <andreas.dilger@intel.com>
cc: Cyril Roelandt <tipecaml@gmail.com>
cc: Kent Overstreet <kmo@daterainc.com>
cc: Peng Tao <bergwolf@gmail.com>
---
 drivers/staging/lustre/lustre/llite/lloop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
index 0718905..e40fc84 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -407,7 +407,7 @@ static int loop_thread(void *data)
 	int refcheck;
 	int ret = 0;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	lo->lo_state = LLOOP_BOUND;
 
-- 
1.8.2.1


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

* [PATCH 16/17] driver/scsi: Replace hardcoding of -20 with MIN_NICE.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (14 preceding siblings ...)
  2014-03-11 10:09 ` [PATCH 15/17] driver/staging/lustre: Replace hardcoding of -20 with MIN_NICE Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-03-11 10:09 ` [PATCH 17/17] sched: Get rid of opened code implementation of funtion nice_to_rlimit() Dongsheng Yang
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang,
	fcoe-devel, James Smart, Robert Jennings, Robert Love

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: fcoe-devel@open-fcoe.org
cc: James Smart <james.smart@emulex.com>
cc: Robert Jennings <rcj@linux.vnet.ibm.com>
cc: Robert Love <robert.w.love@intel.com>
---
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 4 ++--
 drivers/scsi/bnx2i/bnx2i_hwi.c    | 2 +-
 drivers/scsi/fcoe/fcoe.c          | 2 +-
 drivers/scsi/ibmvscsi/ibmvfc.c    | 2 +-
 drivers/scsi/ibmvscsi/ibmvscsi.c  | 2 +-
 drivers/scsi/lpfc/lpfc_hbadisc.c  | 2 +-
 drivers/scsi/qla2xxx/qla_os.c     | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 9b94850..d24067a 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -464,7 +464,7 @@ static int bnx2fc_l2_rcv_thread(void *arg)
 	struct fcoe_percpu_s *bg = arg;
 	struct sk_buff *skb;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 	set_current_state(TASK_INTERRUPTIBLE);
 	while (!kthread_should_stop()) {
 		schedule();
@@ -602,7 +602,7 @@ int bnx2fc_percpu_io_thread(void *arg)
 	struct bnx2fc_work *work, *tmp;
 	LIST_HEAD(work_list);
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 	set_current_state(TASK_INTERRUPTIBLE);
 	while (!kthread_should_stop()) {
 		schedule();
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index e4cf23d..9aaa325 100644
--- a/drivers/scsi/bnx2i/bnx2i_hwi.c
+++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
@@ -1870,7 +1870,7 @@ int bnx2i_percpu_io_thread(void *arg)
 	struct bnx2i_work *work, *tmp;
 	LIST_HEAD(work_list);
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	while (!kthread_should_stop()) {
 		spin_lock_bh(&p->p_work_lock);
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index f317000..843a679 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1872,7 +1872,7 @@ static int fcoe_percpu_receive_thread(void *arg)
 
 	skb_queue_head_init(&tmp);
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 retry:
 	while (!kthread_should_stop()) {
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 23f5ba5..8dd4768 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -4515,7 +4515,7 @@ static int ibmvfc_work(void *data)
 	struct ibmvfc_host *vhost = data;
 	int rc;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	while (1) {
 		rc = wait_event_interruptible(vhost->work_wait_q,
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index fa76440..2ebfb2b 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -2213,7 +2213,7 @@ static int ibmvscsi_work(void *data)
 	struct ibmvscsi_host_data *hostdata = data;
 	int rc;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	while (1) {
 		rc = wait_event_interruptible(hostdata->work_wait_q,
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 883ea2d..1f8f4a7 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -733,7 +733,7 @@ lpfc_do_work(void *p)
 	struct lpfc_hba *phba = p;
 	int rc;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 	current->flags |= PF_NOFREEZE;
 	phba->data_flags = 0;
 
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 89a5300..0e45568 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4756,7 +4756,7 @@ qla2x00_do_dpc(void *data)
 	ha = (struct qla_hw_data *)data;
 	base_vha = pci_get_drvdata(ha->pdev);
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	set_current_state(TASK_INTERRUPTIBLE);
 	while (!kthread_should_stop()) {
-- 
1.8.2.1


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

* [PATCH 17/17] sched: Get rid of opened code implementation of funtion nice_to_rlimit().
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (15 preceding siblings ...)
  2014-03-11 10:09 ` [PATCH 16/17] driver/scsi: " Dongsheng Yang
@ 2014-03-11 10:09 ` Dongsheng Yang
  2014-04-18 10:01   ` Ingo Molnar
  2014-03-12  9:45 ` [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
  2014-03-19  8:36 ` Peter Zijlstra
  18 siblings, 1 reply; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang

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

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index ee8004c..d2735eb 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3046,7 +3046,7 @@ EXPORT_SYMBOL(set_user_nice);
 int can_nice(const struct task_struct *p, const int nice)
 {
 	/* convert nice value [19,-20] to rlimit style value [1,40] */
-	int nice_rlim = 20 - nice;
+	int nice_rlim = nice_to_rlimit(nice);
 
 	return (nice_rlim <= task_rlimit(p, RLIMIT_NICE) ||
 		capable(CAP_SYS_NICE));
-- 
1.8.2.1


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

* [Ocfs2-devel] [PATCH 09/17] fs/hearbeat: Replace hardcoding of -20 with MIN_NICE.
@ 2014-03-11 10:13   ` Dongsheng Yang
  0 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 10:13 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, joe, mingo, tglx, heiko.carstens, Dongsheng Yang,
	ocfs2-devel, Dong Fang

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
cc: ocfs2-devel at oss.oracle.com
cc: Dong Fang <yp.fangdong@gmail.com>
---
 fs/ocfs2/cluster/heartbeat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index bf482df..7303929 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1107,7 +1107,7 @@ static int o2hb_thread(void *data)
 
 	mlog(ML_HEARTBEAT|ML_KTHREAD, "hb thread running\n");
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	/* Pin node */
 	o2nm_depend_this_node();
-- 
1.8.2.1

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

* Re: [PATCH 04/17] workqueue: Replace hardcoding of -20 with MIN_NICE.
  2014-03-11 10:09 ` [PATCH 04/17] workqueue: Replace hardcoding of -20 with MIN_NICE Dongsheng Yang
@ 2014-03-11 12:22   ` Tejun Heo
  2014-03-11 12:55     ` Tejun Heo
  2014-04-18 13:06   ` [tip:sched/core] sched, treewide: Replace hardcoded nice values with MIN_NICE/MAX_NICE tip-bot for Dongsheng Yang
  1 sibling, 1 reply; 34+ messages in thread
From: Tejun Heo @ 2014-03-11 12:22 UTC (permalink / raw)
  To: Dongsheng Yang; +Cc: linux-kernel, peterz, joe, mingo, tglx, heiko.carstens

On Tue, Mar 11, 2014 at 06:09:12PM +0800, Dongsheng Yang wrote:
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
> cc: Tejun Heo <tj@kernel.org>

Applied to wq/for-3.15.

Thanks.

-- 
tejun

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

* Re: [PATCH 04/17] workqueue: Replace hardcoding of -20 with MIN_NICE.
  2014-03-11 12:22   ` Tejun Heo
@ 2014-03-11 12:55     ` Tejun Heo
  2014-03-11 12:56       ` Dongsheng Yang
  0 siblings, 1 reply; 34+ messages in thread
From: Tejun Heo @ 2014-03-11 12:55 UTC (permalink / raw)
  To: Dongsheng Yang; +Cc: linux-kernel, peterz, joe, mingo, tglx, heiko.carstens

On Tue, Mar 11, 2014 at 08:22:25AM -0400, Tejun Heo wrote:
> On Tue, Mar 11, 2014 at 06:09:12PM +0800, Dongsheng Yang wrote:
> > Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
> > cc: Tejun Heo <tj@kernel.org>
> 
> Applied to wq/for-3.15.

And reverted as MIN_NICE is not defined yet.  Please feel free to add
my Acked-by and route it together with the prerequisite changes.

Thanks.

-- 
tejun

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

* Re: [PATCH 04/17] workqueue: Replace hardcoding of -20 with MIN_NICE.
  2014-03-11 12:55     ` Tejun Heo
@ 2014-03-11 12:56       ` Dongsheng Yang
  0 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-11 12:56 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel, peterz, joe, mingo, tglx, heiko.carstens

Hi Tejun,

On 03/11/2014 08:55 PM, Tejun Heo wrote:
> On Tue, Mar 11, 2014 at 08:22:25AM -0400, Tejun Heo wrote:
>> On Tue, Mar 11, 2014 at 06:09:12PM +0800, Dongsheng Yang wrote:
>>> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
>>> cc: Tejun Heo <tj@kernel.org>
>> Applied to wq/for-3.15.
> And reverted as MIN_NICE is not defined yet.  Please feel free to add
> my Acked-by and route it together with the prerequisite changes.

The MIN_NICE is just in tip tree for now. So I think this patch should
go through tip.

Thank you for your ack.
>
> Thanks.
>


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

* Re: [PATCH 08/17] ioprio: Add a macro named NICE_TO_IOPRIO.
  2014-03-11 10:09 ` [PATCH 08/17] ioprio: Add a macro named NICE_TO_IOPRIO Dongsheng Yang
@ 2014-03-12  9:41   ` Dongsheng Yang
  2014-03-19  8:26   ` Peter Zijlstra
  1 sibling, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-12  9:41 UTC (permalink / raw)
  To: Dongsheng Yang; +Cc: linux-kernel, peterz, joe, mingo, tglx, heiko.carstens

On 03/11/2014 06:09 PM, Dongsheng Yang wrote:
> As the task nice value is in [-20, 19] and the io priority is in [0, 7],
> and the convert method from niceval to ioprio is implemented with an
> opened code in task_nice_ioprio().
>
> This patch move the implementation to a macro NICE_TO_IOPRIO, making
> it more readable and modular.
>
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
> ---
>   include/linux/ioprio.h | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h
> index beb9ce1..c0faa0b 100644
> --- a/include/linux/ioprio.h
> +++ b/include/linux/ioprio.h
> @@ -18,6 +18,11 @@
>   #define ioprio_valid(mask)	(IOPRIO_PRIO_CLASS((mask)) != IOPRIO_CLASS_NONE)
>   
>   /*
> + * Convert the nice value [19,-20] to io priority value [0,7].
> + */
> +#define NICE_TO_IOPRIO(nice)	(nice_to_rlimit(nice) / 5)
> +

Hi Peter,
     As you asked, why I added this macro in ioprio.h? And why it is better?

     IMO, there is a policy to convert a nice value to io priority, that 
divide the nice
range into 8 parts by 5. I think this is a common requirement for lots 
of io subsystem.
So I implement this policy with NICE_TO_IOPRIO.

     About function task_nice_iopiro(), it is to get the iopriority of a 
task. It should get the
nice value at first and then use the NICE_TO_IOPRIO to convert it to 
ioprio in the policy.

When our policy changed, we need only update the center controller, 
NICE_TO_IOPRIO.
Keep the others work well.

This is my point about this patch. I wish it explained better. Thanx.
> +/*
>    * These are the io priority groups as implemented by CFQ. RT is the realtime
>    * class, it always gets premium service. BE is the best-effort scheduling
>    * class, the default for any process. IDLE is the idle scheduling class, it
> @@ -52,7 +57,7 @@ enum {
>    */
>   static inline int task_nice_ioprio(struct task_struct *task)
>   {
> -	return (task_nice(task) + 20) / 5;
> +	return NICE_TO_IOPRIO(task_nice(task));
>   }
>   
>   /*


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

* Re: [PATCH 00/17 for-tip V3] A series patches about sched priority.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (16 preceding siblings ...)
  2014-03-11 10:09 ` [PATCH 17/17] sched: Get rid of opened code implementation of funtion nice_to_rlimit() Dongsheng Yang
@ 2014-03-12  9:45 ` Dongsheng Yang
  2014-03-19  8:36 ` Peter Zijlstra
  18 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-12  9:45 UTC (permalink / raw)
  To: Dongsheng Yang; +Cc: linux-kernel, peterz, joe, mingo, tglx, heiko.carstens

Hi Peter,
Let me post more explanation about this patchset.
This series of patches here is to git rid of hardcoding of nice value and
collect the logic control in prio.h.

Currently, in tip tree, we can get 36 results with the below command:

# git grep -n -w -E "19|20"|grep -P "_nice" -i
drivers/block/loop.c:551: set_user_nice(current, -20);
drivers/block/nbd.c:536: set_user_nice(current, -20);
drivers/block/pktcdvd.c:1466: set_user_nice(current, -20);
drivers/char/ipmi/ipmi_si_intf.c:1002: set_user_nice(current, 19);
drivers/s390/crypto/ap_bus.c:1806: set_user_nice(current, 19);
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:467: set_user_nice(current, -20);
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:605: set_user_nice(current, -20);
drivers/scsi/bnx2i/bnx2i_hwi.c:1873: set_user_nice(current, -20);
drivers/scsi/fcoe/fcoe.c:1875: set_user_nice(current, -20);
drivers/scsi/ibmvscsi/ibmvfc.c:4518: set_user_nice(current, -20);
drivers/scsi/ibmvscsi/ibmvscsi.c:2216: set_user_nice(current, -20);
drivers/scsi/lpfc/lpfc_hbadisc.c:736: set_user_nice(current, -20);
drivers/scsi/qla2xxx/qla_os.c:4759: set_user_nice(current, -20);
drivers/staging/android/binder.c:439: min_nice = 20 - 
current->signal->rlim[RLIMIT_NICE].rlim_cur;
drivers/staging/android/binder.c:444: if (min_nice < 20)
drivers/staging/lustre/lustre/llite/lloop.c:410: set_user_nice(current, 
-20);
fs/ocfs2/cluster/heartbeat.c:1110: set_user_nice(current, -20);
include/linux/ioprio.h:55: return (task_nice(task) + 20) / 5;
kernel/rcu/torture.c:808: set_user_nice(current, 19);
kernel/rcu/torture.c:874: set_user_nice(current, 19);
kernel/rcu/torture.c:990: set_user_nice(current, 19);
kernel/rcu/torture.c:1587: set_user_nice(current, 19);
kernel/sched/core.c:3001: if (TASK_NICE(p) == nice || nice < -20 || nice 
 > 19)
kernel/sched/core.c:3618: attr->sched_nice = clamp(attr->sched_nice, 
-20, 19);
kernel/sched/sched.h:32:#define PRIO_TO_NICE(prio) ((prio) - MAX_RT_PRIO 
- 20)
kernel/sys.c:253: niceval = 20 - task_nice(p);
kernel/sys.c:264: niceval = 20 - task_nice(p);
kernel/sys.c:280: niceval = 20 - task_nice(p);
kernel/trace/ring_buffer_benchmark.c:43:static int producer_nice = 19;
kernel/trace/ring_buffer_benchmark.c:44:static int consumer_nice = 19;
kernel/trace/ring_buffer_benchmark.c:311: producer_nice == 19 && 
consumer_nice == 19)
kernel/workqueue.c:105: RESCUER_NICE_LEVEL = -20,
kernel/workqueue.c:106: HIGHPRI_NICE_LEVEL = -20,
mm/huge_memory.c:2806: set_user_nice(current, 19);
tools/testing/selftests/mqueue/mq_perf_tests.c:532: cur_nice = -20;

It means there are 36 *men* who can decide the max_nice or min_nice.

This patchset collect this power back to prio.h, then the other subsystems
should use the macros in prio.h, rather than decide it by themselves.

In addition, we use macro such as NICE_TO_IOPRIO to replace
a expression “(task_nice(task) + 20) / 5”, I believe the name of
macro means better.

After this patchset applied:

# git grep -n -w -E "19|20"|grep -P "_nice" -i
include/linux/sched/prio.h:4:#define MAX_NICE 19
include/linux/sched/prio.h:5:#define MIN_NICE -20

It looks more safe and more extensibal.

PS: Peter, I see you are busy and this series of patches seems really
trivial. I wish you can give me your opinion about it when you
have a time. No rush at all.

Thanx. :)

On 03/11/2014 06:09 PM, Dongsheng Yang wrote:
> Hi all,
> 	This patchset is all about priority.
>
> 1. Add two inline functions in prio.h named nice_to_rlimit and rlimit_to_nice.
>     They are converting the value between nice value [-20, 19] and
>     rlimit style value [1, 40].
> 2. Add a macro in ioprio.h named NICE_TO_IOPRIO.
>     It convert nice value [-20, 19] to io priority [0, 7].
> 3. Others are all about replace hardcoding value about nice to MIN_NICE or MAX_NICE.
>
> Changelog:
> 	-v2:
> 	  *Splite [2/16] into two patches, one is about the whitespace changes, and
> 	   the other is about nice_to_rlimit().
> 	-v1:
> 	  *Implement nice_to_rlimit and rlimit_to_nice with inline functions
> 	   rather than macro.
> 	  *Add a patch[16/16] to replace opened code implement with nice_to_rlimit().
>
> Dongsheng Yang (16):
>    sched/prio: Add a inline function named nice_to_rlimit() in prio.h.
>    kernel/sys: Replace opened code implementation with nice_to_rlimit().
>    workqueue: Replace hardcoding of -20 with MIN_NICE.
>    locktorture: Replace hardcoding of 19 with MAX_NICE.
>    tools/mq_perf_tests: Replace hardcoding of -20 with MIN_NICE.
>    mm: Replace hardcoding of 19 with MAX_NICE.
>    ioprio: Add a macro named NICE_TO_IOPRIO.
>    fs/hearbeat: Replace hardcoding of -20 with MIN_NICE.
>    driver/block: Replace hardcoding of -20 with MIN_NICE.
>    driver/char: Replace hardcoding of 19 with MAX_NICE.
>    drivers/s390: Replace hardcoding of 19 with MAX_NICE.
>    sched/prio: Add an inline function named rlimit_to_nice in prio.h.
>    driver/staging/android: Use rlimit_to_nice to replace opened code
>      implementation.
>    driver/staging/lustre: Replace hardcoding of -20 with MIN_NICE.
>    driver/scsi: Replace hardcoding of -20 with MIN_NICE.
>    sched: Get rid of opened code implementation of funtion
>      nice_to_rlimit().
>
> Joe Perches (1):
>    kernel/sys: Fix the indent issue in switch.
>
>   drivers/block/loop.c                           |   2 +-
>   drivers/block/nbd.c                            |   2 +-
>   drivers/block/pktcdvd.c                        |   2 +-
>   drivers/char/ipmi/ipmi_si_intf.c               |   2 +-
>   drivers/s390/crypto/ap_bus.c                   |   2 +-
>   drivers/scsi/bnx2fc/bnx2fc_fcoe.c              |   4 +-
>   drivers/scsi/bnx2i/bnx2i_hwi.c                 |   2 +-
>   drivers/scsi/fcoe/fcoe.c                       |   2 +-
>   drivers/scsi/ibmvscsi/ibmvfc.c                 |   2 +-
>   drivers/scsi/ibmvscsi/ibmvscsi.c               |   2 +-
>   drivers/scsi/lpfc/lpfc_hbadisc.c               |   2 +-
>   drivers/scsi/qla2xxx/qla_os.c                  |   2 +-
>   drivers/staging/android/binder.c               |   4 +-
>   drivers/staging/lustre/lustre/llite/lloop.c    |   2 +-
>   fs/ocfs2/cluster/heartbeat.c                   |   2 +-
>   include/linux/ioprio.h                         |   7 +-
>   include/linux/sched/prio.h                     |  16 ++
>   kernel/locking/locktorture.c                   |   2 +-
>   kernel/sched/core.c                            |   2 +-
>   kernel/sys.c                                   | 206 ++++++++++++-------------
>   kernel/workqueue.c                             |   6 +-
>   mm/huge_memory.c                               |   2 +-
>   tools/testing/selftests/mqueue/mq_perf_tests.c |   4 +-
>   23 files changed, 150 insertions(+), 129 deletions(-)
>


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

* Re: [PATCH 08/17] ioprio: Add a macro named NICE_TO_IOPRIO.
  2014-03-11 10:09 ` [PATCH 08/17] ioprio: Add a macro named NICE_TO_IOPRIO Dongsheng Yang
  2014-03-12  9:41   ` Dongsheng Yang
@ 2014-03-19  8:26   ` Peter Zijlstra
  1 sibling, 0 replies; 34+ messages in thread
From: Peter Zijlstra @ 2014-03-19  8:26 UTC (permalink / raw)
  To: Dongsheng Yang; +Cc: linux-kernel, joe, mingo, tglx, heiko.carstens

On Tue, Mar 11, 2014 at 06:09:16PM +0800, Dongsheng Yang wrote:
> As the task nice value is in [-20, 19] and the io priority is in [0, 7],
> and the convert method from niceval to ioprio is implemented with an
> opened code in task_nice_ioprio().
> 
> This patch move the implementation to a macro NICE_TO_IOPRIO, making
> it more readable and modular.
> 
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
> ---
>  include/linux/ioprio.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h
> index beb9ce1..c0faa0b 100644
> --- a/include/linux/ioprio.h
> +++ b/include/linux/ioprio.h
> @@ -18,6 +18,11 @@
>  #define ioprio_valid(mask)	(IOPRIO_PRIO_CLASS((mask)) != IOPRIO_CLASS_NONE)
>  
>  /*
> + * Convert the nice value [19,-20] to io priority value [0,7].
> + */
> +#define NICE_TO_IOPRIO(nice)	(nice_to_rlimit(nice) / 5)
> +
> +/*
>   * These are the io priority groups as implemented by CFQ. RT is the realtime
>   * class, it always gets premium service. BE is the best-effort scheduling
>   * class, the default for any process. IDLE is the idle scheduling class, it
> @@ -52,7 +57,7 @@ enum {
>   */
>  static inline int task_nice_ioprio(struct task_struct *task)
>  {
> -	return (task_nice(task) + 20) / 5;
> +	return NICE_TO_IOPRIO(task_nice(task));
>  }

I'm still not seeing the point of adding that macro; if you want more
documentation; just add the comment.

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

* Re: [PATCH 00/17 for-tip V3] A series patches about sched priority.
  2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
                   ` (17 preceding siblings ...)
  2014-03-12  9:45 ` [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
@ 2014-03-19  8:36 ` Peter Zijlstra
  2014-03-19  9:21   ` Dongsheng Yang
  2014-03-20  2:02   ` Dongsheng Yang
  18 siblings, 2 replies; 34+ messages in thread
From: Peter Zijlstra @ 2014-03-19  8:36 UTC (permalink / raw)
  To: Dongsheng Yang; +Cc: linux-kernel, joe, mingo, tglx, heiko.carstens


I picked up all except:

 2 - whcih I don't think should go through a scheduler tree
 6 - its tools/ bits, the changelog wasn't clear if the MIN/MAX_NICE
      macros were uapi visible and I couldn't be bothered to figure it out.
 8 - I don't like the pointless macro


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

* Re: [PATCH 00/17 for-tip V3] A series patches about sched priority.
  2014-03-19  8:36 ` Peter Zijlstra
@ 2014-03-19  9:21   ` Dongsheng Yang
  2014-03-20  2:02   ` Dongsheng Yang
  1 sibling, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-19  9:21 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: linux-kernel, joe, mingo, tglx, heiko.carstens

Hi Peter,
On 03/19/2014 04:36 PM, Peter Zijlstra wrote:
> I picked up all except:
>
>   2 - whcih I don't think should go through a scheduler tree
I will send it to sys maintainers.
>   6 - its tools/ bits, the changelog wasn't clear if the MIN/MAX_NICE
>        macros were uapi visible and I couldn't be bothered to figure it out.

Wow, yes it is not visible.
>   8 - I don't like the pointless macro
Okey, Thanx Peter.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>


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

* Re: [PATCH 00/17 for-tip V3] A series patches about sched priority.
  2014-03-19  8:36 ` Peter Zijlstra
  2014-03-19  9:21   ` Dongsheng Yang
@ 2014-03-20  2:02   ` Dongsheng Yang
  1 sibling, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-03-20  2:02 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: linux-kernel, joe, mingo, tglx, heiko.carstens

On 03/19/2014 04:36 PM, Peter Zijlstra wrote:
> I picked up all except:
>
>   2 - whcih I don't think should go through a scheduler tree

Peter, as you did not pick the patch 2, there will be a conflict when you
apply [3/17]. I sent a v2 for [3/17], which does not depend to [2/17].

Please replace [3/17] with the V2 one.

Thanx.
>   6 - its tools/ bits, the changelog wasn't clear if the MIN/MAX_NICE
>        macros were uapi visible and I couldn't be bothered to figure it out.
>   8 - I don't like the pointless macro
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>


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

* Re: [PATCH 17/17] sched: Get rid of opened code implementation of funtion nice_to_rlimit().
  2014-04-18 10:01   ` Ingo Molnar
@ 2014-04-18  9:15     ` Dongsheng Yang
  2014-04-18 10:19       ` Ingo Molnar
  0 siblings, 1 reply; 34+ messages in thread
From: Dongsheng Yang @ 2014-04-18  9:15 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, peterz, tglx, heiko.carstens

On 04/18/2014 07:01 PM, Ingo Molnar wrote:
> So the patch title has two typos and a superfluous period.

Really sorry for that. :( I will update it right now.
> I really don't want to apply patches that only get written but don't
> get read...

Spelling double-check was added in my checklist, wish it can make my work
better. :)

Dongsheng
>
> Thanks,
>
> 	Ingo
>


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

* Re: [PATCH 17/17] sched: Get rid of opened code implementation of funtion nice_to_rlimit().
  2014-04-18 10:19       ` Ingo Molnar
@ 2014-04-18  9:25         ` Dongsheng Yang
  0 siblings, 0 replies; 34+ messages in thread
From: Dongsheng Yang @ 2014-04-18  9:25 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, peterz, tglx, heiko.carstens

On 04/18/2014 07:19 PM, Ingo Molnar wrote:
> * Dongsheng Yang <yangds.fnst@cn.fujitsu.com> wrote:
>
>> On 04/18/2014 07:01 PM, Ingo Molnar wrote:
>>> So the patch title has two typos and a superfluous period.
>> Really sorry for that. :( I will update it right now.
> Please wait for the next -tip update before you resend the series -
> I've applied a handful of other patches from you, which will reduce
> the size of your queue.

Okey, thanx !

>
> Thanks,
>
> 	Ingo
>


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

* Re: [PATCH 17/17] sched: Get rid of opened code implementation of funtion nice_to_rlimit().
  2014-03-11 10:09 ` [PATCH 17/17] sched: Get rid of opened code implementation of funtion nice_to_rlimit() Dongsheng Yang
@ 2014-04-18 10:01   ` Ingo Molnar
  2014-04-18  9:15     ` Dongsheng Yang
  0 siblings, 1 reply; 34+ messages in thread
From: Ingo Molnar @ 2014-04-18 10:01 UTC (permalink / raw)
  To: Dongsheng Yang; +Cc: linux-kernel, peterz, tglx, heiko.carstens


So the patch title has two typos and a superfluous period.

I really don't want to apply patches that only get written but don't 
get read...

Thanks,

	Ingo

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

* Re: [PATCH 17/17] sched: Get rid of opened code implementation of funtion nice_to_rlimit().
  2014-04-18  9:15     ` Dongsheng Yang
@ 2014-04-18 10:19       ` Ingo Molnar
  2014-04-18  9:25         ` Dongsheng Yang
  0 siblings, 1 reply; 34+ messages in thread
From: Ingo Molnar @ 2014-04-18 10:19 UTC (permalink / raw)
  To: Dongsheng Yang; +Cc: linux-kernel, peterz, tglx, heiko.carstens


* Dongsheng Yang <yangds.fnst@cn.fujitsu.com> wrote:

> On 04/18/2014 07:01 PM, Ingo Molnar wrote:
> >So the patch title has two typos and a superfluous period.
> 
> Really sorry for that. :( I will update it right now.

Please wait for the next -tip update before you resend the series - 
I've applied a handful of other patches from you, which will reduce 
the size of your queue.

Thanks,

	Ingo

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

* [tip:sched/core] sched, treewide: Replace hardcoded nice values with MIN_NICE/MAX_NICE
  2014-03-11 10:09 ` [PATCH 04/17] workqueue: Replace hardcoding of -20 with MIN_NICE Dongsheng Yang
  2014-03-11 12:22   ` Tejun Heo
@ 2014-04-18 13:06   ` tip-bot for Dongsheng Yang
  1 sibling, 0 replies; 34+ messages in thread
From: tip-bot for Dongsheng Yang @ 2014-04-18 13:06 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, peterz, tj, tglx, yangds.fnst

Commit-ID:  8698a745d800c59cd5a576398bdeccd578ac66f1
Gitweb:     http://git.kernel.org/tip/8698a745d800c59cd5a576398bdeccd578ac66f1
Author:     Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
AuthorDate: Tue, 11 Mar 2014 18:09:12 +0800
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 18 Apr 2014 12:07:24 +0200

sched, treewide: Replace hardcoded nice values with MIN_NICE/MAX_NICE

Replace various -20/+19 hardcoded nice values with MIN_NICE/MAX_NICE.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/ff13819fd09b7a5dba5ab5ae797f2e7019bdfa17.1394532288.git.yangds.fnst@cn.fujitsu.com
Cc: devel@driverdev.osuosl.org
Cc: devicetree@vger.kernel.org
Cc: fcoe-devel@open-fcoe.org
Cc: linux390@de.ibm.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: linux-s390@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Cc: nbd-general@lists.sourceforge.net
Cc: ocfs2-devel@oss.oracle.com
Cc: openipmi-developer@lists.sourceforge.net
Cc: qla2xxx-upstream@qlogic.com
Cc: linux-arch@vger.kernel.org
[ Consolidated the patches, twiddled the changelog. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/block/loop.c                        | 2 +-
 drivers/block/nbd.c                         | 2 +-
 drivers/block/pktcdvd.c                     | 2 +-
 drivers/char/ipmi/ipmi_si_intf.c            | 2 +-
 drivers/s390/crypto/ap_bus.c                | 2 +-
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c           | 4 ++--
 drivers/scsi/bnx2i/bnx2i_hwi.c              | 2 +-
 drivers/scsi/fcoe/fcoe.c                    | 2 +-
 drivers/scsi/ibmvscsi/ibmvfc.c              | 2 +-
 drivers/scsi/ibmvscsi/ibmvscsi.c            | 2 +-
 drivers/scsi/lpfc/lpfc_hbadisc.c            | 2 +-
 drivers/scsi/qla2xxx/qla_os.c               | 2 +-
 drivers/staging/android/binder.c            | 2 +-
 drivers/staging/lustre/lustre/llite/lloop.c | 2 +-
 fs/ocfs2/cluster/heartbeat.c                | 2 +-
 kernel/locking/locktorture.c                | 2 +-
 kernel/workqueue.c                          | 6 +++---
 mm/huge_memory.c                            | 2 +-
 18 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 66e8c3b..c8bf270 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -548,7 +548,7 @@ static int loop_thread(void *data)
 	struct loop_device *lo = data;
 	struct bio *bio;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	while (!kthread_should_stop() || !bio_list_empty(&lo->lo_bio_list)) {
 
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 55298db..2a1f26b 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -533,7 +533,7 @@ static int nbd_thread(void *data)
 	struct nbd_device *nbd = data;
 	struct request *req;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 	while (!kthread_should_stop() || !list_empty(&nbd->waiting_queue)) {
 		/* wait for something to do */
 		wait_event_interruptible(nbd->waiting_wq,
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index a2af73d..ef166ad 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -1463,7 +1463,7 @@ static int kcdrwd(void *foobar)
 	struct packet_data *pkt;
 	long min_sleep_time, residue;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 	set_freezable();
 
 	for (;;) {
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index b7efd3c..0f20d36 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -998,7 +998,7 @@ static int ipmi_thread(void *data)
 	struct timespec busy_until;
 
 	ipmi_si_set_not_busy(&busy_until);
-	set_user_nice(current, 19);
+	set_user_nice(current, MAX_NICE);
 	while (!kthread_should_stop()) {
 		int busy_wait;
 
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
index ab3baa7..8eec165 100644
--- a/drivers/s390/crypto/ap_bus.c
+++ b/drivers/s390/crypto/ap_bus.c
@@ -1803,7 +1803,7 @@ static int ap_poll_thread(void *data)
 	int requests;
 	struct ap_device *ap_dev;
 
-	set_user_nice(current, 19);
+	set_user_nice(current, MAX_NICE);
 	while (1) {
 		if (ap_suspend_flag)
 			return 0;
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 6287f6a..3455cc5 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -464,7 +464,7 @@ static int bnx2fc_l2_rcv_thread(void *arg)
 	struct fcoe_percpu_s *bg = arg;
 	struct sk_buff *skb;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 	set_current_state(TASK_INTERRUPTIBLE);
 	while (!kthread_should_stop()) {
 		schedule();
@@ -602,7 +602,7 @@ int bnx2fc_percpu_io_thread(void *arg)
 	struct bnx2fc_work *work, *tmp;
 	LIST_HEAD(work_list);
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 	set_current_state(TASK_INTERRUPTIBLE);
 	while (!kthread_should_stop()) {
 		schedule();
diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c b/drivers/scsi/bnx2i/bnx2i_hwi.c
index b5ffd28..d6d491c 100644
--- a/drivers/scsi/bnx2i/bnx2i_hwi.c
+++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
@@ -1870,7 +1870,7 @@ int bnx2i_percpu_io_thread(void *arg)
 	struct bnx2i_work *work, *tmp;
 	LIST_HEAD(work_list);
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	while (!kthread_should_stop()) {
 		spin_lock_bh(&p->p_work_lock);
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index f317000..843a679 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1872,7 +1872,7 @@ static int fcoe_percpu_receive_thread(void *arg)
 
 	skb_queue_head_init(&tmp);
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 retry:
 	while (!kthread_should_stop()) {
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 23f5ba5..8dd4768 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -4515,7 +4515,7 @@ static int ibmvfc_work(void *data)
 	struct ibmvfc_host *vhost = data;
 	int rc;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	while (1) {
 		rc = wait_event_interruptible(vhost->work_wait_q,
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index fa76440..2ebfb2b 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -2213,7 +2213,7 @@ static int ibmvscsi_work(void *data)
 	struct ibmvscsi_host_data *hostdata = data;
 	int rc;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	while (1) {
 		rc = wait_event_interruptible(hostdata->work_wait_q,
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 59b51c5..294c072 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -731,7 +731,7 @@ lpfc_do_work(void *p)
 	struct lpfc_hba *phba = p;
 	int rc;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 	current->flags |= PF_NOFREEZE;
 	phba->data_flags = 0;
 
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 19e99cc..afc8481 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4828,7 +4828,7 @@ qla2x00_do_dpc(void *data)
 	ha = (struct qla_hw_data *)data;
 	base_vha = pci_get_drvdata(ha->pdev);
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	set_current_state(TASK_INTERRUPTIBLE);
 	while (!kthread_should_stop()) {
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index cfe4bc8..179b21b 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -441,7 +441,7 @@ static void binder_set_nice(long nice)
 		     "%d: nice value %ld not allowed use %ld instead\n",
 		      current->pid, nice, min_nice);
 	set_user_nice(current, min_nice);
-	if (min_nice < 20)
+	if (min_nice <= MAX_NICE)
 		return;
 	binder_user_error("%d RLIMIT_NICE not set\n", current->pid);
 }
diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c
index f78eda2..d4c2cd9 100644
--- a/drivers/staging/lustre/lustre/llite/lloop.c
+++ b/drivers/staging/lustre/lustre/llite/lloop.c
@@ -407,7 +407,7 @@ static int loop_thread(void *data)
 	int refcheck;
 	int ret = 0;
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	lo->lo_state = LLOOP_BOUND;
 
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index bf482df..7303929 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1107,7 +1107,7 @@ static int o2hb_thread(void *data)
 
 	mlog(ML_HEARTBEAT|ML_KTHREAD, "hb thread running\n");
 
-	set_user_nice(current, -20);
+	set_user_nice(current, MIN_NICE);
 
 	/* Pin node */
 	o2nm_depend_this_node();
diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
index f26b1a1..23343be 100644
--- a/kernel/locking/locktorture.c
+++ b/kernel/locking/locktorture.c
@@ -216,7 +216,7 @@ static int lock_torture_writer(void *arg)
 	static DEFINE_TORTURE_RANDOM(rand);
 
 	VERBOSE_TOROUT_STRING("lock_torture_writer task started");
-	set_user_nice(current, 19);
+	set_user_nice(current, MAX_NICE);
 
 	do {
 		schedule_timeout_uninterruptible(1);
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 0ee63af..c30c01b 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -100,10 +100,10 @@ enum {
 
 	/*
 	 * Rescue workers are used only on emergencies and shared by
-	 * all cpus.  Give -20.
+	 * all cpus.  Give MIN_NICE.
 	 */
-	RESCUER_NICE_LEVEL	= -20,
-	HIGHPRI_NICE_LEVEL	= -20,
+	RESCUER_NICE_LEVEL	= MIN_NICE,
+	HIGHPRI_NICE_LEVEL	= MIN_NICE,
 
 	WQ_NAME_LEN		= 24,
 };
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 1546655..dcdb6f9 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2803,7 +2803,7 @@ static int khugepaged(void *none)
 	struct mm_slot *mm_slot;
 
 	set_freezable();
-	set_user_nice(current, 19);
+	set_user_nice(current, MAX_NICE);
 
 	while (!kthread_should_stop()) {
 		khugepaged_do_scan();

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

end of thread, other threads:[~2014-04-18 13:24 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-11 10:09 [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
2014-03-11 10:09 ` [PATCH 01/17] sched/prio: Add a inline function named nice_to_rlimit() in prio.h Dongsheng Yang
2014-03-11 10:09 ` [PATCH 02/17] kernel/sys: Fix the indent issue in switch Dongsheng Yang
2014-03-11 10:09 ` [PATCH 03/17] kernel/sys: Replace opened code implementation with nice_to_rlimit() Dongsheng Yang
2014-03-11 10:09 ` [PATCH 04/17] workqueue: Replace hardcoding of -20 with MIN_NICE Dongsheng Yang
2014-03-11 12:22   ` Tejun Heo
2014-03-11 12:55     ` Tejun Heo
2014-03-11 12:56       ` Dongsheng Yang
2014-04-18 13:06   ` [tip:sched/core] sched, treewide: Replace hardcoded nice values with MIN_NICE/MAX_NICE tip-bot for Dongsheng Yang
2014-03-11 10:09 ` [PATCH 05/17] locktorture: Replace hardcoding of 19 with MAX_NICE Dongsheng Yang
2014-03-11 10:09 ` [PATCH 06/17] tools/mq_perf_tests: Replace hardcoding of -20 with MIN_NICE Dongsheng Yang
2014-03-11 10:09 ` [PATCH 07/17] mm: Replace hardcoding of 19 with MAX_NICE Dongsheng Yang
2014-03-11 10:09   ` Dongsheng Yang
2014-03-11 10:09 ` [PATCH 08/17] ioprio: Add a macro named NICE_TO_IOPRIO Dongsheng Yang
2014-03-12  9:41   ` Dongsheng Yang
2014-03-19  8:26   ` Peter Zijlstra
2014-03-11 10:09 ` [PATCH 09/17] fs/hearbeat: Replace hardcoding of -20 with MIN_NICE Dongsheng Yang
2014-03-11 10:13   ` [Ocfs2-devel] " Dongsheng Yang
2014-03-11 10:09 ` [PATCH 10/17] driver/block: " Dongsheng Yang
2014-03-11 10:09 ` [PATCH 11/17] driver/char: Replace hardcoding of 19 with MAX_NICE Dongsheng Yang
2014-03-11 10:09 ` [PATCH 12/17] drivers/s390: " Dongsheng Yang
2014-03-11 10:09 ` [PATCH 13/17] sched/prio: Add an inline function named rlimit_to_nice in prio.h Dongsheng Yang
2014-03-11 10:09 ` [PATCH 14/17] driver/staging/android: Use rlimit_to_nice to replace opened code implementation Dongsheng Yang
2014-03-11 10:09 ` [PATCH 15/17] driver/staging/lustre: Replace hardcoding of -20 with MIN_NICE Dongsheng Yang
2014-03-11 10:09 ` [PATCH 16/17] driver/scsi: " Dongsheng Yang
2014-03-11 10:09 ` [PATCH 17/17] sched: Get rid of opened code implementation of funtion nice_to_rlimit() Dongsheng Yang
2014-04-18 10:01   ` Ingo Molnar
2014-04-18  9:15     ` Dongsheng Yang
2014-04-18 10:19       ` Ingo Molnar
2014-04-18  9:25         ` Dongsheng Yang
2014-03-12  9:45 ` [PATCH 00/17 for-tip V3] A series patches about sched priority Dongsheng Yang
2014-03-19  8:36 ` Peter Zijlstra
2014-03-19  9:21   ` Dongsheng Yang
2014-03-20  2:02   ` 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.