Re: [PATCH 2/3] swsusp i386 mark special saveable/unsaveable pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

On Wednesday 19 April 2006 13:28, Shaohua Li wrote:
> On Wed, 2006-04-19 at 12:59 +1000, Nigel Cunningham wrote:
> > Hi.
> >
> > On Wednesday 19 April 2006 12:53, Shaohua Li wrote:
> > > On Wed, 2006-04-19 at 12:08 +1000, Nigel Cunningham wrote:
> > > > Hi.
> > > >
> > > > On Wednesday 19 April 2006 11:51, Shaohua Li wrote:
> > > > > On Wed, 2006-04-19 at 11:41 +1000, Nigel Cunningham wrote:
> > > > > > Oh, and while we're on the topic, if only part of a page is NVS,
> > > > > > what's the right behaviour? My e820 table has:
> > > > > >
> > > > > > BIOS-e820: 000000003dff0000 - 000000003dffffc0 (ACPI data)
> > > > > > BIOS-e820: 000000003dffffc0 - 000000003e000000 (ACPI NVS)
> > > > >
> > > > > If only part of a page is NVS, my patch will save the whole page.
> > > > > Any other idea?
> > > >
> > > > A device model driver that handles saving just the part of the page,
> > > > using preallocated buffers to avoid the potential allocation
> > > > problems? (The whole page could then safely be Nosave).
> > >
> > > The allocation might not be a problem, this just needs one or two extra
> > > pages. A problem is if just part of the page is NVS, could we touch
> > > other part (save/restore) the page.
> >
> > Yes, so I was thinking of treating it with a pseudo driver that could
> > save and restore just that portion of the page.
>
> Sounds like a good idea. If NVS is already aligned to page size, do you
> still use the pseudo driver to save/restore the pages? In my system, the
> NVS memory is 512k.
> In the other way, we could let the 'swsusp_add_arch_pages' accept
> address instead of a pfn and let snapshot.c handle the partial page
> issue.

I guess the cleanest solution would be to use the same routine in either case. 
If that was a pseudo driver, it would mean double the memory usage (the pages 
allocated would also be atomically copied), so perhaps using 
swsusp_add_arch_pages is the way to go.

I wonder too whether Mel Gorman e820 table patches could be leveraged to make 
finding the NVS data really nice and simple?

Regards,

Nigel

Attachment: pgpbXdu9C97Zw.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux