Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753739Ab2KFWvy (ORCPT ); Tue, 6 Nov 2012 17:51:54 -0500 Received: from twin.jikos.cz ([89.185.236.188]:49825 "EHLO twin.jikos.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751412Ab2KFWvx (ORCPT ); Tue, 6 Nov 2012 17:51:53 -0500 Date: Tue, 6 Nov 2012 23:51:36 +0100 From: David Sterba To: zwu.kernel@gmail.com Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, linuxram@linux.vnet.ibm.com, viro@zeniv.linux.org.uk, david@fromorbit.com, tytso@mit.edu, cmm@us.ibm.com, wuzhy@linux.vnet.ibm.com, wenqing.lz@taobao.com Subject: Re: [RFC v4+ hot_track 05/19] vfs: add hooks to enable hot tracking Message-ID: <20121106225136.GU3102@twin.jikos.cz> Reply-To: dave@jikos.cz Mail-Followup-To: zwu.kernel@gmail.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, linuxram@linux.vnet.ibm.com, viro@zeniv.linux.org.uk, david@fromorbit.com, tytso@mit.edu, cmm@us.ibm.com, wuzhy@linux.vnet.ibm.com, wenqing.lz@taobao.com References: <1351485061-12297-1-git-send-email-zwu.kernel@gmail.com> <1351485061-12297-6-git-send-email-zwu.kernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1351485061-12297-6-git-send-email-zwu.kernel@gmail.com> User-Agent: Mutt/1.5.21 (2011-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1225 Lines: 37 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 > #include > #include > +#include > > /* > * 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? 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; > } > -- 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/