Re: [PATCH v4 00/16] perf, persistent: Add persistent events
From: Robert Richter
Date: Wed May 07 2014 - 12:44:22 EST
On 06.05.14 20:53:59, Borislav Petkov wrote:
> On Tue, May 06, 2014 at 02:39:07PM +0200, Robert Richter wrote:
> > Events could also be shared transparently. This means, if there is
> > already an event running with the same attr, it could be reused. Not
> > sure if this makes sense much and is also feasible. Most events are
> > opened with writable buffers and thus can not be shared anyway.
>
> Well, this is simple: sharing events implicitly says they're read-only -
> you can't share them otherwise. If you want the buffers to be writable,
> then the events cannot be shared.
>
> I think this is nicely simple.
With transparently I mean that the process even does not know that the
same event is already running by another process. The kernel detects
this and maps the request to that event and buffer. Of course the
event's buffer must be at least readonly to be shared for this.
This could be a mechanism to connect to persistent events. The kernel
detects by type and attr that the requested event is already running
persistent and maps to it.
But at the moment persistent events can only be shared using
attr.type = PERF_TYPE_PERSISTENT
attr.config = id
So the above is more an alternative to connect to persistent events
and the question is, which one to use. Presumable the easiest first,
which is the current implementation.
-Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/