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]
Message-ID: <20090320190912.GF6224@elte.hu>
Date:	Fri, 20 Mar 2009 20:09:12 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	linux-kernel@...r.kernel.org, Paul Mackerras <paulus@...ba.org>
Subject: Re: [RFC][PATCH 3/3] perf_counter: new output ABI - part 1


* Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:

> Rework the output ABI
> 
> use sys_read() only for instant data and provide mmap() output for 
> all async overflow data.

i like this.

> The first mmap() determines the size of the output buffer. The 
> mmap() size must be a PAGE_SIZE multiple of 1+pages, where pages 
> must be a power of 2 or 0. Further mmap()s of the same fd must 
> have the same size. Once all maps are gone, you can again mmap() 
> with a new size.
> 
> In case of 0 extra pages there is no data output and the first 
> page only contains meta data.
> 
> When there are data pages, a poll() event will be generated for 
> each full page of data. Furthermore, the output is circular. This 
> means that although 1 page is a valid configuration, its useless, 
> since we'll start overwriting it the instant we report a full 
> page.

i think it would still be nice to allow plain old-fashioned 
poll()+read() loops ... but the logistics of that seem difficult. 
mmap() seems to fit this better - and it's probably faster as well. 
(as we have to construct the kernel-space pages anyway, so mapping 
them isnt that big of an issue)

per-CPU-ness will be handled naturally via per-cpu counters.

Paul, can you see any hole/quirkiness in this scheme?

	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