On Thu, Dec 06, 2018 at 05:15:07PM -0500, Mike Snitzer wrote: > From: Eric Wheeler <dm-devel@xxxxxxxxxxxxxxxxxx> > > Since dm-crypt queues writes (and sometimes reads) to a different kernel > thread (workqueue), the bios will dispatch from tasks with different > io_context->ioprio settings than the submitting task, thus giving > incorrect ioprio hints to the io scheduler. > > By assigning the ioprio to the bio before queuing to a workqueue, the > original submitting task's io_context->ioprio setting can be retained > through the life of the bio. We only set the bio's ioprio in dm-crypt > if not already set (by somewhere else, higher in the stack). The scheme looks a little odd to me. Instead of requring a driver call why don't we just make sure bios always have the submitting tasks priority set and then make sure the lower layers can rely on it? -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel