From: Andi Kleen <ak@muc.de>
To: Jamie Lokier <jamie@shareable.org>
Cc: Andi Kleen <ak@muc.de>, Linus Torvalds <torvalds@transmeta.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Runtime memory barrier patching
Date: Tue, 22 Apr 2003 01:46:11 +0200 [thread overview]
Message-ID: <20030421234611.GA15191@averell> (raw)
In-Reply-To: <20030421233557.GB17595@mail.jlokier.co.uk>
On Tue, Apr 22, 2003 at 01:35:57AM +0200, Jamie Lokier wrote:
> Andi Kleen wrote:
> > The patching code is quite generic and could be used to patch other
> > instructions
>
> Such as removing the lock prefix when running non-SMP?
Yes, could work. But you need a new variant of alternative()
or eat worse code. The current alternative() can only handle
constant sized original instructions, which requires that you
use a constant sized constraint (e.g. (%0) ... "r" (ptr)) etc.)
"m" is unfortunately variable size.
For the special case of lock it would still work because you
only need to patch the prefix away, not replace the whole
instruction, but that requires a new macro.
Also when you do that I would start to think about discarding the
.altinstructions section after load to avoid too much kernel bloat (it
currently costs 7 byte + the length of the replacement. And lock
is quite common in the kernel these days.
-Andi
next prev parent reply other threads:[~2003-04-21 23:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-21 19:27 [PATCH] Runtime memory barrier patching Andi Kleen
2003-04-21 19:59 ` Linus Torvalds
2003-04-21 20:53 ` Andi Kleen
2003-04-21 21:04 ` Linus Torvalds
2003-04-21 21:43 ` Ulrich Drepper
2003-04-21 22:05 ` Linus Torvalds
2003-04-21 22:45 ` Andi Kleen
2003-04-21 22:11 ` Andi Kleen
2003-04-21 22:23 ` Linus Torvalds
2003-04-21 22:59 ` Andi Kleen
2003-04-21 23:35 ` Jamie Lokier
2003-04-21 23:46 ` Andi Kleen [this message]
2003-04-21 23:56 ` [PATCH] Runtime memory barrier patching II Andi Kleen
2003-04-21 23:57 ` [PATCH] Runtime memory barrier patching Jamie Lokier
2003-04-22 0:06 ` Linus Torvalds
2003-04-22 0:13 ` Jamie Lokier
-- strict thread matches above, loose matches on Subject: below --
2003-04-21 23:41 Chuck Ebbert
2003-04-22 0:04 ` Jamie Lokier
[not found] <200304220111.h3M1BEp5004047@hera.kernel.org>
2003-04-22 8:43 ` Arjan van de Ven
2003-04-22 11:18 ` Andi Kleen
2003-04-22 16:11 ` Dave Jones
2003-04-22 10:12 Chuck Ebbert
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=20030421234611.GA15191@averell \
--to=ak@muc.de \
--cc=jamie@shareable.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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.