[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2571ea8b-9d64-b0c1-0311-be0a69cf1320@kernel.dk>
Date: Thu, 23 Jan 2020 12:02:04 -0700
From: Jens Axboe <axboe@...nel.dk>
To: "muraliraja.muniraju" <muraliraja.muniraju@...rik.com>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Adding multiple workers to the loop device.
On 1/23/20 11:59 AM, Jens Axboe wrote:
> On 1/21/20 12:25 PM, muraliraja.muniraju wrote:
>> Current loop device implementation has a single kthread worker and
>> drains one request at a time to completion. If the underneath device is
>> slow then this reduces the concurrency significantly. To help in these
>> cases, adding multiple loop workers increases the concurrency. Also to
>> retain the old behaviour the default number of loop workers is 1 and can
>> be tuned via the ioctl.
>
> Have you considered using blk-mq for this? Right now loop just does
> some basic checks and then queues for a thread. If you bump nr_hw_queues
> up (provide a parameter for that) and set BLK_MQ_F_BLOCKING in the
> tag flags, then that might be a more viable approach for handling this.
Then you could also dump cmd->work, which would shrink loop_cmd by more
than 1/3rd.
--
Jens Axboe
Powered by blists - more mailing lists