lkml.org 
[lkml]   [2023]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] blk-ioprio: Introduce promote-to-rt policy
    From
    On 1/31/23 20:52, Hou Tao wrote:
    > /**
    > * enum prio_policy - I/O priority class policy.
    > * @POLICY_NO_CHANGE: (default) do not modify the I/O priority class.
    > @@ -27,21 +34,30 @@
    > * @POLICY_RESTRICT_TO_BE: modify IOPRIO_CLASS_NONE and IOPRIO_CLASS_RT into
    > * IOPRIO_CLASS_BE.
    > * @POLICY_ALL_TO_IDLE: change the I/O priority class into IOPRIO_CLASS_IDLE.
    > - *
    > + * @POLICY_PROMOTE_TO_RT: modify IOPRIO_CLASS_NONE and IOPRIO_CLASS_BE into
    > + * IOPRIO_CLASS_RT.
    > * See also <linux/ioprio.h>.
    > */
    > enum prio_policy {
    > - POLICY_NO_CHANGE = 0,
    > - POLICY_NONE_TO_RT = 1,
    > - POLICY_RESTRICT_TO_BE = 2,
    > - POLICY_ALL_TO_IDLE = 3,
    > + POLICY_NO_CHANGE = IOPRIO_CLASS_NONE,
    > + POLICY_NONE_TO_RT = IOPRIO_CLASS_RT,
    > + POLICY_RESTRICT_TO_BE = IOPRIO_CLASS_BE,
    > + POLICY_ALL_TO_IDLE = IOPRIO_CLASS_IDLE,
    > + POLICY_PROMOTE_TO_RT = IOPRIO_CLASS_RT | IOPRIO_POL_PROMOTION,
    > +};

    The above change complicates the ioprio code. Additionally, I'm
    concerned that it makes the ioprio code slower. Has it been considered
    to keep the numerical values for the existing policies, to assign the
    number 4 to POLICY_PROMOTE_TO_RT and to use a lookup-array in
    blkcg_set_ioprio() to convert the policy number into an IOPRIO_CLASS value?

    Thanks,

    Bart.

    \
     
     \ /
      Last update: 2023-03-27 00:06    [W:4.244 / U:0.480 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site