From: Patrick M. <mo...@os...> - 2001-12-04 16:36:37
|
Hi Niels, > Pat, what you describe looks very much like what we have today, including > the ability to read the stats from some pseudo-fs (whether procfs, devfs, > or devicefs). For the purposes I have in mind, reading a file and parsing > ASCII data to get stats is way too slow and intrusive. > > However, I think i have already taken too much space in this forum trying > to promote my vision, which admittedly is a bit blurred. I apologize for > that but I need a sparring partner to work things out and don't have one > locally. I am interested to see/hear exactly what you envision. I think that several people are on similar thought paths. I am also curious to see how horrible the ascii parsing you speak of performs. Parsing ascii is not free, and never will be. However, there are a lot of benefits to using it. [ This discussion emits a few religious battles on the kernel list once in a while. And yes, I know the counter-arguments (speed,size,etc). ] With one ascii interface, any userspace program and library can parse it, be it C, Perl, shell, or Joe Admin. With a purely binary interface, you need some wrapper application to convert data for the last two. And, for things like C and Perl, you need a lot of #defines for the meanings of particular values. The latter is very prone to errors. It will be correct most of the time, but sifting through digits in header file after header file is tedious and can be very frustrating. We're defining an API (even bit by bit), and we want people to use it. We should make it as easy on those people as possible. If we have two interfaces we introduce other problems. If an update needs to happen, it has to touch both back ends. The people maintaining each most likely won't be the same person. There has to be a lot of coordination between those people to make sure the interface and the data represented are consistent. In general, one is likely to suffer from bit rot while one forges ahead. Binary is likely to be faster, but it will be harder on the people using the interface. Plus, I maintain that parsing ascii is not _that_ expensive. We're talking about fast, modern machines. If you're seeing _serious_ performance hits, I'm an interested to see just what it is you're trying to do.. -pat |