Re: [RFC GIT PULL] perf/trace/lock optimization/scalabilityimprovements

From: Peter Zijlstra
Date: Sun Feb 07 2010 - 12:11:06 EST


On Wed, 2010-02-03 at 23:07 +0100, Frederic Weisbecker wrote:
>
> >
> > Which brings us to the ioctl() interface, we can do the above using
> > ioctl()s, but it seems to me we're starting to get ioctl() heavy and
> > should be looking at alternative ways of extending this.
> >
> > Anybody any bright ideas?
> >
>
>
> Using ioctl, we can basically have such structure:
>
> struct perf_inject_req {
> int start; (in)
> int len; (in)
> int *read; (out)
> };
>
> Using an idx will often imply rewalk a whole object list from
> the beginning, which is perfectly fine.
>
> If you prefer an alternate syscall, I can make it. I've been
> told about ioctl drawbacks by the past, I personally think
> ioctl has not only drawbacks: it avoids a proliferation
> of syscalls. But that's how you prefer.

One thing we could do is add a PERF_TYPE_COLLECTION and have its read()
method do something else than regular counters would, that way we can
use read()/lseek()/stat() fd interface. The only trouble with that is
that doesn't use the 'regular' output buffer.

/me goes try and come up with yet another solution..

--
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/