mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Andi Kleen <ak@muc.de>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Runtime memory barrier patching
Date: Tue, 22 Apr 2003 00:57:32 +0100	[thread overview]
Message-ID: <20030421235732.GA17793@mail.jlokier.co.uk> (raw)
In-Reply-To: <20030421234611.GA15191@averell>

Andi Kleen wrote:
> > Such as removing the lock prefix when running non-SMP?
...
> .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.

1. It should cost at most 4 bytes, in a table of "remove me" address,
with topmost bits of each word used to give the length of the
instruction to remove - i.e. to replace with an optimal nop sequence.

2. Not just locks - a lot of spinlock code could be removed completely.
I don't have an opinion on whether this is worth doing - one can
simply run a UP kernel after all.

-- Jamie

  parent reply	other threads:[~2003-04-21 23:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-21 19:27 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
2003-04-21 23:56         ` [PATCH] Runtime memory barrier patching II Andi Kleen
2003-04-21 23:57         ` Jamie Lokier [this message]
2003-04-22  0:06       ` [PATCH] Runtime memory barrier patching Linus Torvalds
2003-04-22  0:13         ` Jamie Lokier
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=20030421235732.GA17793@mail.jlokier.co.uk \
    --to=jamie@shareable.org \
    --cc=ak@muc.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®