public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Miller <davem@davemloft.net>
Cc: geoffrey.levand@am.sony.com, linux-kernel@vger.kernel.org,
	linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [patch v2] LMB: Add basic spin locking to lmb
Date: Mon, 19 May 2008 22:32:58 -0400	[thread overview]
Message-ID: <1211250778.8297.159.camel@pasglop> (raw)
In-Reply-To: <20080519.192215.193701293.davem@davemloft.net>


On Mon, 2008-05-19 at 19:22 -0700, David Miller wrote:
> From: Geoff Levand <geoffrey.levand@am.sony.com>
> Date: Mon, 19 May 2008 17:55:45 -0700
> 
> > Add a spinlock to struct lmb to enforce concurrency in
> > lmb_add(), lmb_remove(), lmb_analyze(), lmb_find(), and
> > lmb_dump_all().
> > 
> > This locking is needed for SMP systems that access the lmb structure
> > during hot memory add and remove operations after secondary cpus
> > have been started.
> > 
> > Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
> > ---
> > 
> > v2: o Add locking to lmb_find().
> 
> I'm not against this patch, but I'm pretty sure it's not
> necessary.  Isn't memory hotplug already synchronized at
> a higher level?
> 
> If not, it should be.

I think the core memory hotplug is... However, we used to not change the
LMB when doing so (afaik, I'm travelling and not looking at the code
right now). However, things like PS3 memory hotplug tries to keep LMB is
sync for the sake of /dev/mem or similar and that happens before the
memory is added to the core.

Ben.



  reply	other threads:[~2008-05-20  2:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4829C07A.4040407@am.sony.com>
     [not found] ` <1210834125.8297.80.camel@pasglop>
     [not found]   ` <1210834289.8297.85.camel@pasglop>
     [not found]     ` <20080515.000203.225783838.davem@davemloft.net>
2008-05-20  0:40       ` [rfc] [patch] LMB: Add basic spin locking to lmb Geoff Levand
2008-05-20  0:55         ` [patch v2] " Geoff Levand
2008-05-20  2:22           ` David Miller
2008-05-20  2:32             ` Benjamin Herrenschmidt [this message]
2008-05-20  2:34               ` David Miller

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=1211250778.8297.159.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=geoffrey.levand@am.sony.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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