From: Balbir Singh On Mon, May 08, 2006 at 02:23:22PM -0700, Andrew Morton wrote: > Balbir Singh wrote: > > > > +static inline void delayacct_end(struct timespec *start, struct timespec *end, > > + u64 *total, u32 *count) > > +{ > > + struct timespec ts = {0, 0}; > > + s64 ns; > > + > > + do_posix_clock_monotonic_gettime(end); > > + timespec_sub(&ts, start, end); > > + ns = timespec_to_ns(&ts); > > + if (ns < 0) > > + return; > > + > > + spin_lock(¤t->delays->lock); > > + *total += ns; > > + (*count)++; > > + spin_unlock(¤t->delays->lock); > > +} > > - too large to be inlined > > - The initialisation of `ts' is unneeded (maybe it generated a bogus > warning, but it won't do that if you switch timespec_sub to > return-by-value) Hi, Andrew, Here is an update to un-inline delayacct_end() and remove the initialization of ts to 0. Balbir Singh, Linux Technology Center, IBM Software Labs Changelog 1. Remove inlining of delayacct_end(), the function is too big to be inlined 2. Remove initialization of ts. Signed-off-by: Balbir Singh Cc: Shailabh Nagar Cc: Jes Sorensen Cc: Peter Chubb Cc: Erich Focht Cc: Levent Serinol Cc: Jay Lan Signed-off-by: Andrew Morton --- kernel/delayacct.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN kernel/delayacct.c~per-task-delay-accounting-setup-fix-2 kernel/delayacct.c --- devel/kernel/delayacct.c~per-task-delay-accounting-setup-fix-2 2006-05-11 09:23:48.000000000 -0700 +++ devel-akpm/kernel/delayacct.c 2006-05-11 09:23:48.000000000 -0700 @@ -67,10 +67,10 @@ static inline void delayacct_start(struc * its timestamps (@start, @end), accumalator (@total) and @count */ -static inline void delayacct_end(struct timespec *start, struct timespec *end, +static void delayacct_end(struct timespec *start, struct timespec *end, u64 *total, u32 *count) { - struct timespec ts = {0, 0}; + struct timespec ts; s64 ns; do_posix_clock_monotonic_gettime(end); _