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, 4 Jun 2009 21:47:25 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Mike Galbraith <efault@....de>,
	Paul Mackerras <paulus@...ba.org>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH] perfcounter: sleep before refresh using poll in perf
	top


* Frederic Weisbecker <fweisbec@...il.com> wrote:

> perf top is refreshed every delay_secs the thread runs in such
> loop:
> 
> while (sleep(delay_secs)) {
> 	print_sym_table();
> }
> 
> At the end of print_sym_table(), poll is used without sleep delay
> to check if we have something from stdin.
> 
> It means that this check is done only every delay_secs, which can
> be higher that 2 secs if the user defined a custom refresh rate.
> 
> We can drop sleep() here and directly use poll to wait between
> refresh periods, so that the reaction after the user stops perf top
> after typing "Enter" is immediate and doesn't suffer from the
> delay_secs latency.
> 
> Nb: poll doesn't add any overhead that can parasite perf top measures
> since it sleeps the entire timeout here.
> 
> Signed-off-by: Frederic Weisbecker <fweisbec@...il.com>
> ---
>  Documentation/perf_counter/builtin-top.c |   18 ++++++++----------
>  1 files changed, 8 insertions(+), 10 deletions(-)

Applied, thanks a lot Frederic!

	Ingo
--
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