CFQ and dm-crypt

From: Richard Kralovic
Date: Sun Oct 24 2010 - 10:06:12 EST


This is a multi-part message in MIME format.CFQ io scheduler relies on using task_struct current to determine which
process makes the io request. On the other hand, some dm modules (such
as dm-crypt) use separate threads for doing io. As CFQ sees only these
threads, it provides a very poor performance in such a case.

IMHO the correct solution for this would be to store, for every io
request, the process that initiated it (and preserve this information
while the request is processed by device mapper). Would that be feasible?

Other possibility is to avoid using separate threads for doing io in dm
modules. The attached patch (against 2.6.36) modifies dm-crypt in this
way, what results into much better behavior of cfq (e.g., io priorities
work correctly).

Greets
Richard

(Please CC replies to me.)