Hi,
On Sunday 27 August 2006 22:50, Pavel Machek wrote:
>
> > > tty-console-suspend-resume-fix.patch ... if it works for you, it is
> > > good enough for merge. ACK.
> >
> > Heh, this thing was vetoed by Linus. I use it locally, because it fixes the
> > problem for me, but it's more of a workaround than a fix. BTW, its not
> > needed with the next one.
>
> Ok, so lets use the next one.
OK
> > > hack-serial-suspend.patch ... it is really a hack, but we want serial
> > > console to work. rmk needs to sign this off, but it looks okay. ACK.
> >
> > I'm a bit reluctant about this one. It may result in a garbage being sent
> > over the serial line after the resume (it's happended to me once in a couple
> > of months, but still).
>
> Garbage once-a-month is better than garbage-always, I'd say.
>
]--snip--[
> > > print-offset-for-swap-files.patch ... this actually changes userland
> > > API. Not sure if that is acceptable; lots of discussion is needed. We
> > > should probably drop /proc/swaps and just create something in sysfs.
> >
> > In sysfs we'd have to create a whole hierarchy of files to provide all of
> > the information contained in /proc/swaps. And there would be a problem
> > with file names. ;-)
> >
> > The procfs modification is not really needed, I added it for completness.
> > The message from sys_swapon() should be enough. Or perhaps I'll
> > just add a separate message in sys_swapon() containing the "real" block
> > device name _and_ the offset for the newly activated swap.
>
> Okay, lets just mark it clearly in changelog, perhaps changing
> /proc/swaps is okay, perhaps not.
I think I'll put the modification of /proc/swaps into a separate patch, so
that it will be easy to drop if it's rejected.
> > > Oh, new command line options need Documenting.
> >
> > Sure (the patch is experimental :-) ).
>
> Ok.
>
> > > > In short, the idea is that a swap file can be identified by the name of
> > > > the
> > > > block device which holds it and the offset from the beginning of the
> > > > device.
> > >
> > > Are you sure swap files are always contiguous on the disk? I'm pretty
> > > sure that is not the case.
> >
> > You're right, but it doesn't matter. :-)
>
> So... being lazy Pavel I am, could you explain how we find which
> blocks belong to swap file? (Or do you use linklist of blocks for page
> directories?)
Basically, in the same way we find the blocks that we have allocated from a
swap partition: we call get_swap_page_of_type() to allocate a swap page
(it returns the offset of the page _within_ the file/partition) and then we
call swapdev_block() (this only is a wrapper around map_swap_page()) to get
the "physical" offset (ie. wrt the beginning of the block device holding the
swap area). IOW, the swap-handling code does the job for us. :-)
> Related question is -- how will we handle *huge* filesystems? Like >
> 32bit?
The offsets are in (PAGE_SIZE) units. ;-)
Seriously, we can pass a sector_t to the kernel and that is 64-bit.
Rafael
--
You never change things by fighting the existing reality.
R. Buckminster Fuller
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Suspend-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel