lkml.org 
[lkml]   [2007]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm] readahead: partial sendfile fix
Ram Pai,

Sorry for the long delay, I was just back from the winter vacation.

On Mon, Feb 12, 2007 at 11:49:10AM -0800, Ram Pai wrote:
> The solution you proposed seems kludgy to me. If you determine that the

I dislike it, either.

> its a restarted aio, then start reading from where readahead had left
> reading from earlier. To me a simple fix is:
>
> - if (unlikely(aio_restarted()))
> - next_index = last_index; /* Avoid repeat readahead */
>
> + if (unlikely(aio_restarted()))
> + next_index = min(prev_index+1, last_index);
>
>
> No?

Can be even simpler, if we _only_ want to fix the aio case:

+ if (unlikely(aio_restarted()))
+ next_index = prev_index + 1;
Regards,
Wu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-08 11:29    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site