lkml.org 
[lkml]   [2003]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 1/6] sysfs-kobject.patch
On Mon, Oct 06, 2003 at 11:11:08PM +0530, Dipankar Sarma wrote:
> On Mon, Oct 06, 2003 at 09:16:40AM -0700, Greg KH wrote:
> > On Mon, Oct 06, 2003 at 02:30:03PM +0530, Maneesh Soni wrote:
> > > diff -puN include/linux/kobject.h~sysfs-kobject include/linux/kobject.h
> > > --- linux-2.6.0-test6/include/linux/kobject.h~sysfs-kobject 2003-10-06 11:48:37.000000000 +0530
> > > +++ linux-2.6.0-test6-maneesh/include/linux/kobject.h 2003-10-06 11:48:51.000000000 +0530
> > > @@ -32,6 +32,12 @@ struct kobject {
> > > struct kset * kset;
> > > struct kobj_type * ktype;
> > > struct dentry * dentry;
> > > + struct list_head k_sibling;
> > > + struct list_head k_children;
> > > + struct list_head attr;
> > > + struct list_head attr_group;
> > > + struct rw_semaphore k_rwsem;
> > > + char *k_symlink;
> > > };
> >
> > Ouch. Like Al said, this is too bloated. Remember, not all kobjects
>
> That is not what LowFree numbers after mounting sysfs says. Sure
> you add some 48 bytes to kobject, but you are no longer pinning
> 256-byte(??) dentries and possibly bigger inodes for kobjects.
> Doesn't that count ?

For kobjects that are not ever registered with sysfs? Those kobjects
never create dentries, so yes, this is unneeded. For an example of this
kind of usage, see the drivers/usb/serial/usb-serial.c file. I know the
scsi people are also looking into using kobjects in this manner for some
of their internal structures.

I would also like to use kobjects this way for all USB urbs, but they
are too heavy in their existing footprint for this to work out. And by
adding this extra overhead, there's no way I could advocate using
kobjects for them in the future :(

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.075 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site