Re: [PATCH] Skip I/O merges when disabled
From: Jens Axboe
Date: Tue Apr 29 2008 - 08:44:55 EST
On Tue, Apr 29 2008, Alan D. Brunelle wrote:
>
> The block I/O + elevator + I/O scheduler code spend a lot of time trying
> to merge I/Os -- rightfully so under "normal" circumstances. However,
> if one were to know that the incoming I/O stream was /very/ random in
> nature, the cycles are wasted.
>
> This patch adds a per-request_queue tunable that (when set) disables
> merge attempts (beyond the simple one-hit cache check), thus freeing up
> a non-trivial amount of CPU cycles.
Thanks Alan, applied. Made one little change (since I had to hand apply
the patch anyway):
> +static ssize_t queue_nomerges_show(struct request_queue *q, char *page)
> +{
> + int nm = test_bit(QUEUE_FLAG_NOMERGES, &q->queue_flags);
> + return queue_var_show(nm, page);
> +}
static ssize_t queue_nomerges_show(struct request_queue *q, char *page)
{
return queue_var_show(blk_queue_nomerges(q), page);
}
--
Jens Axboe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/