[linux-pm] [RFC 3/3] suspend to disk on powermac G5

Johannes Berg johannes at sipsolutions.net
Wed Dec 13 00:33:11 EST 2006


Hi,

> Does aoa module load/unload help? Does making it build-in help? Also
> try playing with aumix after resume.

Yeah, I tried all of that except making it built-in. It's rather strange
but I suppose I'm to blame since I wrote aoa :) I'll need to look a bit
further. The odd thing is that everything works, I can play, change
volumes etc. just don't get any sound. I'm thinking something is wrong
with the onyx codec programming but haven't really looked yet. i2sbus
should be fine since it suspends/resume ok on my powerbook.

> > +	/* phew. suckers. this 16MB area is left unmapped
> > +	 * at another place but they don't bother to mark it so */
> > +	for (i = 0; i < (1<<24); i+= PAGE_SIZE)
> > +		SetPageNosave(virt_to_page((void*)((unsigned long)dart_tablebase + i)));
> > +
> 
> Can you move that marking where it belongs?

Where does it belong? The reservation is done so early that
SetPageNosave can't work yet (IIRC, I've been sitting on this code too
long.)

> > +	if (dart_tablebase == 0 || dart_tablesize == 0)
> > +		return;
> > +
> > +	p = alloc_pages(GFP_KERNEL, 9);
> > +	BUG_ON(!p);
> > +	dart_copy = page_address(p);
> > +}
> 
> Not sure how likely is 2MB allocation to succeed. You may need to
> prealocate it... And you definitely will need to handle error here.

Good points. I suppose I'll just preallocate it or try mapping the dart
table after all and not doing anything special with it during
suspend/resume... need to think about it more.

> > --- linux-2.6-git.orig/kernel/power/snapshot.c	2006-12-11 23:34:46.718716759 +0100
> > +++ linux-2.6-git/kernel/power/snapshot.c	2006-12-11 23:38:00.152716759 +0100
> > @@ -707,6 +707,8 @@ static struct page *saveable_page(unsign
> >  		return NULL;
> >  	if (PageNosaveFree(page))
> >  		return NULL;
> > +	if (!page_is_ram(pfn))
> > +		return NULL;
> >  
> >  	return page;
> >  }
> 
> Could this get some testing in -mm?

I'd be much happier with it if I knew why it was necessary. On the
powermac we have a 2G memory hole: first 2G memory, then a 2G hole and
then the rest of the memory. It seems like the suspend code doesn't
handle any memory holes at the moment but that seems strange to me.

Thanks for your comments!

johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20061212/52874c85/attachment.pgp>


More information about the Linuxppc-dev mailing list