mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: hugang@soulinfo.com
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [hugang@soulinfo.com: [PATH]software suspend for ppc.]
Date: Fri, 7 Jan 2005 09:40:23 +0800	[thread overview]
Message-ID: <20050107014023.GA29740@hugang.soulinfo.com> (raw)
In-Reply-To: <20050106223132.GD25913@elf.ucw.cz>

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

On Thu, Jan 06, 2005 at 11:31:32PM +0100, Pavel Machek wrote:
> Hi!
> 
> > adding a option to freeze/thaw_processes, first freeze all user
> > processess, from now only kernel processess running, Now we can shrink
> > more memory than current version, after that freeze all processes.
> > that's mean if your swap space enough, swsusp will not fail. 
> 
> Thanks for the port... ...what is the test case this fixes?
> 
> Patch is pretty pretty simple, that's good...

# free
....
Mem:        256368     198148
...
Swap:       524280     140108

# ./eatmem 256

now do swsusp, the current swsusp will fail, with the patch it works.


-- 
Hu Gang       .-.
              /v\
             // \\ 
Linux User  /(   )\  [204016]
GPG Key ID   ^^-^^   http://soulinfo.com/~hugang/hugang.asc

[-- Attachment #2: eatmem.c --]
[-- Type: text/x-csrc, Size: 376 bytes --]

#include <stdio.h>

static int
do_malloc(int size)
{
	char *p;
	int i;

	for (i = 0; i < size; i++) {
		p = malloc(1024 * 1024);
		if (p == NULL) return -1;
		memset(p, 1, 1024 * 1024);
		printf("%2d\r", i);
		fflush(stdout);
	}
	return (0);
}

int 
main(int argc, char *argv[])
{
	int size = 200;

	if (argc == 2) {
		size = atoi(argv[1]);
	}

	do_malloc(size);

	pause();
}

  parent reply	other threads:[~2005-01-07  1:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-03 12:26 hugang
2005-01-03 22:17 ` Pavel Machek
2005-01-06 16:03   ` hugang
2005-01-06 22:31     ` Pavel Machek
2005-01-06 22:52       ` Nigel Cunningham
2005-01-07  1:40       ` hugang [this message]
2005-01-07  9:53         ` Pavel Machek
     [not found]           ` <20050107131231.GA5345@hugang.soulinfo.com>
2005-01-07 13:25             ` Pavel Machek
2005-01-04  2:34 ` Nigel Cunningham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050107014023.GA29740@hugang.soulinfo.com \
    --to=hugang@soulinfo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome