Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1594580
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC 10/14] block, bfq: add Early Queue Merge (EQM) |
| Date | 2017-03-07 20:40 +0100 |
| Message-ID | <tit7I-3FT-11@gated-at.bofh.it> (permalink) |
| References | <thkpQ-3cO-5@gated-at.bofh.it> <thkpQ-3cO-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 03/04/2017 09:01 AM, Paolo Valente wrote:
> @@ -560,6 +600,15 @@ struct bfq_data {
> struct bfq_io_cq *bio_bic;
> /* bfqq associated with the task issuing current bio for merging */
> struct bfq_queue *bio_bfqq;
> +
> + /*
> + * io context to put right after bfqd->lock is released. This
> + * filed is used to perform put_io_context, when needed, to
> + * after the scheduler lock has been released, and thus
> + * prevent an ioc->lock from being possibly taken while the
> + * scheduler lock is being held.
> + */
> + struct io_context *ioc_to_put;
> };
The logic around this is nasty, effectively you end up having locking
around sections of code instea of structures, which is never a good
idea.
The helper functions for unlocking and dropping the ioc add to the mess
as well.
Can't we simply pass back a pointer to an ioc to free? That should be
possible, given that we must have grabbed the bfqd lock ourselves
further up in the call chain. So we _know_ that we'll drop it later on.
If that wasn't the case, the existing logic wouldn't work.
--
Jens Axboe
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH RFC 00/14] Add the BFQ I/O Scheduler to blk-mq Paolo Valente <paolo.valente@linaro.org> - 2017-03-04 17:10 +0100
Re: [PATCH RFC 01/14] block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler Jens Axboe <axboe@kernel.dk> - 2017-03-05 16:30 +0100
Re: [PATCH RFC 01/14] block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler Paolo Valente <paolo.valente@linaro.org> - 2017-03-05 17:10 +0100
Re: [PATCH RFC 01/14] block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler Jens Axboe <axboe@kernel.dk> - 2017-03-06 23:30 +0100
Re: [PATCH RFC 00/14] Add the BFQ I/O Scheduler to blk-mq Markus Trippelsdorf <markus@trippelsdorf.de> - 2017-03-06 08:50 +0100
Re: [PATCH RFC 10/14] block, bfq: add Early Queue Merge (EQM) Jens Axboe <axboe@kernel.dk> - 2017-03-07 20:40 +0100
Re: [PATCH RFC 01/14] block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler Jens Axboe <axboe@kernel.dk> - 2017-03-08 00:30 +0100
csiph-web