public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] kmalloc() vs. kmem_cache_alloc() for global TT?
Date: Sat, 14 May 2016 16:51:29 +0200	[thread overview]
Message-ID: <20160514145129.GD4375@otheros> (raw)

Hi,

Is anyone familiar with the implications of using kmalloc() vs.
kmem_cache_alloc()? Not just allocation speed, but also RAM
fragmentation is something I'm currently wondering about.

We have had issues with the large, bulk allocations from the
debugfs tables before, where if I remember correctly the
experssion "RAM fragmentation" has been mentioned before. With the
fallback from kmalloc() to vmalloc() in the debugfs internals on
more recent kernels, at least that problem has gone for now.

Still, I'm wondering whether a couple of thousand global TT entry
allocations (Freifunk Hamburg currently has more than three
thousand) could lead to a badly fragmented RAM. Too much for a
cute wifi router with just 32MB of RAM, maybe.


I then noticed that the bridge is using kmem_cache_alloc() instead
of kmalloc() for its fdb (forwarding database). Would it make
sense to do the same for global TT entries (and maybe originator
structs, too?)?

If so, I'd be happy to look into providing a patch.

Regards, Linus

PS: Why this thought came up:
https://github.com/freifunk-gluon/gluon/issues/753
Could be a memory leak or something else too though. Investigation
still in progress.

             reply	other threads:[~2016-05-14 14:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-14 14:51 Linus Lüssing [this message]
2016-05-14 14:54 ` [B.A.T.M.A.N.] kmalloc() vs. kmem_cache_alloc() for global TT? Linus Lüssing
2016-05-15 11:27 ` Sven Eckelmann
2016-05-15 12:06   ` Linus Lüssing
2016-05-15 12:15     ` Sven Eckelmann
2016-05-15 12:17       ` Sven Eckelmann
2016-05-15 12:37       ` Linus Lüssing
2016-05-15 12:53         ` Sven Eckelmann
2016-05-15 12:41     ` Linus Lüssing
2016-05-15 20:50       ` Sven Eckelmann
2016-05-15 21:26         ` Linus Lüssing
2016-05-15 22:06           ` Sven Eckelmann
2016-05-24  0:14 ` Linus Lüssing

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=20160514145129.GD4375@otheros \
    --to=linus.luessing@c0d3.blue \
    --cc=b.a.t.m.a.n@lists.open-mesh.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