Re: [RFC/RFT][PATCH -mm] swsusp: improve memory shrinking



On Po 27-02-06 00:38:40, Rafael J. Wysocki wrote:
On Monday 27 February 2006 00:32, Rafael J. Wysocki wrote:
On Sunday 26 February 2006 19:53, Pavel Machek wrote:
I did try shrink_all_memory() five times, with .5 second delay between
them, and it freed more memory at later tries.

I wonder if the delays are essential or if so, whether they may be shorter
than .5 sec.

I was using this with some success... (Warning, against old
kernel). But, as I said, I consider it ugly, and it would be better to
fix shrink_all_memory.

Appended is a patch against the current -mm.
[It also makes
swsusp_shrink_memory() behave as documented for image_size = 0.
Currently, if it states there's enough free RAM to suspend, it won't bother
to free a single page.]

Could we get bugfix part separately?

Sure. Appended is the bugfix (I haven't tested it separately yet, but I think
it's simple enough) ...

... and this is the workaround of the "shrink_all_memory() returns 0 prematurely"
problem (not tested separately yet). [Together these patches make my box
actually free more memory when image_size = 0.]

He he, move the workaround into mm/vmscan.c to get Andrew's attetion
then attempt to push it :-))). That way

1) shrink_all_memory() will get fixed for all callers

2) you'll probably force akpm to fix it the right way :-).

Pavel

--
Feeling evil tonight.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [RFC/RFT][PATCH -mm] swsusp: improve memory shrinking
    ... and it freed more memory at later tries. ... I wonder if the delays are essential or if so, ... Appended is the bugfix (I haven't tested it separately yet, ... you'll probably force akpm to fix it the right way :-). ...
    (Linux-Kernel)
  • [ANNOUNCE] Linux-2.4.32-hf32.5
    ... Fix memory corruption caused by snmp_trap_decode which may free ... to 2.4.32 kernels use neither of these timers. ... on 2.4 update the inode ctime on rename. ...
    (Linux-Kernel)
  • Re: [RFC][mmotm] Documentation update
    ... Memory Resource ControllerImplementation Memo. ... will fix. ... charge against oldpage or newpage will be committed. ... Page Migration ...
    (Linux-Kernel)
  • Re: XP Setup hangs with dual PIII-550 on Asus P2B-DS v1.04
    ... I have one IDE 80Gb drive attached to Primary IDE and one CD-ROM on the secondary IDE. ... It might be a memory issue, but in the one CPU config the installation always works without a hitch, which leads me to believe the memory issue if it exists is not the main problem. ... Do you happen to know if moving the R79 to R80 is the correct fix for ACPI and what it actually does? ... about 2-3 minutes with only a reset helping.. ...
    (alt.comp.periphs.mainboard.asus)
  • Re: USB transfer_buffer allocations on 64bit systems
    ... memory that is suitable for DMA. ... That is not a good fix. ... a clear note about how to allocate buffers for USB drivers. ...
    (Linux-Kernel)