1 .\" This is _*_ nroff _*_ source. Emacs, gimme all those colors :)
3 .\" Copyright (c) International Business Machines orp., 2006
5 .\" This program is free software; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
10 .\" This program is distributed in the hope that it will be useful,
11 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
12 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13 .\" the GNU General Public License for more details.
15 .\" You should have received a copy of the GNU General Public License
16 .\" along with this program; if not, write to the Free Software
17 .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 .\" 2006-04-27, created by Eduardo M. Fleury <efleury@br.ibm.com>
22 .\" with various additions by Michael Kerrisk <mtk.manpages@gmail.com>
24 .\" Japanese Version Copyright (c) 2007 Akihiro MOTOKI
25 .\" all rights reserved.
26 .\" Translated 2007-01-09, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.43
27 .\" Updated 2008-08-06, Akihiro MOTOKI, LDP v3.05
29 .TH IOPRIO_SET 2 2008-07-09 "Linux" "Linux Programmer's Manual"
32 .\"O ioprio_get, ioprio_set \- get/set I/O scheduling class and priority
33 ioprio_get, ioprio_set \- I/O ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¥¯¥é¥¹¤ÈÍ¥ÀèÅÙ¤ÎÀßÄê/¼èÆÀ
37 .BI "int ioprio_get(int " which ", int " who );
38 .BI "int ioprio_set(int " which ", int " who ", int " ioprio );
43 .\"O .BR ioprio_get ()
45 .\"O .BR ioprio_set ()
46 .\"O system calls respectively get and set the I/O scheduling class and
47 .\"O priority of one or more processes.
52 ¤Ï¡¢(1¤Ä°Ê¾å¤Î) ¥×¥í¥»¥¹¤Î I/O ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¥¯¥é¥¹¤È
53 Í¥ÀèÅ٤μèÆÀ/ÀßÄê¤ò¹Ô¤¦¡£
59 .\"O arguments identify the process(es) on which the system
63 .\"O argument determines how
65 .\"O is interpreted, and has one of the following values:
69 °ú¤¿ô¤Ç¥·¥¹¥Æ¥à¥³¡¼¥ë¤ÎÁàºîÂоݤȤʤë¥×¥í¥»¥¹¤ò»Ø¼¨¤¹¤ë¡£
73 ¤ò¤É¤Î¤è¤¦¤Ë²ò¼á¤¹¤ë¤«¤ò·è¤á¤ë¤â¤Î¤Ç¡¢°Ê²¼¤Î¤¤¤º¤ì¤«°ì¤Ä¤ò»ØÄꤹ¤ë¡£
77 .\"O is a process ID identifying a single process.
79 ¤Ï¥×¥í¥»¥¹ID ¤Ç¤¢¤ê¡¢»ØÄꤵ¤ì¤¿ 1 ¥×¥í¥»¥¹¤¬ÂоݤȤʤ롣
83 .\"O is a process group ID identifying all the members of a process group.
85 ¤Ï¥×¥í¥»¥¹¥°¥ë¡¼¥×ID ¤Ç¤¢¤ê¡¢¥×¥í¥»¥¹¥°¥ë¡¼¥×¤ÎÁ´¥á¥ó¥Ð¤¬ÂоݤȤʤ롣
89 .\"O is a user ID identifying all of the processes that
90 .\"O have a matching real UID.
92 ¤Ï¥æ¡¼¥¶ID ¤Ç¤¢¤ê¡¢¼Â UID ¤Ë°ìÃפ¹¤ëÁ´¥×¥í¥»¥¹¤¬ÂоݤȤʤ롣
97 .\"O .B IOPRIO_WHO_PGRP
99 .\"O .B IOPRIO_WHO_USER
101 .\"O .BR ioprio_get (),
102 .\"O and more than one process matches
104 .\"O then the returned priority will be the highest one found among
105 .\"O all of the matching processes.
106 .\"O One priority is said to be
107 .\"O higher than another one if it belongs to a higher priority
109 .\"O .RB ( IOPRIO_CLASS_RT
110 .\"O is the highest priority class;
111 .\"O .B IOPRIO_CLASS_IDLE
113 .\"O or if it belongs to the same priority class as the other process but
114 .\"O has a higher priority level (a lower priority number means a
115 .\"O higher priority level).
125 ¤Ë°ìÃפ¹¤ë¥×¥í¥»¥¹¤¬Ê£¿ô¤¢¤Ã¤¿¾ì¹ç¡¢
126 °ìÃפ¹¤ë¥×¥í¥»¥¹Á´ÂΤÎÃæ¤ÇºÇ¤â¹â¤¤Í¥ÀèÅÙ¤¬ÊÖ¤µ¤ì¤ë¡£
127 Í¥ÀèÅÙ¤¬¹â¤¤¤È¤Ï¡¢¤è¤ê¹â¤¤Í¥ÀèÅÙ¥¯¥é¥¹¤Ë°¤·¤Æ¤¤¤ë
128 .RB ( IOPRIO_CLASS_RT
129 ¤¬ºÇ¤â¹â¤¤Í¥ÀèÅÙ¥¯¥é¥¹¤Ç¡¢
131 ¤¬ºÇ¤âÄ㤤)¡¢¤â¤·¤¯¤Ï
132 Ʊ¤¸Í¥ÀèÅÙ¥¯¥é¥¹¤Ë°¤·¤Æ¤¤¤ë¤¬Í¥ÀèÅÙ¥ì¥Ù¥ë¤¬¹â¤¤
133 (Í¥ÀèÅÙÈֹ椬¾®¤µ¤¤Êý¤¬Í¥ÀèÅÙ¥ì¥Ù¥ë¤¬¹â¤¤¤³¤È¤ò°ÕÌ£¤¹¤ë)¡¢
138 .\"O argument given to
139 .\"O .BR ioprio_set ()
140 .\"O is a bit mask that specifies both the scheduling class and the
141 .\"O priority to be assigned to the target process(es).
142 .\"O The following macros are used for assembling and dissecting
148 °ú¤¿ô¤Ï¡¢ÂоݤȤʤë¥×¥í¥»¥¹¤Ë³ä¤êÅö¤Æ¤ë¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¥¯¥é¥¹¤È
149 Í¥ÀèÅÙ¤ÎξÊý¤ò»ØÄꤹ¤ë¥Ó¥Ã¥È¥Þ¥¹¥¯¤Ç¤¢¤ë¡£
151 ¤ÎÃͤòÁȤßΩ¤Æ¤¿¤ê²ò¼á¤¹¤ë¤Î¤Ë¡¢°Ê²¼¤Î¥Þ¥¯¥í¤¬ÍøÍѤǤ¤ë¡£
153 .BI IOPRIO_PRIO_VALUE( class ", " data )
154 .\"O Given a scheduling
158 .\"O this macro combines the two values to produce an
160 .\"O value, which is returned as the result of the macro.
161 ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¥¯¥é¥¹
165 ¤òÍ¿¤¨¤ë¤È¡¢¤³¤Î¥Þ¥¯¥í¤Ï 2¤Ä¤ÎÃͤòÁȤ߹ç¤ï¤»¤Æ¡¢
167 ÃͤòÀ¸À®¤·¡¢¥Þ¥¯¥í¤Î·ë²Ì¤È¤·¤ÆÊÖ¤¹¡£
169 .BI IOPRIO_PRIO_CLASS( mask )
174 .\"O value), this macro returns its I/O class component, that is,
175 .\"O one of the values
176 .\"O .BR IOPRIO_CLASS_RT ,
177 .\"O .BR IOPRIO_CLASS_BE ,
179 .\"O .BR IOPRIO_CLASS_IDLE .
182 ÃÍ) ¤òÍ¿¤¨¤ë¤È¡¢¤³¤Î¥Þ¥¯¥í¤Ï I/O ¥¯¥é¥¹Í×ÁÇ¡¢¤Ä¤Þ¤ê
183 .BR IOPRIO_CLASS_RT ,
184 .BR IOPRIO_CLASS_BE ,
186 ¤Î¤¤¤º¤ì¤«°ì¤Ä¤ÎÃͤòÊÖ¤¹¡£
188 .BI IOPRIO_PRIO_DATA( mask )
193 .\"O value), this macro returns its priority
198 ÃÍ) ¤òÍ¿¤¨¤ë¤È¡¢¤³¤Î¥Þ¥¯¥í¤ÏÍ¥ÀèÅÙ
202 .\"O See the NOTES section for more
203 .\"O information on scheduling classes and priorities.
204 ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¥¯¥é¥¹¤ÈÍ¥ÀèÅ٤˴ؤ¹¤ë¾Ü¤·¤¤¾ðÊó¤Ï¡¢
205 ¡ÖÈ÷¹Í¡×¤ÎÀá¤ò»²¾È¤Î¤³¤È¡£
207 .\"O I/O priorities are supported for reads and for synchronous
208 .\"O .RB ( O_DIRECT ,
211 .\"O I/O priorities are not supported for asynchronous
212 .\"O writes because they are issued outside the context of the program
213 .\"O dirtying the memory, and thus program-specific priorities do not apply.
214 I/O Í¥ÀèÅÙ¤ÏÆɤ߽Ф·¤ÈƱ´ü½ñ¤¹þ¤ß
218 I/O Í¥ÀèÅÙ¤ÏÈóƱ´ü½ñ¤¹þ¤ß¤Ë¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤¡£¤Ê¤¼¤Ê¤é¡¢
219 ÈóƱ´ü½ñ¤¹þ¤ß¤Ï¥á¥â¥ê½ñ¤´¹¤¨¤ò¹Ô¤¦¥×¥í¥°¥é¥à¤ÎÆ°ºî (context) ¤È¤Ï
220 ´Ø·¸¤Ê¤¯È¯¹Ô¤µ¤ì¡¢¤½¤Î¤¿¤á¥×¥í¥°¥é¥àñ°Ì¤ÎÍ¥ÀèÅÙ¤ÏŬÍѤµ¤ì¤Ê¤¤¤«¤é
222 .\"O .SH "RETURN VALUE"
225 .\"O .BR ioprio_get ()
228 .\"O value of the process with highest I/O priority of any of the processes
229 .\"O that match the criteria specified in
233 .\"O On error, \-1 is returned, and
235 .\"O is set to indicate the error.
242 ¤Ç»ØÄꤵ¤ì¤¿´ð½à¤Ë¹çÃפ·¤¿Á´¥×¥í¥»¥¹¤ÇºÇ¤â¹â¤¤ I/O Í¥ÀèÅÙ¤ò»ý¤Ä¥×¥í¥»¥¹¤Î
245 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
247 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
250 .\"O .BR ioprio_set ()
252 .\"O On error, \-1 is returned, and
254 .\"O is set to indicate the error.
258 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
260 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
265 .\"O Invalid value for
269 .\"O Refer to the NOTES section for available scheduler
270 .\"O classes and priority levels for
277 ÍѤ˻ØÄê²Äǽ¤Ê¥¹¥±¥¸¥å¡¼¥é¥¯¥é¥¹¤ÈÍ¥ÀèÅÙ¥ì¥Ù¥ë¤Ë¤Ä¤¤¤Æ¤Ï
278 ¡ÖÈ÷¹Í¡×¤ò»²¾È¤Î¤³¤È¡£
281 .\"O The calling process does not have the privilege needed to assign this
283 .\"O to the specified process(es).
284 .\"O See the NOTES section for more information on required
286 .\"O .BR ioprio_set ().
287 ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤¬¡¢»ØÄꤵ¤ì¤¿¥×¥í¥»¥¹¤Ë
289 ¤ò³ä¤êÅö¤Æ¤ë¤Î¤ËɬÍפʸ¢¸Â¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡£
291 ¤ËɬÍפʸ¢¸Â¤Ë¤Ä¤¤¤Æ¤Î¾Ü¤·¤¤¾ðÊó¤Ï¡ÖÈ÷¹Í¡×¤ÎÀá¤ò»²¾È¤Î¤³¤È¡£
294 .\"O No process(es) could be found that matched the specification in
301 ¤Ç»ØÄꤵ¤ì¤¿´ð½à¤Ë¹çÃפ¹¤ë¥×¥í¥»¥¹¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¡£
304 .\"O These system calls have been available on Linux since
306 ¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¥«¡¼¥Í¥ë 2.6.13 °Ê¹ß¤Î Linux ¤ÇÍøÍѲÄǽ¤Ç¤¢¤ë¡£
307 .\"O .SH "CONFORMING TO"
309 .\"O These system calls are Linux-specific.
310 ¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux Æȼ«¤Ç¤¢¤ë¡£
313 .\"O Glibc does not provide wrapper for these system calls; call them using
314 .\"O .BR syscall (2).
315 glibc ¤Ï¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ËÂФ¹¤ë¥é¥Ã¥Ñ¡¼´Ø¿ô¤òÄ󶡤·¤Æ¤¤¤Ê¤¤¡£
317 ¤ò»È¤Ã¤Æ¸Æ¤Ó½Ð¤¹¤³¤È¡£
319 .\"O These system calls only have an effect when used
320 .\"O in conjunction with an I/O scheduler that supports I/O priorities.
321 .\"O As at kernel 2.6.17 the only such scheduler is the Completely Fair Queuing
322 .\"O (CFQ) I/O scheduler.
323 ¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢I/O Í¥ÀèÅÙ¤ËÂбþ¤·¤¿ I/O ¥¹¥±¥¸¥å¡¼¥é¤È
324 ÁȤ߹ç¤ï¤»¤Æ»ÈÍѤµ¤ì¤¿¾ì¹ç¤Ë¤Î¤ß¸ú²Ì¤ò»ý¤Ä¡£
325 ¥«¡¼¥Í¥ë 2.6.17 ¤Ç¤Ï¡¢¤³¤Î¾ò·ï¤òËþ¤¿¤¹¥¹¥±¥¸¥å¡¼¥é¤Ï
326 Completely Fair Queuing (CFQ) I/O ¥¹¥±¥¸¥å¡¼¥é¤À¤±¤Ç¤¢¤ë¡£
327 .\"O .SS "Selecting an I/O Scheduler"
328 .SS I/O ¥¹¥±¥¸¥å¡¼¥é¤ÎÁªÂò
329 .\"O I/O Schedulers are selected on a per-device basis via the special
331 .\"O .IR /sys/block/<device>/queue/scheduler .
332 I/O ¥¹¥±¥¸¥å¡¼¥é¤ÎÁªÂò¤Ï¥Ç¥Ð¥¤¥¹Ã±°Ì¤Ë¹Ô¤ï¤ì¡¢¤½¤ÎÁªÂò¤Ï
334 .I /sys/block/<device>/queue/scheduler
337 .\"O One can view the current I/O scheduler via the
340 .\"O For example, the following command
341 .\"O displays a list of all schedulers currently loaded in the kernel:
342 ¸½ºß¤Î I/O ¥¹¥±¥¸¥å¡¼¥é¤Ï
344 ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à·Ðͳ¤Ç»²¾È¤Ç¤¤ë¡£Î㤨¤Ð¡¢°Ê²¼¤Î¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ë¤È¡¢
345 ¸½ºß¥«¡¼¥Í¥ë¤Ç¥í¡¼¥É¤µ¤ì¤Æ¤¤¤ë¥¹¥±¥¸¥å¡¼¥é¤ÎÁ´¥ê¥¹¥È¤¬É½¼¨¤µ¤ì¤ë¡£
349 .RB "$" " cat /sys/block/hda/queue/scheduler"
350 noop anticipatory deadline [cfq]
354 .\"O The scheduler surrounded by brackets is the one actually
355 .\"O in use for the device
357 .\"O in the example).
358 ³ç¸Ì¤Ç°Ï¤Þ¤ì¤¿¥¹¥±¥¸¥å¡¼¥é¤¬¤½¤Î¥Ç¥Ð¥¤¥¹ (¾å¤ÎÎã¤Ç¤Ï
360 ¤Ë¤Ä¤¤¤Æ¼ÂºÝ¤Ë»ÈÍѤµ¤ì¤Æ¤¤¤ë¥¹¥±¥¸¥å¡¼¥é¤Ç¤¢¤ë¡£
361 .\"O Setting another scheduler is done by writing the name of the
362 .\"O new scheduler to this file.
363 .\"O For example, the following command will set the
364 .\"O scheduler for the
368 Ê̤Υ¹¥±¥¸¥å¡¼¥é¤òÀßÄꤹ¤ë¤Ë¤Ï¡¢¤³¤Î¥Õ¥¡¥¤¥ë¤Ë¿·¤·¤¤¥¹¥±¥¸¥å¡¼¥é̾¤ò
369 ½ñ¤¹þ¤á¤Ð¤è¤¤¡£Î㤨¤Ð¡¢°Ê²¼¤Î¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ë¤È¡¢¥Ç¥Ð¥¤¥¹
379 .RB "#" " echo cfq > /sys/block/hda/queue/scheduler"
382 .\"O .SS "The Completely Fair Queuing (CFQ) I/O Scheduler"
383 .SS "Completely Fair Queuing (CFQ) I/O ¥¹¥±¥¸¥å¡¼¥é"
384 .\"O Since v3 (aka CFQ Time Sliced) CFQ implements
385 .\"O I/O nice levels similar to those
386 .\"O of CPU scheduling.
387 .\"O These nice levels are grouped in three scheduling classes
388 .\"O each one containing one or more priority levels:
389 ¥Ð¡¼¥¸¥ç¥ó 3 (ÊÌ̾ CFQ Time Sliced) °Ê¹ß¡¢
390 CPU ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¤ÈƱÍͤΠI/O nice ¥ì¥Ù¥ë¤¬ CFQ ¤Ë¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
391 ¤³¤ì¤é¤Î nice ¥ì¥Ù¥ë¤Ï 3¤Ä¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¥¯¥é¥¹¤ËʬÎà¤Ç¤¡¢
392 ³Æ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¥¯¥é¥¹¤Ë¤Ä¤ 1¤Ä°Ê¾å¤ÎÍ¥ÀèÅÙ¥ì¥Ù¥ë¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
394 .BR IOPRIO_CLASS_RT " (1)"
395 .\"O This is the real-time I/O class.
396 .\"O This scheduling class is given
397 .\"O higher priority than any other class:
398 .\"O processes from this class are
399 .\"O given first access to the disk every time.
400 .\"O Thus this I/O class needs to be used with some
401 .\"O care: one I/O real-time process can starve the entire system.
402 .\"O Within the real-time class,
403 .\"O there are 8 levels of class data (priority) that determine exactly
404 .\"O how much time this process needs the disk for on each service.
405 .\"O The highest real-time priority level is 0; the lowest is 7.
406 .\"O In the future this might change to be more directly mappable to
407 .\"O performance, by passing in a desired data rate instead.
408 ¤³¤ì¤Ï¥ê¥¢¥ë¥¿¥¤¥à I/O ¥¯¥é¥¹¤Ç¤¢¤ë¡£
409 ¤³¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¥¯¥é¥¹¤Ë¤Ï¾¤Î¥¯¥é¥¹¤è¤ê¤â¹â¤¤Í¥ÀèÅÙ¤¬Í¿¤¨¤é¤ì¤ë¡£
410 ¤³¤Î¥¯¥é¥¹¤Î¥×¥í¥»¥¹¤Ë¤Ï¡¢¾ï¤Ë¥Ç¥£¥¹¥¯¤Ø¤Î¥¢¥¯¥»¥¹¤¬Í¥À褷¤Æ
411 ³ä¤êÅö¤Æ¤é¤ì¤ë¡£¤½¤Î¤¿¤á¡¢¤³¤Î I/O ¥¯¥é¥¹¤ò»È¤¦ºÝ¤Ë¤Ï¡¢
412 ¤¿¤Ã¤¿°ì¤Ä¤Î ¥ê¥¢¥ë¥¿¥¤¥à I/O ¥¯¥é¥¹¤Î¥×¥í¥»¥¹¤Ë¤è¤ê
413 ¥·¥¹¥Æ¥àÁ´ÂΤΥǥ£¥¹¥¯¥¢¥¯¥»¥¹¤¬¤Ç¤¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤¦¤³¤È¤¬¤¢¤ë
414 ¤È¤¤¤¦ÅÀ¤Ë¡¢Ãí°Õ¤òʧ¤¦É¬Íפ¬¤¢¤ë¡£
415 ¤³¤Î¥¯¥é¥¹¤Ë¤Ï¡¢8 Ãʳ¬¤Î class data (Í¥ÀèÅÙ¥ì¥Ù¥ë) ¤¬¤¢¤ë¡£
416 ¤³¤ÎÃͤϡ¢¤½¤Î¥×¥í¥»¥¹¤¬ 1²ó¤Î¥Ç¥£¥¹¥¯¥¢¥¯¥»¥¹¤Ë¤É¤ì¤À¤±¤Î
417 »þ´Ö¤¬É¬Íפ«¤òÀµ³Î¤Ë·è¤á¤ë¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£
418 ºÇ¹â¤Î¥ê¥¢¥ë¥¿¥¤¥àÍ¥ÀèÅÙ¥ì¥Ù¥ë¤Ï 0 ¤Ç¡¢ºÇÄã¤Ï 7 ¤Ç¤¢¤ë¡£
419 ¾ÍèŪ¤Ë¤Ï¡¢Í¥ÀèÅÙ¥ì¥Ù¥ë¤Ï¡¢´õ˾¤¹¤ë¥Ç¡¼¥¿¥ì¡¼¥È¤òÅϤ¹¤Ê¤É¡¢
420 ¤è¤êľÀÜŪ¤ËÀǽ¾ò·ï¤òÈ¿±Ç¤Ç¤¤ë¤è¤¦¤ËÊѹ¹¤µ¤ì¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
422 .BR IOPRIO_CLASS_BE " (2)"
423 .\"O This is the best-effort scheduling class,
424 .\"O which is the default for any process
425 .\"O that hasn't set a specific I/O priority.
426 .\"O The class data (priority) determines how much
427 .\"O I/O bandwidth the process will get.
428 .\"O Best-effort priority levels are analogous to CPU nice values
430 .\"O .BR getpriority (2)).
431 .\"O The priority level determines a priority relative
432 .\"O to other processes in the best-effort scheduling class.
433 .\"O Priority levels range from 0 (highest) to 7 (lowest).
434 ¤³¤ì¤Ï ¥Ù¥¹¥È¥¨¥Õ¥©¡¼¥È¡¦¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¥¯¥é¥¹¤Ç¤¢¤ë¡£
435 ¤³¤Î¥¯¥é¥¹¤Ï¡¢ÆÃÄê¤Î I/O Í¥ÀèÅÙ¤òÀßÄꤷ¤Æ¤¤¤Ê¤¤¥×¥í¥»¥¹¤Î
437 class data (Í¥ÀèÅÙ¥ì¥Ù¥ë) ¤Ë¤è¤ê¡¢¤½¤Î¥×¥í¥»¥¹¤¬¤É¤ÎÄøÅÙ¤Î
438 I/O ÂÓ°è¤òÆÀ¤é¤ì¤ë¤«¤¬·èÄꤵ¤ì¤ë¡£
439 ¥Ù¥¹¥È¥¨¥Õ¥©¡¼¥È¡¦Í¥ÀèÅÙ¥ì¥Ù¥ë¤Ï¡¢CPU ¤Î nice ÃÍ
440 .RB ( getpriority (2)
441 »²¾È) ¤ÈƱÍͤΤâ¤Î¤Ç¤¢¤ë¡£
442 Í¥ÀèÅÙ¥ì¥Ù¥ë¤Ï¡¢¥Ù¥¹¥È¥¨¥Õ¥©¡¼¥È¡¦¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¥¯¥é¥¹¤ÎÃæ¤Ç
443 ¾¤Î¥×¥í¥»¥¹¤È¤ÎÁêÂÐŪ¤ÊÍ¥ÀèÅÙ¤ò·èÄꤹ¤ë¡£
444 Í¥ÀèÅÙ¥ì¥Ù¥ë¤ÎÃͤÎÈÏ°Ï¤Ï 0 (ºÇ¹â) ¤«¤é 7 (ºÇÄã) ¤Ç¤¢¤ë¡£
446 .BR IOPRIO_CLASS_IDLE " (3)"
447 .\"O This is the idle scheduling class.
448 .\"O Processes running at this level only get I/O
449 .\"O time when no-one else needs the disk.
450 .\"O The idle class has no class data.
451 .\"O Attention is required when assigning this priority class to a process,
452 .\"O since it may become starved if higher priority processes are
453 .\"O constantly accessing the disk.
454 ¤³¤ì¤Ï idle ¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¥¯¥é¥¹¤Ç¤¢¤ë¡£
455 ¤³¤Î¥ì¥Ù¥ë¤ÇÆ°ºî¤¹¤ë¥×¥í¥»¥¹¤Ï¾¤Ë¥Ç¥£¥¹¥¯¥¢¥¯¥»¥¹¤ò¤·¤è¤¦¤È¤¹¤ë
456 ¥×¥í¥»¥¹¤¬¤Ê¤¤¾ì¹ç¤Ë¤Î¤ß I/O »þ´Ö¤ò¼èÆÀ¤¹¤ë¡£
457 idle ¥¯¥é¥¹¤Ë¤Ï class data (Í¥ÀèÅÙ) ¤ÏÍÑ°Õ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
458 ¥×¥í¥»¥¹¤Ë¤³¤ÎÍ¥ÀèÅÙ¤ò³ä¤êÅö¤Æ¤ëºÝ¤Ë¤ÏÃí°Õ¤¬É¬ÍפǤ¢¤ë¡£
459 ¤Ê¤¼¤Ê¤é¡¢Í¥ÀèÅ٤ι⤤¥×¥í¥»¥¹¤¬¾ï¤Ë¥Ç¥£¥¹¥¯¤Ë¥¢¥¯¥»¥¹¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï
460 ¥Ç¥£¥¹¥¯¤Ë¥¢¥¯¥»¥¹¤Ç¤¤Ê¤¯¤Ê¤ë²ÄǽÀ¤¬¤¢¤ë¤«¤é¤À¡£
463 .\"O .I Documentation/block/ioprio.txt
464 .\"O for more information on the CFQ I/O Scheduler and an example program.
465 CFQ I/O ¥¹¥±¥¸¥å¡¼¥é¤Î¹¹¤Ê¤ë¾ðÊó¤È¥µ¥ó¥×¥ë¥×¥í¥°¥é¥à¤Ë¤Ä¤¤¤Æ¤Ï
466 .I Documentation/block/ioprio.txt
468 .\"O .SS "Required permissions to set I/O priorities"
469 .SS "I/O Í¥ÀèÅÙ¤ÎÀßÄê¤ËɬÍפʵö²Ä"
470 .\"O Permission to change a process's priority is granted or denied based
471 .\"O on two assertions:
472 ¥×¥í¥»¥¹¤ÎÍ¥ÀèÅÙ¤òÊѹ¹¤¹¤ëµö²Ä¤¬ÆÀ¤é¤ì¤ë¤«¤É¤¦¤«¤Ï
473 °Ê²¼¤Î 2¤Ä¤Î¾ò·ï¤Ë´ð¤¤¤Æ·èÄꤵ¤ì¤ë¡£
475 .\"O .B "Process ownership"
476 .B "¥×¥í¥»¥¹¤Î½ê͸¢"
477 .\"O An unprivileged process may only set the I/O priority of a process
479 .\"O matches the real or effective UID of the calling process.
480 .\"O A process which has the
482 .\"O capability can change the priority of any process.
483 ÈóÆø¢¥×¥í¥»¥¹¤Ï¡¢¥×¥í¥»¥¹¤Î¼Â UID ¤¬¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¼Â UID ¤â¤·¤¯¤Ï
484 ¼Â¸ú UID ¤È°ìÃפ¹¤ë¥×¥í¥»¥¹¤Î I/O Í¥ÀèÅ٤ΤߤòÀßÄê¤Ç¤¤ë¡£
486 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤ò»ý¤Ä¥×¥í¥»¥¹¤Ï¡¢¤É¤Î¥×¥í¥»¥¹¤ÎÍ¥ÀèÅ٤ǤâÊѹ¹¤Ç¤¤ë¡£
488 .\"O .B "What is the desired priority"
489 .B "¤É¤ÎÍ¥ÀèÅÙ¤ËÀßÄꤷ¤è¤¦¤È¤·¤Æ¤¤¤ë¤«"
490 .\"O Attempts to set very high priorities
491 .\"O .RB ( IOPRIO_CLASS_RT )
493 .\"O .B CAP_SYS_ADMIN
496 .RB ( IOPRIO_CLASS_RT )
497 ¤òÀßÄꤷ¤è¤¦¤È¤¹¤ë¾ì¹ç¡¢
499 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤¬É¬ÍפǤ¢¤ë¡£
500 .\"O Kernel versions up to 2.6.24 also required
501 .\"O .B CAP_SYS_ADMIN
502 .\"O to set a very low priority
503 .\"O .RB ( IOPRIO_CLASS_IDLE ),
504 .\"O but since Linux 2.6.25, this is no longer required.
505 ¥«¡¼¥Í¥ë 2.6.24 °ÊÁ°¤Ç¤Ï¡¢Èó¾ï¤ËÄ㤤ͥÀèÅÙ
506 .RB ( IOPRIO_CLASS_IDLE )
509 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¤¬É¬ÍפǤ¢¤Ã¤¿¤¬¡¢
510 Linux 2.6.25 °Ê¹ß¤Ç¤Ï¤â¤Ï¤äɬÍפʤ¯¤Ê¤Ã¤¿¡£
513 .\"O .BR ioprio_set ()
514 .\"O must follow both rules, or the call will fail with the error
517 ¤Ï¤³¤ÎξÊý¤Î¥ë¡¼¥ë¤Ë½¾¤¤¡¢¾ò·ï¤òËþ¤¿¤µ¤Ê¤¤¾ì¹ç¡¢¥¨¥é¡¼
522 .\" 6 May 07: Bug report raised:
523 .\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=4464
524 .\" Ulriich Drepper replied that he wasn't going to add these
526 .\"O Glibc does not yet provide a suitable header file defining
527 .\"O the function prototypes and macros described on this page.
528 .\"O Suitable definitions can be found in
529 .\"O .IR linux/ioprio.h .
530 glibc ¤Ï¡¢¤³¤Î¥Ú¡¼¥¸¤ËµºÜ¤µ¤ì¤¿´Ø¿ô¥×¥í¥È¥¿¥¤¥×¤ä¥Þ¥¯¥í¤òÄêµÁ¤¹¤ë
531 ŬÀڤʥإåÀ¥Õ¥¡¥¤¥ë¤ò¤Þ¤ÀÄ󶡤·¤Æ¤¤¤Ê¤¤¡£
541 .\"O Documentation/block/ioprio.txt in the kernel source tree.
542 ¥«¡¼¥Í¥ë¡¦¥½¡¼¥¹Æâ¤Î Documentation/block/ioprio.txt