From: Artem Bityutskiy <dedekind@infradead.org>
To: Alexey Korolev <akorolev@infradead.org>
Cc: dwmw2@infradead.org, linux-mtd@lists.infradead.org
Subject: Re: [PATCH][nandsim]Fix RAM wasting via kmalloc (take 2)
Date: Thu, 13 Nov 2008 15:06:02 +0200 [thread overview]
Message-ID: <1226581562.16925.44.camel@sauron> (raw)
In-Reply-To: <alpine.LFD.1.10.0810291313140.30280@casper.infradead.org>
On Wed, 2008-10-29 at 13:14 +0000, Alexey Korolev wrote:
> Hi All,
>
> Nandsim consumes ~2x more RAM than the density of simulated device.
> It becomes critical if we need to simulate 256MB NAND and run stress tests
> on it.
>
> We investigated the reasons. nandsim allocates space for pages using kmalloc
> function. The size of LP nand page is 2112 bytes.
> kmalloc gets space from slab pools by chunks 2^n. So if we need to kmalloc
> 2112 bytes, 4096 bytes will be consumed by system.
> The best way to avoid this issue would be using kmem_cache allocations. AFAIK
> this mechanism specially designed to handle cases when arrays of allocations
> are used.
Would you please send a version which checks return pointer of
kmem_cache_alloc() for NULL?
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
next prev parent reply other threads:[~2008-11-13 13:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 13:14 [PATCH][nandsim]Fix RAM wasting via kmalloc (take 2) Alexey Korolev
2008-11-01 9:35 ` Artem Bityutskiy
2008-11-13 13:06 ` Artem Bityutskiy [this message]
2008-11-13 13:21 ` Alexey Korolev
2008-11-13 13:48 ` Alexey Korolev
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=1226581562.16925.44.camel@sauron \
--to=dedekind@infradead.org \
--cc=akorolev@infradead.org \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.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