From: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] regmap: Expose total memory consumption in the rbtree debugfs entry
Date: Tue, 12 Mar 2013 20:08:17 +0000 [thread overview]
Message-ID: <20130312200817.GA32039@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20130312181246.GA19942@opensource.wolfsonmicro.com>
On Tue, Mar 12, 2013 at 06:12:47PM +0000, Mark Brown wrote:
> On Tue, Mar 12, 2013 at 05:26:49PM +0000, Dimitris Papastamos wrote:
>
> > + mem_size = sizeof(*rbtree_ctx);
> > +
> > for (node = rb_first(&rbtree_ctx->root); node != NULL;
> > node = rb_next(node)) {
> > n = container_of(node, struct regcache_rbtree_node, node);
> > + mem_size += sizeof(*n);
> > + mem_size += (n->blklen * map->cache_word_size);
>
> This appears to ignore the size of the node structure and only have the
> root context and the data.
I've got mem_size += sizeof(*n) which is the size of the rbnode. That
contains the underlying rbtree node links.
Thanks,
Dimitris
next prev parent reply other threads:[~2013-03-12 20:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-12 17:26 [PATCH v2] regmap: Expose total memory consumption in the rbtree debugfs entry Dimitris Papastamos
2013-03-12 18:12 ` Mark Brown
2013-03-12 20:08 ` Dimitris Papastamos [this message]
2013-03-13 11:13 ` Mark Brown
2013-03-13 11:54 ` Dimitris Papastamos
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=20130312200817.GA32039@opensource.wolfsonmicro.com \
--to=dp@opensource.wolfsonmicro.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
/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