mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Nick Piggin <npiggin@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: queued spinlock code and results
Date: Mon, 9 Jul 2007 12:55:01 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.999.0707091250550.3412@woody.linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0707091241350.15898@alien.or.mcafeemobile.com>



On Mon, 9 Jul 2007, Davide Libenzi wrote:
> 
> The always-lfence instruction in vadd-lock really is painfull though.
> If numbers are close, and given that spinlock size considering structure 
> alignments should not matter much, wouldn't it be better to use a double 
> short and remove the 256 CPUs cap?

On x86? No.

There are no issues with the 255-CPU cap on 32-bit x86. It's just not 
relevant to anybody. So the _only_ thing that matters is speed and to a 
secondary degree size.

On x86-64, things are slightly different, and we would want to have at 
least the _capability_ to do 16 bits. So there might be a (somewhat weak) 
argument in favor of trying to share code.

But even then, size and performance are really the only things that 
matter, and if the 8/16-bit version is no slower, then I'd pick that by 
default, and suggest the 16/32-bit one to be enabled by CONFIG_MAX_CPU's 
being >=256 (at which point you can share the code with x86 anyway, since 
that just becomes the <256 cpu case).

		Linus

  reply	other threads:[~2007-07-09 19:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-08  4:32 Nick Piggin
2007-07-08 11:18 ` Andi Kleen
2007-07-08 10:40   ` Nick Piggin
2007-07-08 16:49   ` Linus Torvalds
2007-07-10 20:52   ` Christoph Lameter
2007-07-11  2:06     ` Nick Piggin
2007-07-11  2:26       ` Christoph Lameter
2007-07-11  4:51         ` Nick Piggin
2007-07-09 19:01 ` Davide Libenzi
2007-07-09 19:16   ` Davide Libenzi
2007-07-09 19:26   ` Linus Torvalds
2007-07-09 19:47     ` Davide Libenzi
2007-07-09 19:55       ` Linus Torvalds [this message]
2007-07-09 20:08         ` Linus Torvalds

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=alpine.LFD.0.999.0707091250550.3412@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.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 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®