Re: high resolution timers, scheduling & sleep granularity

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Josef Bacik <jbacik@...>
Cc: Ric Wheeler <rwheeler@...>, Thomas Gleixner <tglx@...>, Ingo Molnar <mingo@...>, <linux-fsdevel@...>, Chris Mason <chris.mason@...>, <linux-kernel@...>
Date: Friday, August 1, 2008 - 2:16 pm

On Aug 01, 2008  09:25 -0400, Josef Bacik wrote:

You may also consider making this a decaying average, so that minor changes
in the workload are smoothed out.  Also, it is probably easier to read
likely(foo) instead of unlikely(!foo)...

	if (likely(journal->j_average_commit_time != 0))
		journal->j_average_commit_time =
			(commit_time * 3 + journal->j_average_commit_time) / 4;
	else
		journal->j_average_commit_time = commit_time;


There is already the jbd stats patch in jbd2 that is reporting this
information for the previous transactions.


I was also going to comment on the use of jiffies here, but Ric beat me
to it.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: high resolution timers, scheduling & sleep granularity, Andreas Dilger, (Fri Aug 1, 2:16 pm)