[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140314104415.GS27965@twins.programming.kicks-ass.net>
Date: Fri, 14 Mar 2014 11:44:15 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Andi Kleen <ak@...ux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
Frederic Weisbecker <fweisbec@...il.com>,
Mike Galbraith <efault@....de>,
Paul Mackerras <paulus@...ba.org>,
Stephane Eranian <eranian@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Matt Fleming <matt.fleming@...el.com>
Subject: Re: [PATCH v1 03/11] perf: Allow for multiple ring buffers per event
On Mon, Mar 10, 2014 at 10:24:40AM -0700, Andi Kleen wrote:
> > > 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.
> >
> > Yes, this does look more than just tricky even if we move the bulk of
> > interrupt code to an irq_work. Peter, are you quite sure this is what we
> > want to do just for exporting trace buffers to userspace?
>
> The other big problem is scalability. Even if it was somehow possible
> to make this scheme work the IPIs for flushing would kill performance
> on any multi threaded client. Given perf is not multi-threaded today, but
> it doesn't seem a good idea to design the interface assuming no client ever
> will be.
Well any mmap()ed interface that wants to swap buffers will have this
same problem.
You can restrict the TLB flushing to the threads that poll() on the
relevant events. This just means other threads will see old/partial
data, but that shouldn't be a problem as they shouldn't be looking in
the first place.
--
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