All of lore.kernel.org
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Problem with OOM killer killing process even when there is plenty of RAM.
Date: Wed, 7 Dec 2011 12:11:08 -0800	[thread overview]
Message-ID: <20111207201108.GA5160@kroah.com> (raw)
In-Reply-To: <2405529.8n9ZcyQNOo@terranet>

On Thu, Dec 08, 2011 at 01:26:42AM +0530, mindentropy wrote:
> On Wednesday 07 Dec 2011 11:35:36 AM Greg KH wrote:
> > On Thu, Dec 08, 2011 at 12:36:43AM +0530, mindentropy wrote:
> > > On Thursday 08 Dec 2011 1:38:19 AM Mulyadi Santosa wrote:
> > > > On Wed, Dec 7, 2011 at 01:47, mindentropy <mindentropy@gmail.com> wrote:
> > > > > Hi,
> > > > > 
> > > > >  I am trying to allocate 512MB of RAM in my driver loaded as a
> > > > >  module,> > > 
> > > > > but the OOM killer starts killing all my processes. This machine
> > > > > has
> > > > > around 24GB RAM and is a 8 core Xeon. The RAM is allocated in
> > > > > page size chunks (i.e. 131072 chunks each of size PAGE_SIZE).
> > > > 
> > > > mind to tell us, how do you allocate memory? kmalloc?
> > > 
> > > Via kmalloc.
> > 
> > Please use the functions written to give you large memory chunks.  As
> > you are using a video-for-linux device, why not use the apis that this
> > framework provides you for this type of thing?
> > 
> 
> Yes V4L would be done next. There are some things being tried out, this being 
> a custom FPGA hence some controls being experimented.
> 
> As for the allocating in PAGE_SIZE chunks why am I running out of memory? 

The kernel doesn't like allocating such large sizes all at once.

> Can't it steal smaller chunks from the larger chunks? Just curious about the 
> reason.

Use vmalloc if you need/want larger chunks, kmalloc is not for that at
all.

greg k-h

  reply	other threads:[~2011-12-07 20:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-06 18:47 Problem with OOM killer killing process even when there is plenty of RAM mindentropy
2011-12-07  5:37 ` Rajat Sharma
2011-12-07 19:13   ` mindentropy
2011-12-07 18:38 ` Mulyadi Santosa
2011-12-07 19:06   ` mindentropy
2011-12-07 19:35     ` Greg KH
2011-12-07 19:56       ` mindentropy
2011-12-07 20:11         ` Greg KH [this message]
2011-12-08  6:50           ` Rajat Sharma
2011-12-08 16:17     ` Mulyadi Santosa
2011-12-09 11:45       ` Pritam Bankar

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=20111207201108.GA5160@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.