linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Baron <jbaron@redhat.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: rostedt@goodmis.org, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] jump_label,x86: use text_poke_smp_batch for entries update
Date: Fri, 29 Apr 2011 11:15:09 -0400	[thread overview]
Message-ID: <20110429151509.GA2545@redhat.com> (raw)
In-Reply-To: <1304023961-12741-1-git-send-email-jolsa@redhat.com>

On Thu, Apr 28, 2011 at 10:52:41PM +0200, Jiri Olsa wrote:
> Changing the jump label update code to use batch processing
> for x86 architectures. 
> 
> Currently each jump label update calls text_poke_smp for each
> jump label key entry. Thus one key update ends up calling stop
> machine multiple times.
> 

cool. Batching the updates is a nice idea.

> This patch is using text_poke_smp_batch, which is called for
> all the key's entries.  Ensuring the stop machine is called
> only once.
> 

Since we walk the modules list per key (calling __jump_label_update()),
this is not always the case. I'm wondering then if maybe what we want to do
is 'queue' each update from the core code. Then, when the queue fills
up, we flush out the queue. In this way, we cover jump labels that might
be in both the core kernel and in modules. This also has the side effect
of moving code such as:

/*
 * The entry->code set to 0 invalidates module
 * init text
 * sections (see
 * jump_label_invalidate_module_init).
 */
if (!entry->code || !kernel_text_address(entry->code))
              continue;


out of the arch code into the generic code, which in my opinion is a bit
cleaner. thoughts?

Thanks,

-Jason

  reply	other threads:[~2011-04-29 15:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28 20:52 [PATCH] jump_label,x86: use text_poke_smp_batch for entries update Jiri Olsa
2011-04-29 15:15 ` Jason Baron [this message]
2011-04-29 15:37   ` Jiri Olsa
2011-05-04  9:41 ` [PATCHv2 0/2] jump_label,x86: make batch update of jump_label entries Jiri Olsa
2011-05-04  9:41   ` [PATCHv2 1/2] jump_label,x86: use text_poke_smp_batch for entries update Jiri Olsa
2011-05-04  9:41   ` [PATCHv2 2/2] jump_label,x86: using static arrays before dynamic allocation is needed Jiri Olsa
2011-05-09 18:38   ` [PATCHv3] jump_label,x86: make batch update of jump_label entries Jiri Olsa
2011-05-09 19:27     ` Jason Baron
2011-05-23 16:45       ` Jiri Olsa
2011-05-23 20:53         ` Steven Rostedt

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=20110429151509.GA2545@redhat.com \
    --to=jbaron@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).