Re: [PATCHSET v4] blk-mq-scheduling framework
From: Paolo Valente <hidden>
Date: 2017-01-17 10:47:12
[RESENDING, BECAUSE OF REJECT FROM SERVERS]
Il giorno 17 gen 2017, alle ore 03:47, Jens Axboe <axboe@fb.com <mailto:axboe@fb.com>> ha scritto: On 12/22/2016 08:28 AM, Paolo Valente wrote:quoted
quoted
...Problem: whereas it seems easy and safe to do somewhere else the simple increment that was done in activate_request, I wonder if it may happen that a request is deactivate before being completed. In it may happen, then, without a deactivate_request hook, the increments would remain unbalanced. Or are request completions always guaranteed till no hw/sw components breaks?You should be able to do it in get/put_request. But you might need some extra tracking, I'd need to double check.
Exactly, AFAICT something extra is apparently needed. In particular, get is not ok, because dispatch is a different event (but dispatch is however an already controlled event), while put could be used, provided that it is guaranteed to be executed only after dispatch. If it is not, then I think that an extra flag or something should be added to the request. I don't know whether adding this extra piece would be worst than adding an extra hook.
I'm trying to avoid adding hooks that we don't truly need, the old interface had a lot of that. If you find that you need a hook and it isn't there, feel free to add it. activate/deactivate might be a good change.
If my comments above do not trigger any proposal of a better solution, then I will try by adding only one extra 'deactivate' hook. Unless unbalanced hooks are a bad idea too. Thanks, Paolo
-- Jens Axboe