lkml.org 
[lkml]   [2008]   [Jan]   [26]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 26 Jan 2008 10:11:47 +0100
FromPavel Machek <>
SubjectRe: [PATCH 23/23 -v6] Critical latency timings histogram
> +static void *l_start(struct seq_file *m, loff_t *pos)
> +{
> +	loff_t *index_ptr = kmalloc(sizeof(loff_t), GFP_KERNEL);
> +	loff_t index = *pos;
> +	struct hist_data *my_hist = m->private;
> +
> +	if (!index_ptr)
> +		return NULL;
> +
> +	if (index == 0) {
> +		atomic_dec(&my_hist->hist_mode);
> +		seq_printf(m, "#Minimum latency: %lu microseconds.\n"
> +			   "#Average latency: %lu microseconds.\n"
> +			   "#Maximum latency: %lu microseconds.\n"
> +			   "#Total samples: %llu\n"
> +			   "#There are %llu samples greater or equal"
> +			   " than %d microseconds\n"
> +			   "#usecs\t%16s\n"
> +			   , my_hist->min_lat
> +			   , my_hist->avg_lat
> +			   , my_hist->max_lat
> +			   , my_hist->total_samples
> +			   , my_hist->beyond_hist_bound_samples
> +			   , MAX_ENTRY_NUM, "samples");
> +	}

Ok, so you are adding new userland interface; I guess you should also
document it in Documentation/?

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2008-01-26 09:15    [from the cache]
©2003-2008