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] [day] [month] [year] [list]
Message-ID: <4A3AAECE.3050807@linux.vnet.ibm.com>
Date:	Thu, 18 Jun 2009 14:17:02 -0700
From:	Corey Ashford <cjashfor@...ux.vnet.ibm.com>
To:	mingo@...hat.com, hpa@...or.com, paulus@...ba.org, acme@...hat.com,
	linux-kernel@...r.kernel.org, a.p.zijlstra@...llo.nl,
	efault@....de, tglx@...utronix.de, mingo@...e.hu
CC:	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perfcounters/core] perf_counter tools: Handle lost events


tip-bot for Peter Zijlstra wrote:
> Commit-ID:  9d91a6f7a489eb914c16b82d927f9d81d629c259
> Gitweb:     http://git.kernel.org/tip/9d91a6f7a489eb914c16b82d927f9d81d629c259
> Author:     Peter Zijlstra <a.p.zijlstra@...llo.nl>
> AuthorDate: Thu, 18 Jun 2009 11:40:28 +0200
> Committer:  Ingo Molnar <mingo@...e.hu>
> CommitDate: Thu, 18 Jun 2009 14:46:11 +0200
> 
> perf_counter tools: Handle lost events
> 
> Make use of the new ->data_tail mechanism to tell kernel-space
> about user-space draining the data stream. Emit lost events
> (and display them) if they happen.
[snip]
> @@ -109,7 +120,7 @@ static void mmap_read(struct mmap_data *md)
>  	 * In either case, truncate and restart at head.
>  	 */
>  	diff = head - old;
> -	if (diff > md->mask / 2 || diff < 0) {
> +	if (diff < 0) {
>  		struct timeval iv;
>  		unsigned long msecs;
> 
[snip]

Hi Peter,

Very nice change.  One thing missing though on the above is an update to the 
comment which precedes snippet, which currently reads:

	/*
	 * If we're further behind than half the buffer, there's a chance
	 * the writer will bite our tail and mess up the samples under us.
	 *
	 * If we somehow ended up ahead of the head, we got messed up.
	 *
	 * In either case, truncate and restart at head.
	 */

The "further behind than half the buffer" no longer pertains.  Maybe:


	/*
	 * If we've gotten behind, truncate and restart at head.
	 */

Regards,

- Corey

Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
cjashfor@...ibm.com

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