All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Oliver Neukum <oliver@neukum.org>,
	Maxim Levitsky <maximlevitsky@gmail.com>,
	linux-pm@lists.linux-foundation.org,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] Memory allocations in .suspend became very unreliable)
Date: Tue, 19 Jan 2010 08:55:57 +1100	[thread overview]
Message-ID: <1263851757.724.500.camel@pasglop> (raw)
In-Reply-To: <201001180000.23376.rjw@sisk.pl>

On Mon, 2010-01-18 at 00:00 +0100, Rafael J. Wysocki wrote:
> On Sunday 17 January 2010, Benjamin Herrenschmidt wrote:
> > On Sun, 2010-01-17 at 14:27 +0100, Rafael J. Wysocki wrote:
> ...
> > However, it's hard to deal with the case of allocations that have
> > already started waiting for IOs. It might be possible to have some VM
> > hook to make them wakeup, re-evaluate the situation and get out of that
> > code path but in any case it would be tricky.
> 
> In the second version of the patch I used an rwsem that made us wait for these
> allocations to complete before we changed gfp_allowed_mask.
> 
> [This is kinda buggy in the version I sent, but I'm going to send an update
> in a minute.]

And nobody screamed due to cache line ping pong caused by this in the
fast path ? :-)

We might want to look at something a bit smarter for that sort of
read-mostly-really-really-mostly construct, though in this case I don't
think RCU is the answer since we are happily scheduling.

I wonder if something per-cpu would do, it's thus the responsibility of
the "writer" to take them all in order for all CPUs.

Cheers,
Ben.



WARNING: multiple messages have this Message-ID (diff)
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Oliver Neukum <oliver@neukum.org>,
	Maxim Levitsky <maximlevitsky@gmail.com>,
	linux-pm@lists.linux-foundation.org,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] Memory allocations in .suspend became very unreliable)
Date: Tue, 19 Jan 2010 08:55:57 +1100	[thread overview]
Message-ID: <1263851757.724.500.camel@pasglop> (raw)
In-Reply-To: <201001180000.23376.rjw@sisk.pl>

On Mon, 2010-01-18 at 00:00 +0100, Rafael J. Wysocki wrote:
> On Sunday 17 January 2010, Benjamin Herrenschmidt wrote:
> > On Sun, 2010-01-17 at 14:27 +0100, Rafael J. Wysocki wrote:
> ...
> > However, it's hard to deal with the case of allocations that have
> > already started waiting for IOs. It might be possible to have some VM
> > hook to make them wakeup, re-evaluate the situation and get out of that
> > code path but in any case it would be tricky.
> 
> In the second version of the patch I used an rwsem that made us wait for these
> allocations to complete before we changed gfp_allowed_mask.
> 
> [This is kinda buggy in the version I sent, but I'm going to send an update
> in a minute.]

And nobody screamed due to cache line ping pong caused by this in the
fast path ? :-)

We might want to look at something a bit smarter for that sort of
read-mostly-really-really-mostly construct, though in this case I don't
think RCU is the answer since we are happily scheduling.

I wonder if something per-cpu would do, it's thus the responsibility of
the "writer" to take them all in order for all CPUs.

Cheers,
Ben.


--
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>

  parent reply	other threads:[~2010-01-18 21:57 UTC|newest]

Thread overview: 183+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-15  9:59 Memory allocations in .suspend became very unreliable Maxim Levitsky
2010-01-15 10:24 ` Romit Dasgupta
2010-01-15 10:34   ` Maxim Levitsky
2010-01-15 22:03 ` Rafael J. Wysocki
2010-01-15 23:56   ` Maxim Levitsky
2010-01-16  0:57     ` Rafael J. Wysocki
2010-01-16 21:44       ` Maxim Levitsky
2010-01-16 22:17         ` Rafael J. Wysocki
2010-01-17  0:38           ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: Memory allocations in .suspend became very unreliable) Rafael J. Wysocki
2010-01-17  0:38           ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-17  0:38             ` Rafael J. Wysocki
2010-01-17  1:24             ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Oliver Neukum
2010-01-17  1:24             ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Oliver Neukum
2010-01-17  1:24               ` Oliver Neukum
2010-01-17 13:27               ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Rafael J. Wysocki
2010-01-17 13:27               ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-17 13:27                 ` Rafael J. Wysocki
2010-01-17 13:36                 ` Rafael J. Wysocki
2010-01-17 13:36                   ` Rafael J. Wysocki
2010-01-17 13:36                 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Rafael J. Wysocki
2010-01-17 18:58                 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Benjamin Herrenschmidt
2010-01-17 18:58                   ` Benjamin Herrenschmidt
2010-01-17 23:00                   ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Rafael J. Wysocki
2010-01-17 23:00                   ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-17 23:00                     ` Rafael J. Wysocki
2010-01-18  7:53                     ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Oliver Neukum
2010-01-18  7:53                     ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Oliver Neukum
2010-01-18  7:53                       ` Oliver Neukum
2010-01-18 16:17                       ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Alan Stern
2010-01-18 16:17                       ` [linux-pm] " Alan Stern
2010-01-18 16:17                         ` Alan Stern
2010-01-18 20:59                         ` Rafael J. Wysocki
2010-01-18 20:59                           ` Rafael J. Wysocki
2010-01-19 15:13                           ` Alan Stern
2010-01-19 15:13                             ` Alan Stern
2010-01-19 15:13                           ` Alan Stern
2010-01-18 20:59                         ` Rafael J. Wysocki
2010-01-18 20:56                       ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-18 20:56                         ` Rafael J. Wysocki
2010-01-18 20:56                       ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Rafael J. Wysocki
2010-01-18 21:55                     ` Benjamin Herrenschmidt [this message]
2010-01-18 21:55                       ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Benjamin Herrenschmidt
2010-01-18 23:33                       ` Rafael J. Wysocki
2010-01-18 23:33                         ` Rafael J. Wysocki
2010-01-18 23:33                       ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Rafael J. Wysocki
2010-01-18 21:55                     ` Benjamin Herrenschmidt
2010-01-17 18:58                 ` Benjamin Herrenschmidt
2010-01-17 13:55             ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-17 13:55               ` Rafael J. Wysocki
2010-01-17 16:21               ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Minchan Kim
2010-01-17 16:21               ` [linux-pm] " Minchan Kim
2010-01-17 16:21                 ` Minchan Kim
2010-01-17 16:23                 ` Minchan Kim
2010-01-17 16:23                 ` [linux-pm] " Minchan Kim
2010-01-17 16:23                   ` Minchan Kim
2010-01-18  0:25                 ` Rafael J. Wysocki
2010-01-18  0:25                   ` Rafael J. Wysocki
2010-01-18  2:20                   ` KOSAKI Motohiro
2010-01-18  2:20                     ` KOSAKI Motohiro
2010-01-18 21:06                     ` Rafael J. Wysocki
2010-01-18 21:06                       ` Rafael J. Wysocki
2010-01-19  9:15                       ` Oliver Neukum
2010-01-19  9:15                         ` Oliver Neukum
2010-01-19 20:34                         ` Rafael J. Wysocki
2010-01-19 20:34                         ` [linux-pm] " Rafael J. Wysocki
2010-01-19 20:34                           ` Rafael J. Wysocki
2010-01-19  9:15                       ` Oliver Neukum
2010-01-18 21:06                     ` Rafael J. Wysocki
2010-01-18  2:20                   ` KOSAKI Motohiro
2010-01-18  0:25                 ` Rafael J. Wysocki
2010-01-18 17:00               ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Oliver Neukum
2010-01-18 17:00                 ` Oliver Neukum
2010-01-18 20:41                 ` Rafael J. Wysocki
2010-01-18 20:41                   ` Rafael J. Wysocki
2010-01-19  9:25                   ` Oliver Neukum
2010-01-19  9:25                     ` Oliver Neukum
2010-01-19 20:37                     ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Rafael J. Wysocki
2010-01-19 20:37                     ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-19 20:37                       ` Rafael J. Wysocki
2010-01-20 14:05                       ` Oliver Neukum
2010-01-20 14:05                         ` Oliver Neukum
2010-01-20 21:13                         ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Rafael J. Wysocki
2010-01-20 21:13                         ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-20 21:13                           ` Rafael J. Wysocki
2010-01-20 14:05                       ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Oliver Neukum
2010-01-19  9:25                   ` Oliver Neukum
2010-01-18 20:41                 ` Rafael J. Wysocki
2010-01-18 17:00               ` Oliver Neukum
2010-01-17 13:55             ` Rafael J. Wysocki
2010-01-18  2:16             ` KOSAKI Motohiro
2010-01-18  2:16             ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " KOSAKI Motohiro
2010-01-18  2:16               ` KOSAKI Motohiro
2010-01-18 20:55               ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Rafael J. Wysocki
2010-01-18 20:55               ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-18 20:55                 ` Rafael J. Wysocki
2010-01-19  1:19                 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " KOSAKI Motohiro
2010-01-19  1:19                 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " KOSAKI Motohiro
2010-01-19  1:19                   ` KOSAKI Motohiro
2010-01-19  3:19                   ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Benjamin Herrenschmidt
2010-01-19  3:19                   ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Benjamin Herrenschmidt
2010-01-19  3:19                     ` Benjamin Herrenschmidt
2010-01-19  9:04                     ` Bastien ROUCARIES
2010-01-19  9:04                       ` Bastien ROUCARIES
2010-01-19 23:17                       ` Benjamin Herrenschmidt
2010-01-19 23:17                         ` Benjamin Herrenschmidt
2010-01-20 11:31                         ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Oliver Neukum
2010-01-20 11:31                         ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Oliver Neukum
2010-01-20 11:31                           ` Oliver Neukum
2010-01-20 21:11                           ` Benjamin Herrenschmidt
2010-01-20 21:11                             ` Benjamin Herrenschmidt
2010-01-20 21:11                           ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Benjamin Herrenschmidt
2010-01-20 21:12                           ` Rafael J. Wysocki
2010-01-20 21:12                           ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-20 21:12                             ` Rafael J. Wysocki
2010-01-19 23:17                       ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Benjamin Herrenschmidt
2010-01-19  9:04                     ` Bastien ROUCARIES
2010-01-19 20:47                     ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-19 20:47                       ` Rafael J. Wysocki
2010-01-20  0:33                       ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " KOSAKI Motohiro
2010-01-20  0:33                       ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " KOSAKI Motohiro
2010-01-20  0:33                         ` KOSAKI Motohiro
2010-01-20 21:21                         ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Rafael J. Wysocki
2010-01-20 21:21                         ` Rafael J. Wysocki
2010-01-20 21:21                         ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-20 21:21                           ` Rafael J. Wysocki
2010-01-21  0:47                           ` KOSAKI Motohiro
2010-01-21  0:47                             ` KOSAKI Motohiro
2010-01-21 20:21                             ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Rafael J. Wysocki
2010-01-21 20:21                             ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Rafael J. Wysocki
2010-01-21 20:21                               ` Rafael J. Wysocki
2010-01-21 20:42                               ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Nigel Cunningham
2010-01-21 20:42                               ` [linux-pm] " Nigel Cunningham
2010-01-21 20:42                                 ` Nigel Cunningham
2010-01-21 21:38                                 ` Rafael J. Wysocki
2010-01-21 21:38                                 ` [linux-pm] " Rafael J. Wysocki
2010-01-21 21:38                                   ` Rafael J. Wysocki
2010-01-22  1:31                               ` KOSAKI Motohiro
2010-01-22  1:31                               ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " KOSAKI Motohiro
2010-01-22  1:31                                 ` KOSAKI Motohiro
2010-01-22  1:42                                 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " KOSAKI Motohiro
2010-01-22  1:42                                 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " KOSAKI Motohiro
2010-01-22  1:42                                   ` KOSAKI Motohiro
2010-01-22 10:11                                   ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Maxim Levitsky
2010-01-22 10:11                                   ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Maxim Levitsky
2010-01-22 10:11                                     ` Maxim Levitsky
2010-01-22 21:19                                     ` [Update][PATCH] MM / PM: Force GFP_NOIO during suspend/hibernation and resume Rafael J. Wysocki
2010-01-22 21:19                                     ` Rafael J. Wysocki
2010-01-22 21:19                                       ` Rafael J. Wysocki
2010-01-23  9:29                                       ` Maxim Levitsky
2010-01-23  9:29                                       ` Maxim Levitsky
2010-01-23  9:29                                         ` Maxim Levitsky
2010-01-25 21:49                                         ` Rafael J. Wysocki
2010-01-25 21:49                                         ` Rafael J. Wysocki
2010-01-25 21:49                                           ` Rafael J. Wysocki
2010-01-25 21:52                                           ` Alexey Starikovskiy
2010-01-25 21:52                                           ` Alexey Starikovskiy
2010-01-25 21:52                                             ` Alexey Starikovskiy
2010-01-30 18:56                                             ` Rafael J. Wysocki
2010-01-30 18:56                                             ` Rafael J. Wysocki
2010-01-30 18:56                                               ` Rafael J. Wysocki
2010-01-30 20:42                                               ` Maxim Levitsky
2010-01-30 20:42                                                 ` Maxim Levitsky
2010-01-30 20:53                                                 ` Rafael J. Wysocki
2010-01-30 20:53                                                   ` Rafael J. Wysocki
2010-01-30 20:53                                                 ` Rafael J. Wysocki
2010-01-30 20:42                                               ` Maxim Levitsky
2010-01-22 20:58                                 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] Memory allocations in .suspend became very unreliable) Rafael J. Wysocki
2010-01-22 20:58                                   ` Rafael J. Wysocki
2010-01-22 20:58                                 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Rafael J. Wysocki
2010-01-21  0:47                           ` KOSAKI Motohiro
2010-01-19 20:47                     ` Rafael J. Wysocki
2010-01-30 15:46             ` Maxim Levitsky
2010-01-30 15:46             ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Maxim Levitsky
2010-01-30 15:46               ` Maxim Levitsky
2010-01-30 18:47               ` Rafael J. Wysocki
2010-01-30 18:47                 ` Rafael J. Wysocki
2010-01-30 20:37                 ` Maxim Levitsky
2010-01-30 20:37                   ` Maxim Levitsky
2010-02-01 19:51                   ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Maxim Levitsky
2010-02-01 19:51                   ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: Re: [linux-pm] " Maxim Levitsky
2010-02-01 19:51                     ` Maxim Levitsky
2010-01-30 20:37                 ` [RFC][PATCH] PM: Force GFP_NOIO during suspend/resume (was: " Maxim Levitsky
2010-01-30 18:47               ` Rafael J. Wysocki

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=1263851757.724.500.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=maximlevitsky@gmail.com \
    --cc=oliver@neukum.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.