All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Gleb Natapov <gleb@redhat.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	Jason Baron <jbaron@redhat.com>, rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH RFC] remove jump_label optimization for perf sched events
Date: Thu, 24 Nov 2011 14:23:00 +0100	[thread overview]
Message-ID: <1322140980.2921.49.camel@twins> (raw)
In-Reply-To: <20111121131739.GF16853@redhat.com>

On Mon, 2011-11-21 at 15:17 +0200, Gleb Natapov wrote:
> So how about throttling it like the patch below does until stop_machine()
> no longer needed for patching (and it is possible that new way of patching
> will still have significant overhead).
> 
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h
> index 66f23dc..a4687f6 100644
> --- a/include/linux/jump_label.h
> +++ b/include/linux/jump_label.h
> @@ -3,12 +3,15 @@
>  
>  #include <linux/types.h>
>  #include <linux/compiler.h>
> +#include <linux/workqueue.h>
>  
>  #if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL)
>  
>  struct jump_label_key {
>         atomic_t enabled;
>         struct jump_entry *entries;
> +       unsigned long rl_timeout;
> +       struct delayed_work rl_work;
>  #ifdef CONFIG_MODULES
>         struct jump_label_mod *next;


I'm not sure its worth it doing in generic code like this, it bloats the
jump_label_key structure quite significantly (and there's tons of those
around) for only 1 real user.

If we want to do this in generic code, I think its best to introduce
something like:

struct jump_label_key_deferred {
	struct jump_label_key key;
	unsigned long timeout;
	struct delayed_work work;
}

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.



  reply	other threads:[~2011-11-24 13:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17 12:30 [PATCH RFC] remove jump_label optimization for perf sched events Gleb Natapov
2011-11-17 12:49 ` Peter Zijlstra
2011-11-17 13:00   ` Gleb Natapov
2011-11-17 13:10     ` Peter Zijlstra
2011-11-17 13:24       ` Avi Kivity
2011-11-17 13:47         ` Peter Zijlstra
2011-11-17 14:12           ` Avi Kivity
2011-11-17 13:29   ` Borislav Petkov
2011-11-17 13:47     ` Gleb Natapov
2011-11-21 13:17   ` Gleb Natapov
2011-11-24 13:23     ` Peter Zijlstra [this message]
2011-11-24 13:45       ` Gleb Natapov
2011-11-24 14:18         ` Peter Zijlstra
2011-11-24 17:43           ` Gleb Natapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322140980.2921.49.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=gleb@redhat.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.