mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Sriram Narasimhan" <nsri@tataelxsi.co.in>
To: linux-kernel@vger.kernel.org
Subject: GFP_KERNEL doubt!! <was Tasklet doubt!>
Date: Sat, 12 Apr 2003 01:52:44 +0530	[thread overview]
Message-ID: <3E972414.9090607@tataelxsi.co.in> (raw)

  Hello,

The problem of allocating more than 2.5 MB was actually more or less 
related to the physical memory left in the kernel.
But I moved the task which allocated the memory from the tasklet to the 
keventd and used kmalloc (GFP_KERNEL).

The first time I ran my module, it failed at the same 2.5 MB limit.
I restarted the system and tried it again, and I was able to allocate 5 
MB successfully.
I restarted the system and ran "free".
The report is as follows:
             total       used       free     shared    buffers     cached
Mem:         62264      30624      31640          0       8072      16096
-/+ buffers/cache:       6456      55808
Swap:       192772          0     192772

Then I ran gcc and compiled my code and then for the "free" report again.
The report is as follows:
             total       used       free     shared    buffers     cached
Mem:         62264      45320      16944          0       9256      28384
-/+ buffers/cache:       7680      54584
Swap:       192772          0     192772

I was able to notice that the physical memory had gone down though "gcc" 
had completed.
The time I ran my application, I had about 2.5M physical memory left, so 
I was able to allocate 2.5M.

What is happening ? What is the buffers/cache column and is there any 
way I could force the kernel to release the cached memory back to free 
physical ?
Is there any way I can allocate more than what is left free from the 
physical memory ?

Any pointers or suggestions would be very helpful.

Thank you.
Regards,
Sriram


                 reply	other threads:[~2003-04-11 20:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3E972414.9090607@tataelxsi.co.in \
    --to=nsri@tataelxsi.co.in \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®