All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <bgerst@didntduck.org>
To: Imanpreet Singh Arora <imanpreet@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Question from Russells Spinlocks
Date: Thu, 09 Dec 2004 16:53:22 -0500	[thread overview]
Message-ID: <41B8C952.3050104@didntduck.org> (raw)
In-Reply-To: <41B76B7E.9020706@gmail.com>

Imanpreet Singh Arora wrote:
> 
> Hello there,
> 
>    I was reading Russell's guide on spinlocks, and I have some questions 
> regarding it.
> 
> 
>    Question-->    Russell says that in case of non-SMP machines 
> spinlocks don't exist _at_ALL_. Well they should do something don't they 
> like disable interrupts and premptations. I checked linux/spinlock well 
> they DO NOT do anything atleast not when DEBUG_SPINLOCKS == 0. My 
> understanding is that since they aren't used anywhere outside kernel and 
> drivers(?), they can't be prempted. At least that is what I have read.
> 

On UP kernels, the spinlock operations that include interrupt 
manipulations still affect interrupts.  It's only the actual lock 
portion that becomes a no-op.

> 
> What does the comment about gcc while defining atomic_t signify?
>             --> What about the comment about the limit of 24 bits on 
> atomic_t?                a)    Atomic operations on integers are 
> guranteed only if there value can be stored in 24 bits.
>             b)    Atomic operations are guranteed only if the pointer 
> has 8 MSbits set zero.
> 
> 

In 2.6, the 24-bit limit is no longer valid.  atomic_t variables are a 
full 32 bits on all arches now.

--
				Brian Gerst


  reply	other threads:[~2004-12-09 21:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-08 21:00 Question from Russells Spinlocks Imanpreet Singh Arora
2004-12-09 21:53 ` Brian Gerst [this message]
2004-12-09 22:03   ` William Lee Irwin III
  -- strict thread matches above, loose matches on Subject: below --
2004-12-09 21:15 kernel-stuff
2004-12-09 21:49 ` Robert Love
2004-12-10  2:04   ` Parag Warudkar
2004-12-09 23:30 ` Anton Altaparmakov
2004-12-09 23:58   ` Jeff V. Merkey
2004-12-10  2:02   ` Parag Warudkar

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=41B8C952.3050104@didntduck.org \
    --to=bgerst@didntduck.org \
    --cc=imanpreet@gmail.com \
    --cc=linux-kernel@vger.kernel.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 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.