lkml.org 
[lkml]   [2014]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 03/11] perf: Allow for multiple ring buffers per event
On Wed, Feb 19, 2014 at 02:02:36PM -0800, Dave Hansen wrote:
> On 02/17/2014 06:33 AM, Peter Zijlstra wrote:
> > Then write the PERF_RECORD_DATA structure into the normal ring-buffer
> > location; set data_offset to point to the first page boundary, data_size
> > to 1mb.
> >
> > Then frob things such that perf_mmap_to_page() for the next 1mb of pages
> > points to your buffer pages and wipe the page-table entries.
>
> Wouldn't we have to teach a ton of code how to be IRQ safe for this to
> work? Just step one: how do we go modifying page tables safely from an
> interrupt? mm->page_table_lock is a plain non-irq spinlock.

One could modify existing page tables the same way we do the lockless
lookup for GUP. But instead of doing the get_page() we do a pte
modification.

But I suppose we can push all that to task context by having the polling
task do it before it gets to userspace again.


\
 
 \ /
  Last update: 2014-03-14 12:21    [W:0.134 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site