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:	Mon, 13 Sep 2010 15:31:20 -0400
From:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	linux-kernel@...r.kernel.org, mingo@...e.hu, paulus@...ba.org,
	davem@...emloft.net, perfmon2-devel@...ts.sf.net,
	eranian@...il.com, robert.richter@....com,
	"markus.t.metzger" <markus.t.metzger@...el.com>
Subject: Re: [PATCH] perf_events: improve DS/BTS/PEBS buffer allocation

* Stephane Eranian (eranian@...gle.com) wrote:
> On Mon, Sep 13, 2010 at 7:35 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> > On Mon, 2010-09-13 at 17:55 +0200, Stephane Eranian wrote:
> >>
> >> Ok, so you're saying there is no allocator that will give non-contiguous
> >> physical memory WITHOUT requiring a page fault to populate the pte.
> >>
> >> On the other hand, with vmalloc_node() the pte are populated when
> >> you first touch the memory. That happens as part of memset() right after
> >> the allocation and thus outside of NMI interrupt handler.
> >>
> >> Does this sound right?
> >
> > Nope, in particular read: http://lkml.org/lkml/2010/7/14/465
> >
> > The issue is that the vmalloc space can be mapped in different
> > processes, and that memset() will only ensure its mapped in the current
> > process, but the next one might need that fault to populate.
> >
> Ok, so can we play the same trick you're playing with the sampling
> buffer, i.e., you use alloc_pages_node() for one page at a time, and
> then you stitch them on demand via SW?

Well, a thought is striking me: it sounds like you are re-doing YAORB (short
for Yet Another Ring Buffer, which I start to expect will become a frequently
used acronym). Have you looked at my "generic ring buffer library" ? It's at:

git://git.kernel.org/pub/scm/linux/kernel/git/compudj/linux-2.6-ringbuffer.git
current branch: tip-current-ringbuffer-0.248

documentation is under Documentation/ringbuffer/.

I think it can save you a lot of trouble. E.g., it does stitch pages togeter by
software.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.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