All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Keith Busch <keith.busch@intel.com>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH 06/11] block: add polled wakeup task helper
Date: Tue, 13 Nov 2018 09:59:01 -0700	[thread overview]
Message-ID: <7fa09eed-d7ff-ee8c-6644-552d1f7f5607@kernel.dk> (raw)
In-Reply-To: <a811ef9b-c72d-73ba-93aa-27c6a4b2f112@kernel.dk>

On 11/13/18 8:58 AM, Jens Axboe wrote:
> On 11/13/18 8:52 AM, Keith Busch wrote:
>> On Tue, Nov 13, 2018 at 08:42:28AM -0700, Jens Axboe wrote:
>>> If we're polling for IO on a device that doesn't use interrupts, then
>>> IO completion loop (and wake of task) is done by submitting task itself.
>>> If that is the case, then we don't need to enter the wake_up_process()
>>> function, we can simply mark ourselves as TASK_RUNNING.
>>>
>>> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>>> ---
>>>  fs/block_dev.c         |  6 ++----
>>>  fs/iomap.c             |  3 +--
>>>  include/linux/blkdev.h | 19 +++++++++++++++++++
>>>  3 files changed, 22 insertions(+), 6 deletions(-)
>>
>> One more for swap read:
>>
>> ---
>> diff --git a/mm/page_io.c b/mm/page_io.c
>> index d4d1c89bcddd..57572ff46016 100644
>> --- a/mm/page_io.c
>> +++ b/mm/page_io.c
>> @@ -140,7 +140,7 @@ static void end_swap_bio_read(struct bio *bio)
>>  	unlock_page(page);
>>  	WRITE_ONCE(bio->bi_private, NULL);
>>  	bio_put(bio);
>> -	wake_up_process(waiter);
>> +	blk_wake_io_task(waiter);
>>  	put_task_struct(waiter);
>>  }
>>  
> 
> Indeed, thanks Keith! I'll fold it in.

Ditto for the patch 5 changes, jfyi.

-- 
Jens Axboe


  reply	other threads:[~2018-11-13 16:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 15:42 [PATCHSET v2 0/11] Various block optimizations Jens Axboe
2018-11-13 15:42 ` [PATCH 01/11] nvme: don't disable local ints for polled queue Jens Axboe
2018-11-13 15:42   ` Jens Axboe
2018-11-13 15:42 ` [PATCH 02/11] block: add queue_is_mq() helper Jens Axboe
2018-11-14 15:23   ` Christoph Hellwig
2018-11-13 15:42 ` [PATCH 03/11] blk-mq: embed blk_mq_ops directly in the request queue Jens Axboe
2018-11-13 15:42 ` [PATCH 04/11] blk-rq-qos: inline check for q->rq_qos functions Jens Axboe
2018-11-13 15:42 ` [PATCH 05/11] block: avoid ordered task state change for polled IO Jens Axboe
2018-11-14  2:29   ` jianchao.wang
2018-11-14  2:35     ` Jens Axboe
2018-11-13 15:42 ` [PATCH 06/11] block: add polled wakeup task helper Jens Axboe
2018-11-13 15:52   ` Keith Busch
2018-11-13 15:58     ` Jens Axboe
2018-11-13 16:59       ` Jens Axboe [this message]
2018-11-13 15:42 ` [PATCH 07/11] block: have ->poll_fn() return number of entries polled Jens Axboe
2018-11-13 15:42 ` [PATCH 08/11] blk-mq: when polling for IO, look for any completion Jens Axboe
2018-11-13 15:42 ` [PATCH 09/11] block: make blk_poll() take a parameter on whether to spin or not Jens Axboe
2018-11-13 15:42 ` [PATCH 10/11] block: for async O_DIRECT, mark us as polling if asked to Jens Axboe
2018-11-13 15:42 ` [PATCH 11/11] block: don't plug for aio/O_DIRECT HIPRI IO Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7fa09eed-d7ff-ee8c-6644-552d1f7f5607@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.