coalescing in polling mode in 4.9

Nitesh nj.shetty at samsung.com
Wed Feb 7 00:27:40 PST 2018


Hi Keith,

I will send proper patch.

On Tuesday 06 February 2018 09:59 PM, Keith Busch wrote:
> On Mon, Feb 05, 2018 at 09:12:12PM +0530, Nitesh wrote:
>> diff --git a/fs/block_dev.c b/fs/block_dev.c
>> index 4a181fc..d2eeedf 100644
>> --- a/fs/block_dev.c
>> +++ b/fs/block_dev.c
>> @@ -236,9 +236,13 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct
>> iov_iter *iter,
>>                  set_current_state(TASK_UNINTERRUPTIBLE);
>>                  if (!READ_ONCE(bio.bi_private))
>>                          break;
>> -               if (!(iocb->ki_flags & IOCB_HIPRI) ||
>> -                   !blk_poll(bdev_get_queue(bdev), qc))
>> +               if (!(iocb->ki_flags & IOCB_HIPRI))
>>                          io_schedule();
>> +               else if (!blk_poll(bdev_get_queue(bdev), qc)) {
>> +                       if(need_resched())
>> +                               set_current_state(TASK_RUNNING);
>> +                       io_schedule();
>> +               }
>>          }
>>          __set_current_state(TASK_RUNNING);
> 
> Yah, I think this looks good. Do you want to send this as a proper patch
> to linux-block mailing list for consideration?
> 
> 
> 



More information about the Linux-nvme mailing list