On Sun, Oct 28, 2012 at 09:51:48PM +0800, Zhi Yong Wu wrote: > On Sun, Oct 28, 2012 at 3:55 PM, Zheng Liu <gnehzuil.liu@xxxxxxxxx> wrote: > > Hi Zhiyong, > > > > On Thu, Oct 25, 2012 at 11:08:55PM +0800, zwu.kernel@xxxxxxxxx wrote: > > [snip] > >> @@ -199,6 +342,54 @@ err: > >> } > >> > >> /* > >> + * Main function to update access frequency from read/writepage(s) hooks > >> + */ > >> +inline void hot_update_freqs(struct inode *inode, u64 start, > >> + u64 len, int rw) > > > > This function seems too big. So we really need to inline this function? > As Dave said in his comments, it will add a function call > overhead even when tracking is not enabled. a static inline function > will just result in no extra overhead other than the if > statement.... I don't think I said that with respect to this code. I think I said it w.r.t. a define or a small wrapper that decides to call hot_update_freqs(). A static inline fucntion should only be a couple of lines of code at most. A static function, OTOH, can be inlined by the compiler if the compiler thinks that is a win. But.... ..... > >> +EXPORT_SYMBOL_GPL(hot_update_freqs); ... it's an exported function, so it can't be inline or static, so using "inline" is wrong whatever way you look at it. ;) Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html