Re: [PATH] 11-24 swsusp update 1/3

Pavel Machek
2004-11-24T10:56:59Z

Hi!

> > Either drop this one or explain why it is good idea. It seems to be
> > independend on the rest.
> This code I just copy from old ppc swsusp port, I don't why, :).

So drop the patch...

> >
> > > @@ -144,9 +151,13 @@
> > > }
> > >
> > > /* Free memory before shutting down devices. */
> > > - free_some_memory();
> > > + /* free_some_memory(); */
> >
> > Needs to be if (!swsusp_pagecache), right?
> I think we can drop this one, In write_page_caches has same code, and do
> the best.

So at least delete it properly; no need to comment it out.

> > + if (swsusp_pbe_pgdir->orig_address == 0) return;
> > > + for (i = 0; i < PAGE_SIZE / (sizeof(unsigned long)); i+=4) {
> > > + *(((unsigned long *)(swsusp_pbe_pgdir->orig_address) + i)) =
> > > + *(((unsigned long *)(swsusp_pbe_pgdir->address) + i));
> > > + *(((unsigned long *)(swsusp_pbe_pgdir->orig_address) + i+1)) =
> > > + *(((unsigned long *)(swsusp_pbe_pgdir->address) + i+1));
> > > + *(((unsigned long *)(swsusp_pbe_pgdir->orig_address) + i+2)) =
> > > + *(((unsigned long *)(swsusp_pbe_pgdir->address) + i+2));
> > > + *(((unsigned long *)(swsusp_pbe_pgdir->orig_address) + i+3)) =
> > > + *(((unsigned long *)(swsusp_pbe_pgdir->address) + i+3));
> >
> > Do you really have to do manual loop unrolling? Why can't C code be
> > same for i386 and ppc?
> here is stupid code, update in my new patch, I using memcopy in i386, it
> create small assemble code.

Warning: memcpy() may uses MMX or SSE or something on some cpus....

> > Please avoid "return (0);". Using "return 0;" will do just fine.
> fixed.
>
> here is my patch relative with your big diff, hope can merge.

I have already too big difference against mainline, so I can only
merge trivial patches at this point. When 2.6.10 comes out, I'd like
to merge "no-high-order-allocation" patch, and "pagecache writer"
sometime after that...
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!