lkml.org 
[lkml]   [2012]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC v4+ hot_track 05/19] vfs: add hooks to enable hot tracking
From
On Wed, Nov 7, 2012 at 6:51 AM, David Sterba <dave@jikos.cz> wrote:
> On Mon, Oct 29, 2012 at 12:30:47PM +0800, zwu.kernel@gmail.com wrote:
>> --- a/mm/readahead.c
>> +++ b/mm/readahead.c
>> @@ -19,6 +19,7 @@
>> #include <linux/pagemap.h>
>> #include <linux/syscalls.h>
>> #include <linux/file.h>
>> +#include <linux/hot_tracking.h>
>>
>> /*
>> * Initialise a struct file's readahead state. Assumes that the caller has
>> @@ -138,6 +139,11 @@ static int read_pages(struct address_space *mapping, struct file *filp,
>> out:
>> blk_finish_plug(&plug);
>>
>> + /* Hot data tracking */
>> + hot_update_freqs(mapping->host, (u64)(list_entry(pages->prev,\
>> + struct page, lru)->index) << PAGE_CACHE_SHIFT,
>> + (u64)nr_pages * PAGE_CACHE_SIZE, 0);
>
> There's a stale \ at the end of the line, and I find this formatting
> hard to read. Does the following look acceptable?
yes, great, thanks.
>
> hot_update_freqs(mapping->host,
> (u64)(list_entry(pages->prev, struct page, lru)->index)
> << PAGE_CACHE_SHIFT,
> (u64)nr_pages * PAGE_CACHE_SIZE, 0);
>
>> +
>> return ret;
>> }
>>



--
Regards,

Zhi Yong Wu


\
 
 \ /
  Last update: 2012-11-07 09:01    [W:0.079 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site