From: James Bottomley <James.Bottomley@SteelEye.com>
To: Tejun Heo <htejun@gmail.com>
Cc: gregkh@suse.de, hugh@veritas.com, cornelia.huck@de.ibm.com,
dmitry.torokhov@gmail.com, oneukum@suse.de, maneesh@in.ibm.com,
rpurdie@rpsys.net, Jeff Garzik <jgarzik@pobox.com>,
lkml <linux-kernel@vger.kernel.org>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [RFD driver-core] Lifetime problems of the current driver model
Date: Fri, 30 Mar 2007 13:19:34 -0500 [thread overview]
Message-ID: <1175278774.3760.44.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <460D12B8.6050101@gmail.com>
On Fri, 2007-03-30 at 22:38 +0900, Tejun Heo wrote:
> My plan was to make sysfs more independent from struct device/kobject.
> e.g. Something like the following.
That's sort of what I was reaching for too ... it just looks to me that
all the sysfs glue is in kobject, so they make a good candidate for the
pure sysfs objects. Whatever we do, there has to be breakable cross
linking between the driver's tree and the sysfs representation ... of
course, nasty things like ksets get in the way of considering the
objects as separate, sigh.
> * kobject_get() on attr/symlink creation
> * open() doesn't need extra kobject reference
> * deleting a node makes it release the kobject reference and the kobject
> pointer is nullified.
To do this, you'll have to move at least the dentry out of the kobject,
I think.
> This way the sysfs reference counting can be put completely out of
> picture without impacting the rest of code. Handling symlink and
> suicidal attributes might need some extra attention but I think they can
> be done.
True ... but you'll also have to implement something within sysfs to do
refcounting ... it needs to know how long to keep its nodes around.
> In the long term, I think sysfs should be independent from driver model
> and kobject such that an entity which wants to use sysfs but is not a
> device doesn't have to dance with kobject just to use sysfs.
I agree ... the question is just how to do it.
I'd favour trying to separate kobject and struct device for this ...
move all the sysfs stuff into kobject and device only stuff into struct
device ... but that would get us into disentangling the ksets, which, on
balance, isn't going to be fun ...
James
next prev parent reply other threads:[~2007-03-30 18:20 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-30 9:43 Tejun Heo
2007-03-30 12:29 ` James Bottomley
2007-03-30 13:15 ` Dmitry Torokhov
2007-03-30 17:58 ` James Bottomley
2007-03-30 18:18 ` Dmitry Torokhov
2007-03-30 13:38 ` Tejun Heo
2007-03-30 17:41 ` Greg KH
2007-03-30 18:19 ` James Bottomley [this message]
2007-04-01 19:59 ` Tejun Heo
2007-04-02 9:20 ` Cornelia Huck
2007-04-02 15:34 ` Cornelia Huck
2007-04-03 3:08 ` Tejun Heo
2007-04-02 9:33 ` Greg KH
2007-04-02 12:10 ` Maneesh Soni
2007-04-02 19:33 ` Luben Tuikov
2007-03-30 13:19 ` Cornelia Huck
2007-03-30 13:19 ` Tejun Heo
2007-03-30 13:40 ` Cornelia Huck
2007-03-30 13:58 ` Tejun Heo
2007-03-30 14:52 ` Cornelia Huck
2007-03-30 15:08 ` Tejun Heo
2007-03-30 19:31 ` Cornelia Huck
2007-03-31 3:12 ` Tejun Heo
2007-03-31 3:15 ` Tejun Heo
2007-03-31 16:08 ` Cornelia Huck
2007-03-31 16:14 ` Tejun Heo
2007-04-02 19:24 ` Luben Tuikov
2007-03-30 17:38 ` Greg KH
2007-04-07 15:48 Alan Stern
2007-04-08 2:55 ` Tejun Heo
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=1175278774.3760.44.camel@mulgrave.il.steeleye.com \
--to=james.bottomley@steeleye.com \
--cc=cornelia.huck@de.ibm.com \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@suse.de \
--cc=htejun@gmail.com \
--cc=hugh@veritas.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=maneesh@in.ibm.com \
--cc=oneukum@suse.de \
--cc=rpurdie@rpsys.net \
/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®