On Thu, Mar 25, 2021 at 10:34:02AM +0800, JeffleXu wrote:
>
>
> On 3/24/21 8:19 PM, Ming Lei wrote:
> > Create per-task io poll context for both IO submission and poll task
> > if the queue is bio based and supports polling.
> >
> > This io polling context includes two queues:
> >
> > 1)
On 2021/3/22 22:22, Mike Snitzer wrote:
> On Mon, Mar 22 2021 at 4:11am -0400,
> Christoph Hellwig wrote:
>
>> On Sat, Mar 20, 2021 at 03:19:23PM +0800, Zhiqiang Liu wrote:
>>> From: Zhiqiang Liu
>>>
>>> When we make IO stress test on multipath device, there will
>>> be a metadata err
On 2021/3/24 1:11, Ewan D. Milne wrote:
> On Tue, 2021-03-23 at 15:47 +0800, lixiaokeng wrote:
>>
>> On 2021/3/22 22:22, Mike Snitzer wrote:
>>> On Mon, Mar 22 2021 at 4:11am -0400,
>>> Christoph Hellwig wrote:
>>>
On Sat, Mar 20, 2021 at 03:19:23PM +0800, Zhiqiang Liu wrote:
> From:
On Wed, Mar 24, 2021 at 04:32:31PM +0100, Hannes Reinecke wrote:
> On 3/24/21 1:19 PM, Ming Lei wrote:
> > Add one req flag REQ_POLL_CTX which will be used in the following patch for
> > supporting bio based IO polling.
> >
> > Exactly this flag can help us to do:
> >
> > 1) request flag is
On Wed, Mar 24, 2021 at 07:17:02PM +0100, Christoph Hellwig wrote:
> On Wed, Mar 24, 2021 at 08:19:17PM +0800, Ming Lei wrote:
> > Add one helper for creating io context and prepare for supporting
> > efficient bio based io poll.
>
> Looking at what gets added later here I do not think this
On Wed, Mar 24, 2021 at 08:19:15PM +0800, Ming Lei wrote:
> There has been 3 users, and will be more, so add one such helper.
>
> Reviewed-by: Chaitanya Kulkarni
> Signed-off-by: Ming Lei
Can't say I'm a huge fan of these wrappers that obsfucate what
actually is checked here. But it does fit
On Wed, Mar 24, 2021 at 08:19:17PM +0800, Ming Lei wrote:
> Add one helper for creating io context and prepare for supporting
> efficient bio based io poll.
Looking at what gets added later here I do not think this helper is
a good idea. Having a separate one for creating any needed poll-only
On Wed, Mar 24, 2021 at 10:39 AM Christoph Hellwig wrote:
>
> On Wed, Mar 24, 2021 at 09:37:01AM -0700, Dan Williams wrote:
> > > Eww. As I said I think the right way is that the file system (or
> > > other consumer) can register a set of callbacks for opening the device.
> >
> > How does that
On Wed, Mar 24, 2021 at 09:37:01AM -0700, Dan Williams wrote:
> > Eww. As I said I think the right way is that the file system (or
> > other consumer) can register a set of callbacks for opening the device.
>
> How does that solve the problem of the driver being notified of all
> pfn failure
On Wed, Mar 24, 2021 at 12:48 AM Christoph Hellwig wrote:
>
> On Tue, Mar 23, 2021 at 07:19:28PM -0700, Dan Williams wrote:
> > So I think the path forward is:
> >
> > - teach memory_failure() to allow for ranged failures
> >
> > - let interested drivers register for memory failure events via a
>
Well, when it will failover, it will probably be directed to the poll
queues. Maybe I'm missing something...
In this patchset, because it isn't submitted directly from FS, there
isn't one polling context associated with this bio, so its HIPRI flag
will be cleared, then fallback to irq mode.
On 3/24/21 1:19 PM, Ming Lei wrote:
Add one req flag REQ_POLL_CTX which will be used in the following patch for
supporting bio based IO polling.
Exactly this flag can help us to do:
1) request flag is cloned in bio_fast_clone(), so if we mark one FS bio
as REQ_POLL_CTX, all bios cloned from
On 3/24/21 1:19 PM, Ming Lei wrote:
There is a hole at the end of 'struct bvec_iter', so put a new field
here and we can save cookie returned from submit_bio() here for
supporting bio based polling.
This way can avoid to extend bio unnecessarily.
Meantime add two helpers to get/set this field.
On 3/24/21 1:19 PM, Ming Lei wrote:
There has been 3 users, and will be more, so add one such helper.
Reviewed-by: Chaitanya Kulkarni
Signed-off-by: Ming Lei
---
block/blk-core.c | 2 +-
block/blk-mq.c | 3 +--
drivers/nvme/host/core.c | 2 +-
include/linux/blkdev.h |
On 3/24/21 1:19 PM, Ming Lei wrote:
Create per-task io poll context for both IO submission and poll task
if the queue is bio based and supports polling.
This io polling context includes two queues:
1) submission queue(sq) for storing HIPRI bio, written by submission task
and read by poll
On 3/24/21 1:19 PM, Ming Lei wrote:
Add one helper for creating io context and prepare for supporting
efficient bio based io poll.
Meantime move the code of creating io_context before checking bio's
REQ_HIPRI flag because the following patch may change to clear REQ_HIPRI
if io_context can't be
On 3/24/21 1:19 PM, Ming Lei wrote:
Prepare for putting bio poll queue into io_context, so add one helper
for free io_context.
Signed-off-by: Ming Lei
---
block/blk-ioc.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
Reviewed-by: Hannes Reinecke
Cheers,
Hannes
--
From: Jeffle Xu
Sometimes we need to get the corresponding gendisk from request_queue.
It is preferred that block drivers store private data in
gendisk->private_data rather than request_queue->queuedata, e.g. see:
commit c4a59c4e5db3 ("dm: stop using ->queuedata").
So if only request_queue is
From: Jeffle Xu
IO polling is enabled when all underlying target devices are capable
of IO polling. The sanity check supports the stacked device model, in
which one dm device may be build upon another dm device. In this case,
the mapped device will check if the underlying dm target device
From: Jeffle Xu
This method can be used to check if bio-based device supports IO polling
or not. For mq devices, checking for hw queue in polling mode is
adequate, while the sanity check shall be implementation specific for
bio-based devices. For example, dm device needs to check if all
Currently bio based IO polling needs to poll all hw queue blindly, this
way is very inefficient, and one big reason is that we can't pass any
bio submission result to blk_poll().
In IO submission context, track associated underlying bios by per-task
submission queue and store returned 'cookie' in
So far bio list helpers always use .bi_next to traverse the list, we
will support to link bios by other bio field.
Prepare for such support by adding a macro so that users can define
another helpers for linking bios by other bio field.
Signed-off-by: Ming Lei
---
include/linux/bio.h | 132
Limit at most 8 queues are polled in each blk_pull(), avoid to
add extra latency when queue depth is high.
Signed-off-by: Ming Lei
---
block/blk-mq.c | 73 --
1 file changed, 53 insertions(+), 20 deletions(-)
diff --git a/block/blk-mq.c
From: Jeffle Xu
Extract the logic of polling one hw queue and related statistics
handling out as the helper function.
Signed-off-by: Jeffle Xu
Signed-off-by: Ming Lei
---
block/blk-mq.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/block/blk-mq.c
There is a hole at the end of 'struct bvec_iter', so put a new field
here and we can save cookie returned from submit_bio() here for
supporting bio based polling.
This way can avoid to extend bio unnecessarily.
Meantime add two helpers to get/set this field.
Signed-off-by: Ming Lei
---
Add one req flag REQ_POLL_CTX which will be used in the following patch for
supporting bio based IO polling.
Exactly this flag can help us to do:
1) request flag is cloned in bio_fast_clone(), so if we mark one FS bio
as REQ_POLL_CTX, all bios cloned from this FS bio will be marked as
Prepare for putting bio poll queue into io_context, so add one helper
for free io_context.
Signed-off-by: Ming Lei
---
block/blk-ioc.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 57299f860d41..b0cde18c4b8c 100644
---
Create per-task io poll context for both IO submission and poll task
if the queue is bio based and supports polling.
This io polling context includes two queues:
1) submission queue(sq) for storing HIPRI bio, written by submission task
and read by poll task.
2) polling queue(pq) for holding
Add one helper for creating io context and prepare for supporting
efficient bio based io poll.
Meantime move the code of creating io_context before checking bio's
REQ_HIPRI flag because the following patch may change to clear REQ_HIPRI
if io_context can't be created.
Signed-off-by: Ming Lei
---
There has been 3 users, and will be more, so add one such helper.
Reviewed-by: Chaitanya Kulkarni
Signed-off-by: Ming Lei
---
block/blk-core.c | 2 +-
block/blk-mq.c | 3 +--
drivers/nvme/host/core.c | 2 +-
include/linux/blkdev.h | 1 +
4 files changed, 4 insertions(+), 4
Hi,
Add per-task io poll context for holding HIPRI blk-mq/underlying bios
queued from bio based driver's io submission context, and reuse one bio
padding field for storing 'cookie' returned from submit_bio() for these
bios. Also explicitly end these bios in poll context by adding two
new bio
On Tue, Mar 23, 2021 at 07:19:28PM -0700, Dan Williams wrote:
> So I think the path forward is:
>
> - teach memory_failure() to allow for ranged failures
>
> - let interested drivers register for memory failure events via a
> blocking_notifier_head
Eww. As I said I think the right way is that
32 matches
Mail list logo