Re: [PATCH 5/8] nowait aio: return on congested block device

2017-05-11 Thread Goldwyn Rodrigues
On 05/11/2017 02:44 AM, Christoph Hellwig wrote: > Looks fine, > > Reviewed-by: Christoph Hellwig > > Although lifting the make_request limit is something a lot of users > would appreciate in the near future.. > Yes, I understand. That will be on my todo list next on priority.

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-05-11 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig Although lifting the make_request limit is something a lot of users would appreciate in the near future.. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More

[PATCH 5/8] nowait aio: return on congested block device

2017-05-09 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues A new bio operation flag REQ_NOWAIT is introduced to identify bio's orignating from iocb with IOCB_NOWAIT. This flag indicates to return immediately if a request cannot be made instead of retrying. Stacked devices such as md (the ones with

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-04-24 Thread Jens Axboe
On 04/24/2017 03:10 PM, Goldwyn Rodrigues wrote: > > > On 04/19/2017 01:45 AM, Christoph Hellwig wrote: >> On Fri, Apr 14, 2017 at 07:02:54AM -0500, Goldwyn Rodrigues wrote: >>> From: Goldwyn Rodrigues >>> >> >>> + /* Request queue supports BIO_NOWAIT */ >>> +

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-04-24 Thread Goldwyn Rodrigues
On 04/19/2017 01:45 AM, Christoph Hellwig wrote: > On Fri, Apr 14, 2017 at 07:02:54AM -0500, Goldwyn Rodrigues wrote: >> From: Goldwyn Rodrigues >> > >> +/* Request queue supports BIO_NOWAIT */ >> +queue_flag_set_unlocked(QUEUE_FLAG_NOWAIT, q); > > BIO_NOWAIT is

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-04-20 Thread Jan Kara
On Wed 19-04-17 10:21:39, Goldwyn Rodrigues wrote: > > > On 04/19/2017 01:45 AM, Christoph Hellwig wrote: > > > >> + if (bio->bi_opf & REQ_NOWAIT) { > >> + if (!blk_queue_nowait(q)) { > >> + err = -EOPNOTSUPP; > >> + goto end_io; > >> + } >

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-04-19 Thread Goldwyn Rodrigues
On 04/19/2017 01:45 AM, Christoph Hellwig wrote: > >> +if (bio->bi_opf & REQ_NOWAIT) { >> +if (!blk_queue_nowait(q)) { >> +err = -EOPNOTSUPP; >> +goto end_io; >> +} >> +if (!(bio->bi_opf & REQ_SYNC)) { > > I don't

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-04-19 Thread Christoph Hellwig
On Fri, Apr 14, 2017 at 07:02:54AM -0500, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > A new bio operation flag REQ_NOWAIT is introduced to identify bio's s/bio/block/ > @@ -1232,6 +1232,11 @@ static struct request *get_request(struct > request_queue *q, unsigned

[PATCH 5/8] nowait aio: return on congested block device

2017-04-14 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues A new bio operation flag REQ_NOWAIT is introduced to identify bio's orignating from iocb with IOCB_NOWAIT. This flag indicates to return immediately if a request cannot be made instead of retrying. To facilitate this, QUEUE_FLAG_NOWAIT is set to

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-04-04 Thread Christoph Hellwig
Please make this a REQ_* flag so that it can be passed in the bio, the request and as an argument to the get_request functions instead of testing for a bio. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More

[PATCH 5/8] nowait aio: return on congested block device

2017-04-03 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues A new flag BIO_NOWAIT is introduced to identify bio's orignating from iocb with IOCB_NOWAIT. This flag indicates to return immediately if a request cannot be made instead of retrying. To facilitate this, QUEUE_FLAG_NOWAIT is set to devices which

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-24 Thread Jens Axboe
On 03/24/2017 05:32 AM, Goldwyn Rodrigues wrote: > > > On 03/16/2017 09:33 AM, Jens Axboe wrote: >> On 03/15/2017 03:51 PM, Goldwyn Rodrigues wrote: >>> diff --git a/block/blk-core.c b/block/blk-core.c >>> index 0eeb99e..2e5cba2 100644 >>> --- a/block/blk-core.c >>> +++ b/block/blk-core.c >>> @@

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-24 Thread Goldwyn Rodrigues
On 03/16/2017 09:33 AM, Jens Axboe wrote: > On 03/15/2017 03:51 PM, Goldwyn Rodrigues wrote: >> diff --git a/block/blk-core.c b/block/blk-core.c >> index 0eeb99e..2e5cba2 100644 >> --- a/block/blk-core.c >> +++ b/block/blk-core.c >> @@ -2014,7 +2019,7 @@ blk_qc_t generic_make_request(struct bio

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-20 Thread Jan Kara
On Fri 17-03-17 07:23:24, Goldwyn Rodrigues wrote: > On 03/16/2017 04:31 PM, Dave Chinner wrote: > > On Wed, Mar 15, 2017 at 04:51:04PM -0500, Goldwyn Rodrigues wrote: > >> From: Goldwyn Rodrigues > >> > >> A new flag BIO_NOWAIT is introduced to identify bio's > >> orignating

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-17 Thread Goldwyn Rodrigues
On 03/16/2017 04:31 PM, Dave Chinner wrote: > On Wed, Mar 15, 2017 at 04:51:04PM -0500, Goldwyn Rodrigues wrote: >> From: Goldwyn Rodrigues >> >> A new flag BIO_NOWAIT is introduced to identify bio's >> orignating from iocb with IOCB_NOWAIT. This flag indicates >> to return

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-17 Thread Goldwyn Rodrigues
On 03/16/2017 09:33 AM, Jens Axboe wrote: > On 03/15/2017 03:51 PM, Goldwyn Rodrigues wrote: >> diff --git a/block/blk-core.c b/block/blk-core.c >> index 0eeb99e..2e5cba2 100644 >> --- a/block/blk-core.c >> +++ b/block/blk-core.c >> @@ -2014,7 +2019,7 @@ blk_qc_t generic_make_request(struct bio

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-16 Thread Ming Lei
On Thu, Mar 16, 2017 at 10:33 PM, Jens Axboe wrote: > On 03/15/2017 03:51 PM, Goldwyn Rodrigues wrote: >> diff --git a/block/blk-core.c b/block/blk-core.c >> index 0eeb99e..2e5cba2 100644 >> --- a/block/blk-core.c >> +++ b/block/blk-core.c >> @@ -2014,7 +2019,7 @@ blk_qc_t

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-16 Thread Dave Chinner
On Wed, Mar 15, 2017 at 04:51:04PM -0500, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > A new flag BIO_NOWAIT is introduced to identify bio's > orignating from iocb with IOCB_NOWAIT. This flag indicates > to return immediately if a request cannot be made instead > of

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-16 Thread Jens Axboe
On 03/15/2017 03:51 PM, Goldwyn Rodrigues wrote: > diff --git a/block/blk-core.c b/block/blk-core.c > index 0eeb99e..2e5cba2 100644 > --- a/block/blk-core.c > +++ b/block/blk-core.c > @@ -2014,7 +2019,7 @@ blk_qc_t generic_make_request(struct bio *bio) > do { > struct

[PATCH 5/8] nowait aio: return on congested block device

2017-03-15 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues A new flag BIO_NOWAIT is introduced to identify bio's orignating from iocb with IOCB_NOWAIT. This flag indicates to return immediately if a request cannot be made instead of retrying. Signed-off-by: Goldwyn Rodrigues ---

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-08 Thread Goldwyn Rodrigues
On 03/08/2017 10:17 AM, Jens Axboe wrote: > On 03/08/2017 08:00 AM, Goldwyn Rodrigues wrote: >> >> >> On 03/08/2017 01:03 AM, Sagi Grimberg wrote: >>> -if (likely(blk_queue_enter(q, false) == 0)) { +if (likely(blk_queue_enter(q, bio_flagged(bio, BIO_NOWAIT)) == 0))

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-08 Thread Jens Axboe
On 03/08/2017 08:00 AM, Goldwyn Rodrigues wrote: > > > On 03/08/2017 01:03 AM, Sagi Grimberg wrote: >> >>> -if (likely(blk_queue_enter(q, false) == 0)) { >>> +if (likely(blk_queue_enter(q, bio_flagged(bio, BIO_NOWAIT)) >>> == 0)) { >>> ret = q->make_request_fn(q,

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-08 Thread Christoph Hellwig
On Wed, Mar 08, 2017 at 04:28:06PM +0100, Jan Kara wrote: > Well, that's not really good. If we cannot support this for both blk-mq and > legacy block layer the feature will not be usable. So please work on blk-mq > support as well. Exactly. In addition to that anything implementing a feature

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-08 Thread Jan Kara
On Wed 08-03-17 09:00:09, Goldwyn Rodrigues wrote: > > > On 03/08/2017 01:03 AM, Sagi Grimberg wrote: > > > >> -if (likely(blk_queue_enter(q, false) == 0)) { > >> +if (likely(blk_queue_enter(q, bio_flagged(bio, BIO_NOWAIT)) > >> == 0)) { > >> ret =

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-08 Thread Goldwyn Rodrigues
On 03/08/2017 01:03 AM, Sagi Grimberg wrote: > >> -if (likely(blk_queue_enter(q, false) == 0)) { >> +if (likely(blk_queue_enter(q, bio_flagged(bio, BIO_NOWAIT)) >> == 0)) { >> ret = q->make_request_fn(q, bio); > > I think that for ->make_request to not block we'd

Re: [PATCH 5/8] nowait aio: return on congested block device

2017-03-07 Thread Sagi Grimberg
- if (likely(blk_queue_enter(q, false) == 0)) { + if (likely(blk_queue_enter(q, bio_flagged(bio, BIO_NOWAIT)) == 0)) { ret = q->make_request_fn(q, bio); I think that for ->make_request to not block we'd need to set BLK_MQ_REQ_NOWAIT in

[PATCH 5/8] nowait aio: return on congested block device

2017-02-28 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues A new flag BIO_NOWAIT is introduced to identify bio's orignating from iocb with IOCB_NOWAIT. This flag indicates to return immediately if a request cannot be made instead of retrying. Signed-off-by: Goldwyn Rodrigues ---