lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FDFDEE8.2030108@gmail.com>
Date:	Tue, 19 Jun 2012 10:07:36 +0800
From:	"gnehzuil.lzheng@...il.com" <gnehzuil.lzheng@...il.com>
To:	Rob Landley <rob@...dley.net>
CC:	Jens Axboe <axboe@...nel.dk>, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: Why does ionice(1) ban the user to set back to 'none' class?

On 06/18/2012 10:26 PM, Rob Landley wrote:

> On 06/18/2012 06:48 AM, Zheng Liu wrote:
>> Hi Jens,
>>
>> I meet a problem when I use ionice(1) to adjust a process's io priority.
>> I do the following operations:
>>
>> $ ionice -p${pid}
>> none: prio 0
>> $ ionice -p${pid} -c2 -n4
>> $ ionice -p${pid}
>> best-effort: prio 4
>> $ ionice -p${pid} -c0 -n0
>> $ ionice -p${pid}
>> best-effort: prio 0
>>
>> So I cannot set scheduling class back to 'none'.  If I call ioprio_set(2)
>> directly, it will be fine.  But if I use ionice(1), I cannot change it.  I
>> read the docs about ionice in [1].  I notice this code:
>>
>> switch (ioprio_class) {
>> 	case IOPRIO_CLASS_NONE:
>> 		ioprio_class = IOPRIO_CLASS_BE;
>>                                ^^^^^^^^^^^^^^^^
>>                                *It means that we cannot set back to none.*
>> 		break;
>> 	case IOPRIO_CLASS_RT:
>> 	case IOPRIO_CLASS_BE:
>> 		break;
>> 	case IOPRIO_CLASS_IDLE:
>> 		ioprio = 7;
>> 		break;
>> 	default:
>> 		printf("bad prio class %d\n", ioprio_class);
>> 		return 1;
>> }
>>
>> My question is why we need to ban the user to set back to 'none'.  Is there
>> some reasons?  Thank you.
> 
> Since I'm CC'd, I'll explicitly say I haven't a clue why it does this.


Thank you all the same. :-)

Regards,
Zheng
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ