mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Schwartz" <davids@webmaster.com>
To: "linux-kernel" <linux-kernel@vger.kernel.org>
Subject: RE: Excessive printks increase top mem usage?
Date: Thu, 25 Jan 2007 17:03:56 -0800	[thread overview]
Message-ID: <MDEHLPKNGKAHNMBLJOLKKEFLBCAC.davids@webmaster.com> (raw)
In-Reply-To: <b681c62b0701250523w14f0d0efl78b1ab3be7693c31@mail.gmail.com>


> On 1/25/07, yogeshwar sonawane <yogyas@gmail.com> wrote:
> > Hi all,
> > I am running a user application which will just open/close my driver
> > (simple one, empty functions with only printks) infinitely.
> > A massive use of printk can slow down the system noticeably OR it can
> > affect some time calculations.
> > Apart from this, it was increasing top mem usage also. After closing
> > the application, the memory consumption was not coming down(not
> > freeing mem). Is this the expected behaviour? OR i am missing
> > something?
> >
> > Can anybody help me in guiding the reason for this? Any help/links plz.
> >
> > Thanks in advance,
> > Yogeshwar

What does "increased top mem usage" mean? You have given no reason to
suggest that there's anything unusual about this.

Here's one theory: Some program is writing these kernel messages to a file.
Because some other process might come and read that file later, the kernel
keeps copies of the file data in memory.

The kernel sees no advantage in having memory free. Free memory is memory
that's not doing any good. Better to keep data in memory that might be
useful later. We can always free the memory later if (and only if) we have
something better to do with it.

DS



  reply	other threads:[~2007-01-26  1:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25 13:23 yogeshwar sonawane
2007-01-26  1:03 ` David Schwartz [this message]
     [not found]   ` <b681c62b0702030411x2a61f453t4e2997ce866417e6@mail.gmail.com>
2007-02-04 11:10     ` yogeshwar sonawane

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=MDEHLPKNGKAHNMBLJOLKKEFLBCAC.davids@webmaster.com \
    --to=davids@webmaster.com \
    --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®