From: Jens Axboe <jens.axboe@oracle.com>
To: "Michael S. Tsirkin" <m.s.tsirkin@gmail.com>
Cc: pavel@suse.cz, rjw@sisk.pl, linux-pm@lists.linux-foundation.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
bugme-daemon@bugzilla.kernel.org
Subject: Re: [Bug 12713] Hang on resume from hibernation, apparently as result of 213d9417fec
Date: Tue, 17 Feb 2009 19:47:01 +0100 [thread overview]
Message-ID: <20090217184701.GJ30821@kernel.dk> (raw)
In-Reply-To: <20090216190949.GA6868@google.com>
On Mon, Feb 16 2009, Michael S. Tsirkin wrote:
> On Mon, Feb 16, 2009 at 09:47:32AM +0100, Jens Axboe wrote:
> > On Mon, Feb 16 2009, Michael S. Tsirkin wrote:
> > > On Mon, Feb 16, 2009 at 9:27 AM, Jens Axboe <jens.axboe@oracle.com> wrote:
> > > > On Mon, Feb 16 2009, Michael S. Tsirkin wrote:
> > > >> On Mon, Feb 16, 2009 at 2:05 AM, Michael S. Tsirkin
> > > >> <m.s.tsirkin@gmail.com> wrote:
> > > >> > Summary: seem to need to revert 213d9417fec62ef4c3675621b9364a667954d4dd
> > > >> > to fix resume from hibernation. Bugzilla entry created:
> > > >> > http://bugzilla.kernel.org/show_bug.cgi?id=12713
> > > >>
> > > >> Looking over this, I see something strange in the commit in question:
> > > >>
> > > >> diff --git a/include/linux/bio.h b/include/linux/bio.h
> > > >> index 5175aa3..f53568c 100644
> > > >> --- a/include/linux/bio.h
> > > >> +++ b/include/linux/bio.h
> > > >> @@ -163,12 +163,15 @@ struct bio {
> > > >> #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */
> > > >> #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */
> > > >> #define BIO_RW_BARRIER 2
> > > >> -#define BIO_RW_SYNC 3
> > > >> -#define BIO_RW_META 4
> > > >> -#define BIO_RW_DISCARD 5
> > > >> -#define BIO_RW_FAILFAST_DEV 6
> > > >> -#define BIO_RW_FAILFAST_TRANSPORT 7
> > > >> -#define BIO_RW_FAILFAST_DRIVER 8
> > > >> +#define BIO_RW_SYNCIO 3
> > > >> +#define BIO_RW_UNPLUG 4
> > > >> +#define BIO_RW_META 5
> > > >> +#define BIO_RW_DISCARD 6
> > > >> +#define BIO_RW_FAILFAST_DEV 7
> > > >> +#define BIO_RW_FAILFAST_TRANSPORT 8
> > > >> +#define BIO_RW_FAILFAST_DRIVER 9
> > > >> +
> > > >> +#define BIO_RW_SYNC (BIO_RW_SYNCIO | BIO_RW_UNPLUG)
> > > >>
> > > >> /*
> > > >> * upper 16 bits of bi_rw define the io priority of this bio
> > > >>
> > > >> I haven't read the code in depth, but taking running numbers and doing
> > > >> bitwise "or"
> > > >> on them looks a bit strange to me.
> > > >> So here BIO_RW_SYNC is (3 | 4) = 7, that is the same as BIO_RW_FAILFAST_DEV.
> > > >> So for example bio_failfast_dev and bio_sync are the same.
> > > >>
> > > >> Jens, could you comment on this please? Is this intentional?
> > > >
> > > > That's clearly a braino, you can't OR the shift values of course. I'll
> > > > get it fixed up asap!
> > >
> > > Cool, send me a patch, I'll test.
> >
> > Try this. Not a huge fan of this approach, but it should bring behaviour
> > back to what it used to be.
>
> I verified that applying this patch on top of 2.6.29-rc5 fixes
> hibernation for me.
Thanks for testing and confirming, it's queued up for inclusion asap.
--
Jens Axboe
prev parent reply other threads:[~2009-02-17 18:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-16 0:05 Michael S. Tsirkin
2009-02-16 0:07 ` Michael S. Tsirkin
2009-02-16 1:28 ` Roland Dreier
2009-02-16 7:27 ` Jens Axboe
2009-02-16 8:12 ` Michael S. Tsirkin
2009-02-16 8:47 ` Jens Axboe
2009-02-16 19:09 ` Michael S. Tsirkin
2009-02-17 18:47 ` Jens Axboe [this message]
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=20090217184701.GJ30821@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=m.s.tsirkin@gmail.com \
--cc=pavel@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome