lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121029020124.GP29378@dastard>
Date:	Mon, 29 Oct 2012 13:01:24 +1100
From:	Dave Chinner <david@...morbit.com>
To:	Zhi Yong Wu <zwu.kernel@...il.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
	linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
	linuxram@...ux.vnet.ibm.com, viro@...iv.linux.org.uk,
	tytso@....edu, cmm@...ibm.com,
	Zhi Yong Wu <wuzhy@...ux.vnet.ibm.com>
Subject: Re: [RFC v4 03/15] vfs,hot_track: add the function for collecting
 I/O frequency

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@...il.com> wrote:
> > Hi Zhiyong,
> >
> > On Thu, Oct 25, 2012 at 11:08:55PM +0800, zwu.kernel@...il.com 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@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ