The Greater Kernel Ecosystem and Documentation
The next session covered the greater kernel ecosystem, including tings like glibc, udev, the hal layer, etc. Greg KH moderated this panel as well.
An initial assertion is that sysfs is just another system call ABI - sysfs exposes the internals of the kernel. The kernels internals change constantly. There is some substantial expertise in helping to disassociate the kernel internals from sysfs but the general feeling is that this disassociate needs to be more complete so that sysfs interfaces can become a bit more stable. The primary rule is not to assume structure but to assume hierarchy. Then user applications can traverse the hierarchy to determine where the relevent information resides based on an understanding of the hierarchy. libsysfs was a library that no longer exists. The library was written by non-library experts and assumed inappropriate things about libsysfs. The recommendation is to use hal to access sysfs information.
Michael Kerrisk is the man page maintainer for sections 2, 3, 4, and 8. Usually spending a day a week on documenting. In the process he is finding many buggy interfaces. Michael points out that it is hard to design good interfaces, and getting it wrong is painful. User interfaces are difficult and bug-prone, but APIs are forever. There is insufficient review of the interfaces, and the reviews are usually done by implementters/designers ratehr than by the end users (userland programmers). Michael proposed some formal kernel-userland interface development mechanism. This would include a formal signoff and a suite of userland test programs. Dcocumentation should be written by or in collaboration with a kernel developer, and some of the test code should be written by someone other than the developer.
There was a proposal for including the man pages in the kernel source tree. Debated, with the only challenge being about 50 or so systemcalls which have some wrapper in glibc to make the system call user accessible. There is also a desire to include some API testing in the tree as well for system calls and then enforce the API consistency with those tests. Christoph Helwig has volunteered to work with the copious IBM resources available that are working with LTP to pull just the right tests into the mainline git tree for the kernel. There is a strong desire to have better tests, API tests, and system call tests in general, although the community realizes that testing is hard.
Labels: linux kernel summit