On Mon, Aug 07, 2006 at 05:18:37PM -0400, Shailabh Nagar wrote: > ...so could we work out how & if configfs' 4K limit on attributes > can be removed ?
The 4K limit is one of memory. It's straight from the sysfs code. A page is allocated and pinned while the attribute file is opened. I don't think we should be arbitrarily allocating large amounts of RAM here. Actually, that buffer is perhaps large. Maybe it should be only 1K for simple attributes, though grabbing a page is easy. So, large things demand a lot of memory, or a lot of thought. Let's consider something similar to seq_file, but controlled by sysfs. That is, you create a configfs_large_attribute structure, in which you specify your seq_show, seq_start, seq_next function pointers. Configfs, when asked for this object, will do the seq_open() for you, and will create the file_operations for you. Basically, you have the functionality of seq_file, but configfs is controlling the inode/dentry lifetimes. Now, reading from this object is pretty simple. But what about writing to it? How big can a single write be -- there is no seq_write_file yet? Should we allocate that same page buffer if opened O_WRITE? Try and come up with a seq_write_file? Also, what does a write do? Append to the file, or replace it? Almost attributes do a replace, which is a fair thing to do (open()+write() expects to be starting at 0 unless O_APPEND is specified). But ckrm looks to want append semantics. If this is genericized, how does one truncate if "append" is the default? If the write replaces the existing data, we'd really need a seq_write_file, so that multiple values can be written across multiple write calls. These are the sorts of things I'm pondering over this. > Could you elaborate the uncontrolled set of lifetime semantics part ? No generic files in configfs. Nothing that isn't created by the configfs infrastructure. The dirents and inodes are completely controlled by configfs, and the client module just defines what is needed. There will be no kernel-side "sysfs_create(parent, inode)" type thing. Joel -- Life's Little Instruction Book #157 "Take time to smell the roses." Joel Becker Principal Software Developer Oracle E-mail: [EMAIL PROTECTED] Phone: (650) 506-8127 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ ckrm-tech mailing list https://lists.sourceforge.net/lists/listinfo/ckrm-tech