From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devicetree-discuss <devicetree-discuss@lists.ozlabs.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Rob Herring <rob.herring@calxeda.com>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH V2 2/2] of: remove /proc/device-tree
Date: Fri, 22 Mar 2013 20:29:18 +0100 [thread overview]
Message-ID: <1363980558.11644.8.camel@pasglop> (raw)
In-Reply-To: <514C9CF1.7060505@linux.vnet.ibm.com>
On Fri, 2013-03-22 at 13:03 -0500, Nathan Fontenot wrote:
> We don't ever free old property values, mainly I assume since we don't keep
> reference counts and can't know when it is safe to do so. The problem I
> am starting to see on pseries is that we are getting very large properties.
> One of the biggest culprits is the property on pseries systems to describe
> the memory on the system in the device tree. These are big and getting
> bigger as memory increases, additionally this property is update every
> time memory is DLPAR added or removed from the system which can lead to
> leaving a bunch of memory that should be free'ed.
>
> Given that, is there (or has there been) any discussion on adding reference
> counts to properties in the device tree? With the myriad ways to get at
> the value of a property this may not be feasible but I would like to hear
> any thoughts from the community.
My assumption was always that the lifetime of property values is tied
the the lifetime of the node they are in. IE, we wouldn't free a
property removed from a node but we could free all properties when
the node goes away...
Not the best but would do...
refcount of properties, well ... Grant, do we get kobjects for them with
the sysfs stuff ? That could do the trick...
Ben.
next prev parent reply other threads:[~2013-03-22 19:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 11:24 Kobjectify device tree structures Grant Likely
[not found] ` < 1363865097-32764-3-git-send-email-grant.likely@secretlab.ca>
[not found] ` <1363870366. 3312.1.camel@pasglop>
[not found] ` <CACxGe6vSywW_iekAKmDMf5_TLLt5Hn+Jttq8kddq3vJ=AE+DQA@ mail.gmail.com>
2013-03-21 11:24 ` [PATCH V2 1/2] of: Make device nodes kobjects so they show up in sysfs Grant Likely
2013-03-21 12:49 ` Benjamin Herrenschmidt
2013-03-21 20:31 ` Grant Likely
2013-03-21 11:24 ` [PATCH V2 2/2] of: remove /proc/device-tree Grant Likely
2013-03-21 12:52 ` Benjamin Herrenschmidt
2013-03-21 20:07 ` Grant Likely
2013-03-22 10:28 ` Grant Likely
2013-03-22 18:03 ` Nathan Fontenot
2013-03-22 19:29 ` Benjamin Herrenschmidt [this message]
2013-03-22 23:44 ` Grant Likely
2013-11-15 16:10 ` Grant Likely
2013-03-21 12:39 ` Kobjectify device tree structures Benjamin Herrenschmidt
2013-03-21 12:41 ` Grant Likely
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=1363980558.11644.8.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nfont@linux.vnet.ibm.com \
--cc=rob.herring@calxeda.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;
as well as URLs for NNTP newsgroup(s).