lkml.org 
[lkml]   [2011]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC] remove jump_label optimization for perf sched events
From
Date
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.




\
 
 \ /
  Last update: 2011-11-24 14:25    [W:0.078 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site