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:	Wed, 4 Aug 2010 09:14:05 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Steven Rostedt <rostedt@...tedt.homelinux.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Christoph Hellwig <hch@....de>, Li Zefan <lizf@...fujitsu.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Johannes Berg <johannes.berg@...el.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Arnaldo Carvalho de Melo <acme@...radead.org>,
	Tom Zanussi <tzanussi@...il.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Andi Kleen <andi@...stfloor.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	"Frank Ch. Eigler" <fche@...hat.com>, Tejun Heo <htejun@...il.com>
Subject: Re: [patch 1/2] x86_64 page fault NMI-safe


* Peter Zijlstra <peterz@...radead.org> wrote:

> > What I am proposing does not even involve a copy: when we want to take a 
> > snapshot, we just have to force a sub-buffer switch on the ring buffer. 
> > The "returns" happening at the beginning of the next (empty) sub-buffer 
> > would clearly fail to discard records (expecting non-existing entry 
> > records). We would then have to save a small record saying that a function 
> > return occurred. The current stack frame at the end of the next sub-buffer 
> > could be deduced from the complete collection of stack frame samples.
> 
> And suppose the stack-trace was all of 16 entries (not uncommon for a kernel 
> stack), then you waste a whole page for 128 bytes (assuming your sub-buffer 
> is page sized). I'll take the memcopy, thank you.

To throw some hard numbers into the discussion, i found two random callgraph 
perf.data's on my boxes (both created prior the start of this discussion) and 
here is the distribution of their call-chain length:

aldebaran:~> perf report -D | grep 'chain: nr:' | cut -d: -f3- | sort -n | uniq -c
      2 4
     21 6
     23 8
     13 9
     20 10
     29 11
     21 12
     25 13
     54 14
    112 15
     72 16
     77 17
     35 18
     38 19
     48 20
     29 21
     10 22
     97 23
      3 24
      1 25
      2 26
      2 28
      2 29
      1 30
      2 31

So the peak/average here is around 15 entries.

The other one:

phoenix:~> perf report -D | grep 'chain: nr:' | cut -d: -f3- | sort -n | uniq -c
      1 2
     70 3
    222 4
    112 5
    116 6
    329 7
    241 8
    163 9
    203 10
    287 11
    159 12
      4 13
      6 14
     22 15
      2 16
     11 17
      5 18

Here the average is even lower - around 8 entries.

Thanks,

	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