From: Chase Venters <chase.venters@clientec.com>
To: "Abu M. Muttalib" <abum@aftek.com>
Cc: Robert Hancock <hancockr@shaw.ca>,
kernelnewbies@nl.linux.org, linux-newbie@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm <linux-mm@kvack.org>
Subject: Re: Commenting out out_of_memory() function in __alloc_pages()
Date: Sun, 9 Jul 2006 00:18:22 -0500 [thread overview]
Message-ID: <200607090018.45972.chase.venters@clientec.com> (raw)
In-Reply-To: <BKEKJNIHLJDCFGDBOHGMCEEGDCAA.abum@aftek.com>
On Saturday 08 July 2006 23:23, Abu M. Muttalib wrote:
> Hi,
>
> I tried with the /proc/sys/vm/overcommit_memory=2 and the system refused to
> load the program altogether.
>
> In this scenario is making overcommit_memory=2 a good idea?
(Good mailing list practices ask you not to top-post - that is, make your
reply text follow the text you are replying other than appearing before it,
as I demonstrate here:)
Well, how much memory do you have? Does the application actually need more
memory than your system can provide? If this is the case, there isn't going
to be any fix except add more memory. Your choices are:
1. Let the OOM killer sacrifice processes because you don't have enough memory
2. Disable VM overcommit so that the OOM killer doesn't get engaged (rather,
the application's attempt to grab the memory will fail)
3. Add more memory, don't mess with the overcommit sysctl, and watch things
work nicely :P
Are you sure it's not a memory leak? Does the application work on a freshly
booted system?
> Regards,
> Abu.
Thanks,
Chase
> -----Original Message-----
> From: Robert Hancock [mailto:hancockr@shaw.ca]
> Sent: Saturday, July 08, 2006 11:36 PM
> To: Abu M. Muttalib
> Cc: kernelnewbies@nl.linux.org; linux-newbie@vger.kernel.org;
> linux-kernel@vger.kernel.org; linux-mm
> Subject: Re: Commenting out out_of_memory() function in __alloc_pages()
>
> Abu M. Muttalib wrote:
> > Hi,
> >
> > I am getting the Out of memory.
> >
> > To circumvent the problem, I have commented the call to "out_of_memory(),
> > and replaced "goto restart" with "goto nopage".
> >
> > At "nopage:" lable I have added a call to "schedule()" and then "return
> > NULL" after "schedule()".
>
> Bad idea - in the configuration you have, the system may need the
> out-of-memory killer to free up memory, otherwise the system can
> deadlock due to all memory being exhausted.
>
> > I tried the modified kernel with a test application, the test application
>
> is
>
> > mallocing memory in a loop. Unlike as expected the process gets killed.
> > On second run of the same application I am getting the page allocation
>
> failure
>
> > as expected but subsequently the system hangs.
> >
> > I am attaching the test application and the log herewith.
> >
> > I am getting this exception with kernel 2.6.13. With kernel
> > 2.4.19-rmka7-pxa1 there was no problem.
> >
> > Why its so? What can I do to alleviate the OOM problem?
>
> Please see Documentation/vm/overcommit-accounting in the kernel source
> tree.
>
> --
> Robert Hancock Saskatoon, SK, Canada
> To email, remove "nospam" from hancockr@nospamshaw.ca
> Home Page: http://www.roberthancock.com/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-07-09 5:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.AmXizdwfdZtqgKFSMcRp3U0QZXI@ifi.uio.no>
2006-07-08 18:06 ` Robert Hancock
2006-07-09 4:23 ` Abu M. Muttalib
2006-07-09 5:18 ` Chase Venters [this message]
2006-07-09 6:11 ` Abu M. Muttalib
2006-07-09 7:55 ` Chase Venters
2006-07-09 11:55 ` Alan Cox
2006-07-09 11:48 ` Abu M. Muttalib
2006-07-09 12:01 ` Willy Tarreau
2006-07-09 12:13 ` Abu M. Muttalib
2006-07-09 12:15 ` Willy Tarreau
2006-07-09 13:12 ` Abu M. Muttalib
2006-07-09 13:23 ` Willy Tarreau
2006-07-09 12:09 ` Alan Cox
2006-07-09 12:03 ` Abu M. Muttalib
2006-07-09 12:03 ` Nick Piggin
2006-07-09 14:34 ` Abu M. Muttalib
2006-07-09 15:15 ` Nick Piggin
2006-07-07 9:46 Abu M. Muttalib
2006-07-07 9:54 ` Robin Holt
2006-07-11 14:57 ` Abu M. Muttalib
2006-07-11 15:08 ` Abu M. Muttalib
2006-07-11 15:19 ` Abu M. Muttalib
2006-07-13 5:12 ` Mouhammad Tayseer Alquoatli
2006-07-11 15:35 ` Chase Venters
2006-07-24 9:44 ` Abu M. Muttalib
2006-07-07 21:21 ` Chase Venters
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=200607090018.45972.chase.venters@clientec.com \
--to=chase.venters@clientec.com \
--cc=abum@aftek.com \
--cc=hancockr@shaw.ca \
--cc=kernelnewbies@nl.linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-newbie@vger.kernel.org \
/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