On Fri, Jan 21, 2005 at 02:42:54PM +0100, Rafael J. Wysocki wrote:
> Hi,
> 
> 
> No, it's "repeat until %ecx is zero or ZF is cleared", but the latter never 
> happens
> with movsl.  It's intended for cmpsl, scasl and friends (the assembler should
> complain about using it here).
> 
> > I think this should be "rep movsl".
> 
> Yes, it should.
> 
I'll change my code.

> 
> I have a suggestion.
> 
> hugang, you are currently replacing an array of pbes with a list of arrays
> of pbes contained within individual pages.
> 
> I would go further and replace it with a single one-directional list
> of pbes.  Namely, I would modify "struct pbe" in the following way:
> 
> struct pbe {
>       unsigned long address;
>       unsigned long orig_address;
>       swp_entry_t swap_address;       
>       struct pbe *next;
> };
> 
> (AFAICT, the "dummy" field is only used by hugang - as a pointer)
> and I would define "for_each_pbe()" as:
> 
> #define for_each_pbe(pbe, pblist) \
>       for (pbe = pblist;  pbe;  pbe = pbe->next)
> 
> Then, the only non-trivial changes would be in alloc_pagedir() and
> in swsusp_pagedir_relocate(), where I would need to link pbes to
> each other.
> 
> This also would make the assembly parts independent of the
> sizeof(struct pbe), which is currently hardcoded there.
> 
> What do you think?
Thanks for point that, That's better solution than current, I'll change
current code to this.

I'm think about, how can I make chang smaller.

-- 
Hu Gang       .-.
              /v\
             // \\ 
Linux User  /(   )\  [204016]
GPG Key ID   ^^-^^   http://soulinfo.com/~hugang/hugang.asc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to