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]
Date:	Thu, 5 May 2011 00:23:33 +0200
From:	Jan Kara <jack@...e.cz>
To:	Wu Fengguang <fengguang.wu@...el.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, Jan Kara <jack@...e.cz>,
	Dave Chinner <david@...morbit.com>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 6/6] writeback: convert to relative older_than_this in
 trace events

On Wed 04-05-11 17:17:13, Wu Fengguang wrote:
> This is a format change that could break established scripts.
> 
> But hopefully it's more human friendly to show the relative values like
> "30000" (30s old) or "0" (all fresh ones) than long absolute jiffy
> numbers.
  It's possibly more human friendly but probably also harder to handle in
scripts. I especially don't like the fact that the number will be changing
at different tracepoints - you'll then have to do some comparisons to find
out whether just the timestamp has been changed or whether just the time
passes by. It's not that hard to write a script doing absolute->relative
conversion (since you have time stamps in the traces) for those cases where
relative time is really what interests you. So do you have any particular
usecase in mind for the relative value?

								Honza
> 
> Note that the initial 30000 or 0 may increase over time as they are now
> relative numbers.
> 
> CC: Jan Kara <jack@...e.cz>
> CC: Dave Chinner <david@...morbit.com> 
> Signed-off-by: Wu Fengguang <fengguang.wu@...el.com>
> ---
>  include/trace/events/writeback.h |   11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> --- linux-next.orig/include/trace/events/writeback.h	2011-05-04 16:09:59.000000000 +0800
> +++ linux-next/include/trace/events/writeback.h	2011-05-04 16:10:57.000000000 +0800
> @@ -115,7 +115,7 @@ DECLARE_EVENT_CLASS(wbc_class,
>  		__field(int, for_reclaim)
>  		__field(int, range_cyclic)
>  		__field(int, more_io)
> -		__field(unsigned long, older_than_this)
> +		__field(int, older)
>  		__field(long, range_start)
>  		__field(long, range_end)
>  	),
> @@ -130,14 +130,15 @@ DECLARE_EVENT_CLASS(wbc_class,
>  		__entry->for_reclaim	= wbc->for_reclaim;
>  		__entry->range_cyclic	= wbc->range_cyclic;
>  		__entry->more_io	= wbc->more_io;
> -		__entry->older_than_this = wbc->older_than_this ?
> -						*wbc->older_than_this : 0;
> +		__entry->older		= wbc->older_than_this ?
> +				(jiffies - *wbc->older_than_this) * 1000 / HZ
> +				: -1;
>  		__entry->range_start	= (long)wbc->range_start;
>  		__entry->range_end	= (long)wbc->range_end;
>  	),
>  
>  	TP_printk("bdi %s: towrt=%ld skip=%ld mode=%d kupd=%d "
> -		"bgrd=%d reclm=%d cyclic=%d more=%d older=0x%lx "
> +		"bgrd=%d reclm=%d cyclic=%d more=%d older=%d "
>  		"start=0x%lx end=0x%lx",
>  		__entry->name,
>  		__entry->nr_to_write,
> @@ -148,7 +149,7 @@ DECLARE_EVENT_CLASS(wbc_class,
>  		__entry->for_reclaim,
>  		__entry->range_cyclic,
>  		__entry->more_io,
> -		__entry->older_than_this,
> +		__entry->older,
>  		__entry->range_start,
>  		__entry->range_end)
>  )
> 
> 
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ