2.6 and the user-space ABI
Linus isn't happy about the forced lm_sensors upgrade; he has asked for a way to avoid that requirement. In response, i2c maintainer Jean Delvare raised some misgivings about the stable ABI policy:
Those comments notwithstanding, Linux has managed to maintain user-space ABI compatibility quite nicely for many years. There are certainly exceptions, but they are few enough and far enough between that each one stands out. But, as Christoph Hellwig points out, the situation is not perfect:
Now compare that to sysfs..
The user-space ABI now goes well beyond system calls. The huge sysfs interface (4800 files on your editor's desktop) is a big piece of user space's view of the system, and it is a piece which is difficult to avoid breaking. Directories in sysfs correspond directly to data structures within the kernel; changes to those structures will often have consequences in sysfs. So kernel developers may think that they are operating far away from the user-space interface, but end up breaking it anyway. Netlink, /proc, and ioctl() also make up part of the ABI, and they, too, can be easy to break. The V4L2 regression is the result of an attempt to extend one ioctl() call breaking others.
The new development model can also make it harder to maintain compatibility. Four or five major releases per year, each with a full load of new major features, adds up to a lot of code changes. There is also no clear point where whatever changes do prove to be unavoidable can be made without surprising users. If the kernel developers were to disappear for a year or two and return with a 3.0 release, nobody would be surprised if it required a small amount of adaptation on the user-space side. But a 2.6.22 release - which contains needed fixes and new drivers along with new features - is not expected to break working systems.
Arguments for returning to the older development model are hard to find,
though. Despite occasional glitches, things are generally working far
better than they did before 2.6 came out. The pace of development is
unlikely to slow. So the problem of occasional ABI regressions is likely
to remain with us. As is often the case, the best way to avoid such
problems - after a high degree of attention by the developers - is
extensive testing. User-space ABI changes caught during the development
cycle will almost certainly not survive into the final release, but it is
hard to fix problems that nobody knows about. As is also often the case,
automating this testing is hard; nobody can put together all of the
hardware and software combinations that the kernel will face. So the
worthy cause of maintaining a stable user-space interface is likely to
require a fair amount of human attention for the foreseeable future.
| Index entries for this article | |
|---|---|
| Kernel | Development model/User-space ABI |
