Skip to content

Commit 8698a74

Browse files
Dongsheng Yangingomolnar
authored andcommitted
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>
1 parent 1044791 commit 8698a74

18 files changed

Lines changed: 21 additions & 21 deletions

File tree

‎drivers/block/loop.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ static int loop_thread(void *data)
548548
struct loop_device *lo = data;
549549
struct bio *bio;
550550

551-
set_user_nice(current, -20);
551+
set_user_nice(current, MIN_NICE);
552552

553553
while (!kthread_should_stop() || !bio_list_empty(&lo->lo_bio_list)) {
554554

‎drivers/block/nbd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ static int nbd_thread(void *data)
533533
struct nbd_device *nbd = data;
534534
struct request *req;
535535

536-
set_user_nice(current, -20);
536+
set_user_nice(current, MIN_NICE);
537537
while (!kthread_should_stop() || !list_empty(&nbd->waiting_queue)) {
538538
/* wait for something to do */
539539
wait_event_interruptible(nbd->waiting_wq,

‎drivers/block/pktcdvd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,7 @@ static int kcdrwd(void *foobar)
14631463
struct packet_data *pkt;
14641464
long min_sleep_time, residue;
14651465

1466-
set_user_nice(current, -20);
1466+
set_user_nice(current, MIN_NICE);
14671467
set_freezable();
14681468

14691469
for (;;) {

‎drivers/char/ipmi/ipmi_si_intf.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ static int ipmi_thread(void *data)
998998
struct timespec busy_until;
999999

10001000
ipmi_si_set_not_busy(&busy_until);
1001-
set_user_nice(current, 19);
1001+
set_user_nice(current, MAX_NICE);
10021002
while (!kthread_should_stop()) {
10031003
int busy_wait;
10041004

‎drivers/s390/crypto/ap_bus.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1803,7 +1803,7 @@ static int ap_poll_thread(void *data)
18031803
int requests;
18041804
struct ap_device *ap_dev;
18051805

1806-
set_user_nice(current, 19);
1806+
set_user_nice(current, MAX_NICE);
18071807
while (1) {
18081808
if (ap_suspend_flag)
18091809
return 0;

‎drivers/scsi/bnx2fc/bnx2fc_fcoe.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static int bnx2fc_l2_rcv_thread(void *arg)
464464
struct fcoe_percpu_s *bg = arg;
465465
struct sk_buff *skb;
466466

467-
set_user_nice(current, -20);
467+
set_user_nice(current, MIN_NICE);
468468
set_current_state(TASK_INTERRUPTIBLE);
469469
while (!kthread_should_stop()) {
470470
schedule();
@@ -602,7 +602,7 @@ int bnx2fc_percpu_io_thread(void *arg)
602602
struct bnx2fc_work *work, *tmp;
603603
LIST_HEAD(work_list);
604604

605-
set_user_nice(current, -20);
605+
set_user_nice(current, MIN_NICE);
606606
set_current_state(TASK_INTERRUPTIBLE);
607607
while (!kthread_should_stop()) {
608608
schedule();

‎drivers/scsi/bnx2i/bnx2i_hwi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1870,7 +1870,7 @@ int bnx2i_percpu_io_thread(void *arg)
18701870
struct bnx2i_work *work, *tmp;
18711871
LIST_HEAD(work_list);
18721872

1873-
set_user_nice(current, -20);
1873+
set_user_nice(current, MIN_NICE);
18741874

18751875
while (!kthread_should_stop()) {
18761876
spin_lock_bh(&p->p_work_lock);

‎drivers/scsi/fcoe/fcoe.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,7 @@ static int fcoe_percpu_receive_thread(void *arg)
18721872

18731873
skb_queue_head_init(&tmp);
18741874

1875-
set_user_nice(current, -20);
1875+
set_user_nice(current, MIN_NICE);
18761876

18771877
retry:
18781878
while (!kthread_should_stop()) {

‎drivers/scsi/ibmvscsi/ibmvfc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4515,7 +4515,7 @@ static int ibmvfc_work(void *data)
45154515
struct ibmvfc_host *vhost = data;
45164516
int rc;
45174517

4518-
set_user_nice(current, -20);
4518+
set_user_nice(current, MIN_NICE);
45194519

45204520
while (1) {
45214521
rc = wait_event_interruptible(vhost->work_wait_q,

‎drivers/scsi/ibmvscsi/ibmvscsi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2213,7 +2213,7 @@ static int ibmvscsi_work(void *data)
22132213
struct ibmvscsi_host_data *hostdata = data;
22142214
int rc;
22152215

2216-
set_user_nice(current, -20);
2216+
set_user_nice(current, MIN_NICE);
22172217

22182218
while (1) {
22192219
rc = wait_event_interruptible(hostdata->work_wait_q,

0 commit comments

Comments
 (0)