Re: [PATCH RFC] remove jump_label optimization for perf sched events

From: Gleb Natapov
Date: Thu Nov 24 2011 - 12:43:49 EST


On Thu, Nov 24, 2011 at 03:18:04PM +0100, Peter Zijlstra wrote:
> > > But is there really any other user for this? All the trace bits are root
> > > only iirc and kvm itself only sets them on the guest kernel I think for
> > > paravirt, so that's not a problem.
> > >
> > The problem I am trying to fix with this patch is not strictly
> > virtualization related.
>
> No I know, its about user-trigerably jump_label conversions, but afaik
> that's only perf. The others: tracepoints, and paravirt can't be toggled
> by unpriv. users.
Currently it may be only perf, I haven't checked. But as jump_label will gain
more users the problem may become more widespread. Now that I know
how jump_label work I will look into changing some KVM ifs into it. If
some of them will be triggered by a guest action (for instance enabling
debug, or entering real mode) they will have to be throttled too. But
this is just speculation at this point. What is important is fixing the
one we have now. I looked into doing it outside of jump_label code, but
then I saw that I need to duplicate most of
jump_label_inc/jump_label_dec code in perf so I went for more general
solution.

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