[Lxc-users] updated procfs
atp
Andrew.Phillips at lmax.com
Fri May 14 11:20:08 UTC 2010
Hi,
Prompted by the "LXC a feature complete replacement of OpenVZ" thread,
I've uploaded my interim changes to procfs to
http://www.tinola.com/lxc/
Its very much a work in progress, and the code is pretty horrible in
places. Sorry its taken so long. I've learnt a lot about fuse.
Changes from Daniels version.
- Added support for running in zone 0.
- Added support for selective cpuinfo reporting.
- Fixed reporting of meminfo. memsw.limit_in_bytes was duplicated,
where usage_in_bytes should have been.
- Added procfs_flush for fuse.
- fuse would not supply content for proc files that returned
a zero st_size - which is most of them. Nasty hack implemented.
The more I work with this unfortunately the more I think its the wrong
approach for a couple of reasons;
Fuse is slow and does not fit the /proc filesystem well;
example;
/proc files mostly report zero length, and a variety of
methods are required (including just reading them and incrementing a
byte counter) to determine their size. Fuse will not output data
unless it gets a non-zero size from the getattr call.
So proxying is broken for some files but not others (those that
report a non zero size in ls -l /proc/)
Its easy to work around and get to the real /proc. I can't see it
working for /sys
My next goal is to get /proc/stat virtualised, and rework what I have to
cache more data - file sizes and the cpumask thats built from the
cpuset.cpus description. I also need to add cache timeout to the
cpumask cache so that changes to the cpuset.cpus are reflected.
At some point I'll either become comfortable with this, or else put my
money where my complaints are and write a loadable module that does the
same thing as a procfs_lxc. The core idea is good, I'm not sure that
fuse is the best place for it.
Andy
Andrew Phillips
Head of Systems
www.lmax.com
Office: +44 203 1922509
Mobile: +44 (0)7595 242 900
LMAX | Level 2, Yellow Building | 1 Nicholas Road | London | W11 4AN
The information in this e-mail and any attachment is confidential and is intended only for the named recipient(s). The e-mail may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not a named recipient please notify the sender immediately and delete any copies of this message. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Any view or opinions presented are solely those of the author and do not necessarily represent those of the company.
More information about the lxc-users
mailing list