All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>,
	linux-mm@kvack.org, gerald.schaefer@de.ibm.com, rjw@sisk.pl,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Allow memory hotplug and hibernation in the same kernel
Date: Sat, 14 Nov 2009 01:08:49 +0100	[thread overview]
Message-ID: <20091114000849.GG30880@basil.fritz.box> (raw)
In-Reply-To: <20091113155102.3480907f.akpm@linux-foundation.org>

On Fri, Nov 13, 2009 at 03:51:02PM -0800, Andrew Morton wrote:
> > ...
> >
> > +extern struct mutex pm_mutex;
> 
> Am a bit worried by the new mutex.

It's not a new mutex, just the existing one already used by suspend.
I only extended it's coverage to two more code paths.

> 
> > -extern struct mutex pm_mutex;
> > +static inline void lock_hibernation(void) {}
> > +static inline void unlock_hibernation(void) {}
> > +
> > +#else
> > +
> > +/* Let some subsystems like memory hotadd exclude hibernation */
> > +
> > +static inline void lock_hibernation(void)
> > +{
> > +	mutex_lock(&pm_mutex);
> > +}
> > +
> > +static inline void unlock_hibernation(void)
> > +{
> > +	mutex_unlock(&pm_mutex);
> > +}
> > +#endif
> 
> Has this been carefully reviewed and lockdep-tested to ensure that we
> didn't introduce any ab/ba nasties?

It's a "outer" global mutex for both, so I don't expect ABBA issues.

I tested hotadd/hotremove with lockdep and nothing showed up.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

WARNING: multiple messages have this Message-ID (diff)
From: Andi Kleen <andi@firstfloor.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>,
	linux-mm@kvack.org, gerald.schaefer@de.ibm.com, rjw@sisk.pl,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Allow memory hotplug and hibernation in the same kernel
Date: Sat, 14 Nov 2009 01:08:49 +0100	[thread overview]
Message-ID: <20091114000849.GG30880@basil.fritz.box> (raw)
In-Reply-To: <20091113155102.3480907f.akpm@linux-foundation.org>

On Fri, Nov 13, 2009 at 03:51:02PM -0800, Andrew Morton wrote:
> > ...
> >
> > +extern struct mutex pm_mutex;
> 
> Am a bit worried by the new mutex.

It's not a new mutex, just the existing one already used by suspend.
I only extended it's coverage to two more code paths.

> 
> > -extern struct mutex pm_mutex;
> > +static inline void lock_hibernation(void) {}
> > +static inline void unlock_hibernation(void) {}
> > +
> > +#else
> > +
> > +/* Let some subsystems like memory hotadd exclude hibernation */
> > +
> > +static inline void lock_hibernation(void)
> > +{
> > +	mutex_lock(&pm_mutex);
> > +}
> > +
> > +static inline void unlock_hibernation(void)
> > +{
> > +	mutex_unlock(&pm_mutex);
> > +}
> > +#endif
> 
> Has this been carefully reviewed and lockdep-tested to ensure that we
> didn't introduce any ab/ba nasties?

It's a "outer" global mutex for both, so I don't expect ABBA issues.

I tested hotadd/hotremove with lockdep and nothing showed up.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2009-11-14  0:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13 10:59 [PATCH] Allow memory hotplug and hibernation in the same kernel Andi Kleen
2009-11-13 10:59 ` Andi Kleen
2009-11-13 11:13 ` KOSAKI Motohiro
2009-11-13 11:13   ` KOSAKI Motohiro
2009-11-13 11:32   ` KOSAKI Motohiro
2009-11-13 11:32     ` KOSAKI Motohiro
2009-11-13 11:36     ` Andi Kleen
2009-11-13 11:36       ` Andi Kleen
2009-11-13 11:35   ` Andi Kleen
2009-11-13 11:35     ` Andi Kleen
2009-11-13 20:16 ` Rafael J. Wysocki
2009-11-13 20:16   ` Rafael J. Wysocki
2009-11-14  0:15   ` Andi Kleen
2009-11-14  0:15     ` Andi Kleen
2009-11-14 18:57     ` Rafael J. Wysocki
2009-11-14 18:57       ` Rafael J. Wysocki
2009-11-13 23:51 ` Andrew Morton
2009-11-13 23:51   ` Andrew Morton
2009-11-14  0:08   ` Andi Kleen [this message]
2009-11-14  0:08     ` Andi Kleen

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=20091114000849.GG30880@basil.fritz.box \
    --to=andi@firstfloor.org \
    --cc=akpm@linux-foundation.org \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rjw@sisk.pl \
    /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.