Hi. On Wed, 2004-01-21 at 10:54, Benjamin Herrenschmidt wrote: > > FYI, this is that "ugly C-generated assembly" we are talking about. I > > do not think it is so bad. > > The x86 version has been cleaned up and isn't _that_ bad, though it > could definitely use some comments and I don't like the "Lxxx" labels, > I'd rather either use number with the "nb" or "nf" GAS constructs or > use real words labels. Looking at it though, I fail to see the need > to get it generated by gcc in the first place :) The 2.4 version works from C, even the SMP version I've prepared. Something in 2.6 is different, and I don't understand what/why (Pavel might be able to explain). If I understood that, I could get SMP support for 2.6 going too. > The PPC version that was proposed is horrible. I think he wanted help with cleaning it up. > > FYI, there are exactly 6 variables in "nosave" section. Two loop > > variables you can see in above code, one spinlock, number of pages to > > save, pointer to directory of pages to be copied, and its length. > > > > I could probably move spinlock and length of pgdir out of there... > > That's not too much, you could probably afford having a one page header > to the suspend image with those informations and the page copy loop > (provided by the suspended kernel so you don't have _any_ compatibility > issue and can even do it from the bootloader one day...) Well, we do have a header at the moment with that info, (but not containing the page copy loop :>) > Looking at swsusp code in current 2.6, when do you do that pass ? On the > shutdown pass, you call devices_suspend(4); which is fine. But I don't see > where you call devices_suspend(X) on the resume path. IMHO, that should be Hmm. Perhaps it's just my version that does it? I couldn't find it either. Regards, Nigel -- My work on Software Suspend is graciously brought to you by LinuxFund.org.
Attachment:
signature.asc
Description: This is a digitally signed message part