From: Rik van Riel <riel@conectiva.com.br>
To: Pavel Machek <pavel@ucw.cz>
Cc: kernel list <linux-kernel@vger.kernel.org>
Subject: Re: Good way to free as much memory as possible under 2.5.34?
Date: Fri, 13 Sep 2002 18:09:55 -0300 (BRT) [thread overview]
Message-ID: <Pine.LNX.4.44L.0209131808240.1857-100000@imladris.surriel.com> (raw)
In-Reply-To: <20020913210042.GA25464@elf.ucw.cz>
On Fri, 13 Sep 2002, Pavel Machek wrote:
> /*
> * Try to free as much memory as possible, but do not OOM-kill anyone
> *
> * Notice: all userland should be stopped at this point, or livelock
> is possible.
> */
>
> This worked before -rmap came in, but it does not free anything
> now. What needs to be done to fix it?
Actually, it still worked when -rmap came in, but it stopped working
when the LRU lists were made to be per-zone...
> static void free_some_memory(void)
> {
> printk("Freeing memory: ");
> while
> (try_to_free_pages(&contig_page_data.node_zones[ZONE_HIGHMEM], GFP_KSWAPD, 0))
> printk(".");
> printk("|\n");
> }
Why don't you just allocate memory ?
To prevent the OOM kill you can just check for a variable
in the OOM slow path. No need to rely on any particular
behaviour of the VM.
regards,
Rik
--
Bravely reimplemented by the knights who say "NIH".
http://www.surriel.com/ http://distro.conectiva.com/
Spamtraps of the month: september@surriel.com trac@trac.org
next prev parent reply other threads:[~2002-09-13 21:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-13 21:00 Good way to free as much memory as possible under 2.5.34? Pavel Machek
2002-09-13 21:09 ` Rik van Riel [this message]
2002-09-13 21:29 ` Pavel Machek
2002-09-13 21:33 ` Rik van Riel
2002-09-13 21:48 ` Xavier Bestel
2002-09-13 22:42 ` Rik van Riel
2002-09-13 23:26 ` Xavier Bestel
2002-09-13 21:53 ` Andrew Morton
2002-09-13 22:10 ` William Lee Irwin III
2002-09-14 10:05 ` Pavel Machek
2002-09-14 13:57 ` Andrew Morton
2002-09-14 14:51 ` Hans-Peter Jansen
2002-09-14 15:07 ` Rik van Riel
2002-09-14 15:11 ` Pavel Machek
2002-09-13 21:30 ` Andrew Morton
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=Pine.LNX.4.44L.0209131808240.1857-100000@imladris.surriel.com \
--to=riel@conectiva.com.br \
--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;
as well as URLs for NNTP newsgroup(s).