public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Pavel Machek <pavel@ucw.cz>,
	Zdenek Kabelac <zdenek.kabelac@gmail.com>,
	Christoph Hellwig <hch@lst.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mmc@vger.kernel.org, viro@zeniv.linux.org.uk
Subject: Re: Regression in suspend to ram in 2.6.31-rc kernels
Date: Sat, 12 Sep 2009 00:04:02 +0200	[thread overview]
Message-ID: <200909120004.02146.rjw@sisk.pl> (raw)
In-Reply-To: <87bplim1ce.fsf@devron.myhome.or.jp>

On Friday 11 September 2009, OGAWA Hirofumi wrote:
> Pavel Machek <pavel@ucw.cz> writes:
> 
> > On Wed 2009-09-09 22:21:56, OGAWA Hirofumi wrote:
> >> Pavel Machek <pavel@ucw.cz> writes:
> >> 
> >> >> It seems
> >> >> 
> >> >>     1) sync() (probabry "sync" command)
> >> >>     2) sync as part of suspend sequence
> >> >>     3) sync_filesystem() by mmc remove event
> >> >> 
> >> >> I guess the root-cause of the problem would be 3). However, it would not
> >> >> be easy to fix, at least, we would need to think about what we want to
> >> >> do for it. So, to workaround it for now, I've made this patch.
> >> >
> >> > MMC driver trying to synchronize filesystems looks like ugly layering
> >> > violation to me. Why are we doing that?
> >> 
> >> There is no _layering violation_ here. IIRC, mmc just tells card removed
> >> event to another layer (on some points of view, to tell event can be
> >> wrong though). The partition (block) layer does it by event.
> >
> > So what is the problem?  Emulating sync when card is already removed
> > seems little ... interesting?
> 
> Um..., sorry, I'm not sure what are you talking about. Of course, the
> problem of this is that system freeze on suspend.
> 
> Or are you asking my guess of the cause, or something?  If so, although
> I'm not reading all emails on this thread, from Zdenek's backtrace, the
> sequence would be
> 
>     1) suspend mmc
>     2) mmc generates card removed event

Which shouldn't happen.

>     3) prepare to invalidate blockdev
>     4) sync fs on invalidating blockdev
>     5) flush buffers on invalidating blockdev (partitions)
>     6) delete blockdev (partitions)
> 
> or like the above. And I can guess some possible issues/root-cause we
> have to handle from it.
> 
>     a) card removed event from mmc for suspend is right design?

Not with the current suspend/resume design.

>     b) the card can be changed/removed before system was resumed, mmc
>        can be detect/handle it properly?
>     c) flushing buffers on _deleted_ device is right design?
> 
> and I suspect there are more issues in detail and resume process though.

Well, first, there's a limit to which file systems can ignore the
suspend/resume process and we're hitting it right now.

Second, we need a general solution for handling file systems over
suspend/resume _and_ possibly removable devices that can be gone while
suspended.  We don't have any solution like this right now and I have a little
experience with file systems, so I'm not going to take care of this in the
foreseeable future.  If someone else can, that's going to be appreciated very
much.

Thanks,
Rafael

  parent reply	other threads:[~2009-09-11 22:03 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-31 11:51 Regression in suspend to ram in 2.6.31-rc kernels Zdenek Kabelac
2009-08-31 19:19 ` Rafael J. Wysocki
2009-09-01  9:34   ` Zdenek Kabelac
2009-09-03 22:29     ` Zdenek Kabelac
2009-09-03 23:23       ` Christoph Hellwig
2009-09-04  0:47         ` OGAWA Hirofumi
2009-09-04  9:13           ` Zdenek Kabelac
2009-09-05 17:22             ` OGAWA Hirofumi
2009-09-05 19:53               ` Zdenek Kabelac
2009-09-05 22:42                 ` OGAWA Hirofumi
2009-09-08  8:10                   ` Zdenek Kabelac
2009-09-09 13:15                     ` OGAWA Hirofumi
2009-09-07 12:51               ` Pavel Machek
2009-09-09 13:21                 ` OGAWA Hirofumi
2009-09-10 19:23                   ` Pavel Machek
2009-09-11  6:39                     ` OGAWA Hirofumi
2009-09-11 20:09                       ` Pavel Machek
2009-09-11 21:14                         ` Zdenek Kabelac
2009-09-11 21:32                           ` Pavel Machek
2009-09-11 21:45                             ` Zdenek Kabelac
2009-09-11 21:51                               ` Pavel Machek
2009-09-11 22:22                                 ` Rafael J. Wysocki
2009-09-14 20:05                                 ` Pierre Ossman
2009-09-14 20:25                                   ` Pavel Machek
2009-09-11 22:29                               ` Chris Ball
2009-09-11 22:36                                 ` Rafael J. Wysocki
2009-09-14  8:39                                   ` Zdenek Kabelac
2009-09-14 19:17                                     ` Rafael J. Wysocki
2009-09-14 20:27                                     ` Pavel Machek
2009-09-18 11:15                                   ` OGAWA Hirofumi
2009-09-18 21:39                                     ` Rafael J. Wysocki
2009-09-11 22:22                           ` Chris Ball
2009-09-11 22:04                       ` Rafael J. Wysocki [this message]
2009-09-11 22:21                         ` Pavel Machek
2009-09-11 22:32                           ` Rafael J. Wysocki
2009-09-08 19:06           ` Christoph Hellwig
2009-09-08 19:48             ` Rafael J. Wysocki
2009-09-09 13:52             ` OGAWA Hirofumi

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=200909120004.02146.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=hch@lst.de \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zdenek.kabelac@gmail.com \
    /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