[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d120d5000703121331s73fa5462p5da58ba391ea7101@mail.gmail.com>
Date: Mon, 12 Mar 2007 16:31:17 -0400
From: "Dmitry Torokhov" <dmitry.torokhov@...il.com>
To: "Alan Stern" <stern@...land.harvard.edu>
Cc: "Oliver Neukum" <oneukum@...e.de>,
"Maneesh Soni" <maneesh@...ibm.com>, gregkh@...e.de,
linux-kernel@...r.kernel.org
Subject: Re: refcounting drivers' data structures used in sysfs buffers
On 3/12/07, Alan Stern <stern@...land.harvard.edu> wrote:
> On Mon, 12 Mar 2007, Oliver Neukum wrote:
>
> > > > I don't like reverting my own code. But I predict he'll tell you that a
> > > > driver's bond with a device should be represented in a data structure
> > > > that is to be refcounted.
> > >
> > > :-)
> >
> > Coming to think about it, he might be right there.
>
> There still would be a synchronization problem. Refcounts don't solve
> races; they only solve lifetime problems. And you would still have to
> change the sysfs API, plus all the other stuff...
>
> Do you think Linus would listen if all three of us (plus maybe Greg) tried
> to convince him?
>
If we'd accompany the argument with the patch that changes scsi to use
wq to perform deletion so we don't have deadlock regression in the
kernel he might be more perceptive... He is right about lifetime
issues but this is not strictly lifetime issue as you correctly point
out. Plus, refcounting also bloats the kernel so I don't relly want to
use refcount for every integer I happen to export through sysfs if I
can simply "revoke" access.
--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists