Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8698a745 authored by Dongsheng Yang's avatar Dongsheng Yang Committed by Ingo Molnar
Browse files

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: default avatarDongsheng Yang <yangds.fnst@cn.fujitsu.com>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarPeter 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: default avatarIngo Molnar <mingo@kernel.org>
parent 10447917
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)) {

+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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 −1
Original line number Diff line number Diff line
@@ -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;

+1 −1
Original line number Diff line number Diff line
@@ -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;
Loading