[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140723105750.GB22675@amd.pavel.ucw.cz>
Date: Wed, 23 Jul 2014 12:57:51 +0200
From: Pavel Machek <pavel@....cz>
To: Joerg Roedel <joro@...tes.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <len.brown@...el.com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/6 v2] PM / Hibernate: Memory bitmap scalability
improvements
On Tue 2014-07-22 14:10:22, Joerg Roedel wrote:
> On Tue, Jul 22, 2014 at 12:58:12PM +0200, Pavel Machek wrote:
> > On Tue 2014-07-22 12:34:44, Joerg Roedel wrote:
> > > On Tue, Jul 22, 2014 at 02:41:29AM +0200, Rafael J. Wysocki wrote:
> > > > It looks like some specific need motivated the Joerg's work, however,
> > > > so let's just not dismiss the use case lightly without knowing it.
> > >
> > > The motivation was to optimize the data structures for machines with
> > > large amounts of RAM without penalizing average machines. On a 12TB
> > > machine you are close to 100000 pages just for one bitmap. Scanning
> > > through that linearly to find a given bit just doesnt scale anymore in
> > > this case.
> >
> > Can you produce backtrace where 12TB machine spends time during boot
> > with resume= parameter but no suspend image?
> >
> > AFAICT swsusp_check() does not play with bitmaps.
>
> I can ask for a backtrace, I currently don't have one. But I have
> perf-data for this case. It also shows that it spends most of its time
> with bitmap operations:
>
> ~# time perf record /usr/sbin/resume $sdev
> resume: libgcrypt version: 1.5.0
> [ perf record: Woken up 12 times to write data ]
> [ perf record: Captured and wrote 2.882 MB perf.data (~125898
samples) ]
Aha, but that's the userland code... suspend package, resume.c:
dev = open(snapshot_dev_name, O_WRONLY);
if (dev < 0) {
error = ENOENT;
goto Free;
}
resume_dev = open_resume_dev(resume_dev_name, &swsusp_header);
if (resume_dev == -ENOMEDIUM) {
error = 0;
goto Close;
} else if (resume_dev < 0) {
error = -resume_dev;
goto Close;
}
What your probably want to do is open_resume_dev first, and only
open(snapshot_dev_name...) if it finds correct signature.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists