On 10/03/17 00:39, Linus Walleij wrote: > On Fri, Mar 3, 2017 at 1:22 PM, Adrian Hunter <adrian.hunter@xxxxxxxxx> wrote: >> On 15/02/17 15:49, Linus Walleij wrote: >>> On Fri, Feb 10, 2017 at 1:55 PM, Adrian Hunter <adrian.hunter@xxxxxxxxx> wrote: >>> >>>> Enhance mmc_blk_data_prep() to support CQE requests. >>>> >>>> Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx> >>> >>> Hey: >>> >>>> +#include <linux/ioprio.h> >>> (...) >>>> + if (IOPRIO_PRIO_CLASS(req_get_ioprio(req)) == IOPRIO_CLASS_RT) >>>> + brq->data.flags |= MMC_DATA_PRIO; >>> >>> What is this? >> >> It is the command queue priority. >> >> The command queue supports 2 priorities: "high" (1) and "simple" (0). The >> eMMC will give "high" priority tasks priority over "simple" priority tasks. >> >> So here we give priority to IOPRIO_CLASS_RT which seems appropriate. > > So if I understand correctly, you are obtaining the block layer scheduling > priorities, that can (only?) be set by ionice has from the command line? AFAICS it is the ioprio_set() system call . > > We need to discuss this with the block maintainers. > > I'm not so sure about the future of this. The IOPRIO is only used with the CFQ > scheduler, only two other sites in the kernel use this and MQ and its schedulers > surely does not have ionice handling as far as I know. > > The BFQ does not use it, AFAIK it is using different heuristics to prioritize > block traffic, and that does not include using ionice hints. > > Is ionice:ing something we're really going to do going forward? > Should this be repurposed so that the block scheduler use this prio to > communicate to the driver layer to prioritize certain traffic? That seems like a separate issue. At the moment, I/O priorities are what we have, and giving priority to RT seems appropriate.