lkml.org 
[lkml]   [2011]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/10] fs: make generic file read/write functions plug
On 2011-03-04 05:09, Vivek Goyal wrote:
> On Sat, Jan 22, 2011 at 01:17:26AM +0000, Jens Axboe wrote:
>> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
>> ---
>> mm/filemap.c | 7 +++++++
>> 1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/mm/filemap.c b/mm/filemap.c
>> index 380776c..f9a29c8 100644
>> --- a/mm/filemap.c
>> +++ b/mm/filemap.c
>> @@ -1243,12 +1243,15 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
>> unsigned long seg = 0;
>> size_t count;
>> loff_t *ppos = &iocb->ki_pos;
>> + struct blk_plug plug;
>>
>> count = 0;
>> retval = generic_segment_checks(iov, &nr_segs, &count, VERIFY_WRITE);
>> if (retval)
>> return retval;
>>
>> + blk_start_plug(&plug);
>> +
>
> Jens,
>
> IIUC, read requests will be considered SYNC and it looks like that
> __make_request() will dispatch all the SYNC requests immediately. If
> that's the case then for read path blk_plug mechanism is not required?

Good catch, we need to modify that logic. If the task is currently
plugged, it should not dispatch until blk_finish_plug() is called.
Essentially SYNC will not control dispatch. Will allow us to clean up
that logic, too.

--
Jens Axboe



\
 
 \ /
  Last update: 2011-03-06 11:19    [W:0.398 / U:3.360 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site