Language Selection

English French German Italian Portuguese Spanish

Linux kernel 2.6.23 to have stable userspace driver API

Filed under
Linux

Linus Torvalds included patches into the mainline tree which implement a stable userspace driver API into the Linux kernel.

The stable driver API was already announced a year ago by Greg Kroah-Hartman. Now the last patches where uploaded and the API was included in Linus’ tree. The idea of the API is to make life easier for driver developers:

"This interface allows the ability to write the majority of a driver in userspace with only a very small shell of a driver in the kernel itself. It uses a char device and sysfs to interact with a userspace process to process interrupts and control memory accesses."

Since future drivers using this API will run mainly in userspace there is no need to open up the source code for these parts. Also, drivers can be re-used even after kernel changes because the API will remain stable.

The background motivation for the inclusion of such a stable API comes form the embedded world.

more here




More in Tux Machines

EasyOS Dunfell 2.6.1 released for x86_64 PC

Yesterday announced EasyOS Dunfell 2.6.1 aarch64 for the Raspberry Pi4: https://bkhome.org/news/202101/easyos-dunfell-261-released-for-the-raspberry-pi4.html Today it is the turn for EasyOS Dunfell-series 2.6.1 64-bit on the PC. This is the first official release in this series. Same packages compiled in OpenEmbedded. Latest SeaMonkey 2.53.6. A different kernel for the PC build, 5.10.11. Read all about it here: http://distro.ibiblio.org/easyos/amd64/releases/dunfell/2.6.1/release-notes-2.6.1.htm As stated in the release notes, all three streams are being sync'ed to the same version number. The Buster-series 2.6.1 will probably be uploaded tomorrow. I have to compile the latest 5.4.x kernel, and SeaMonkey 2.53.6. As to which you would choose for the PC, it is like asking "which is better, strawberry icecream or chocolate icecream?" Read more

Top 20 Uses of Linux

The Linux OS and its related distros and flavors have transformed it from hardcore software into an industrial brand. Even if you are not a fan of it, the Linux OS might be as common as the air you breathe if you closely analyze your day to day interactive activities. Almost all the modern technologies that transform and innovate the tech industry have a Linux OS DNA imprinted on them. Those that are yet to be branded with their innovative uniqueness and recognition are waiting in line for the famed chance. Therefore, you might boldly claim that the Linux OS does not run your life, but the world around you cannot avoid the flirty pursuits of this open-source and free software. Nowadays, almost anything that can be described as cool is either pursuing Linux or is being pursued by Linux. It is the perfect symbiotic relationship in a world that tries to find a balance in technology and innovation. This article explores the awesomeness and outreach of the Linux OS in the world around us. It might even be an eye-opener for some of us to start taking our Linux skills to the next level. Top500 quotes Linux as the powerhouse or engine behind five-hundred fastest computers worldwide. I do not know of the speed of the computer composing this article or whether it qualifies to be among the listed five-hundred fastest computers worldwide. However, one thing is certain; it is 100% Linux DNA. On this note, let us start parading the top 20 uses of Linux. Read more

parted-3.4 released [stable]

Parted 3.4 has been released.  This release includes many bug fixes and new features. 
Here is Parted's home page: 
    http://www.gnu.org/software/parted/ 
For a summary of all changes and contributors, see: 
  https://git.savannah.gnu.org/cgit/parted.git/log/?h=v3.4 
or run this command from a git-cloned parted directory: 
  git shortlog v3.3..v3.4 (appended below) 
Here are the compressed sources and a GPG detached signature[*]: 
  http://ftp.gnu.org/gnu/parted/parted-3.4.tar.xz 
  http://ftp.gnu.org/gnu/parted/parted-3.4.tar.xz.sig 
Use a mirror for higher download bandwidth: 
  https://www.gnu.org/order/ftp.html 
[*] Use a .sig file to verify that the corresponding file (without the 
.sig suffix) is intact.  First, be sure to download both the .sig file 
and the corresponding tarball.  Then, run a command like this: 
  gpg --verify parted-3.4.tar.xz.sig 
If that command fails because you don't have the required public key, 
then run this command to import it: 
  gpg --keyserver keys.gnupg.net --recv-keys 117E8C168EFE3A7F 
and rerun the 'gpg --verify' command. 
This release was bootstrapped with the following tools: 
  Autoconf 2.69 
  Automake 1.16.1 
  Gettext 0.21 
  Gnulib v0.1-4131-g252c4d944a 
  Gperf 3.1 
Read more

Kernel: LWN's Latest and IO_uring Patches

  • Resource limits in user namespaces

    User namespaces provide a number of interesting challenges for the kernel. They give a user the illusion of owning the system, but must still operate within the restrictions that apply outside of the namespace. Resource limits represent one type of restriction that, it seems, is proving too restrictive for some users. This patch set from Alexey Gladkov attempts to address the problem by way of a not-entirely-obvious approach. Consider the following use case, as stated in the patch series. Some user wants to run a service that is known not to fork within a container. As a way of constraining that service, the user sets the resource limit for the number of processes to one, explicitly preventing the process from forking. That limit is global, though, so if this user tries to run two containers with that service, the second one will exceed the limit and fail to start. As a result, our user becomes depressed and considers a career change to goat farming. Clearly, what is needed is a way to make at least some resource limits apply on per-container basis; then each container could run its service with the process limit set to one and everybody will be happy (except perhaps the goats).

  • Fast commits for ext4

    The Linux 5.10 release included a change that is expected to significantly increase the performance of the ext4 filesystem; it goes by the name "fast commits" and introduces a new, lighter-weight journaling method. Let us look into how the feature works, who can benefit from it, and when its use may be appropriate. Ext4 is a journaling filesystem, designed to ensure that filesystem structures appear consistent on disk at all times. A single filesystem operation (from the user's point of view) may require multiple changes in the filesystem, which will only be coherent after all of those changes are present on the disk. If a power failure or a system crash happens in the middle of those operations, corruption of the data and filesystem structure (including unrelated files) is possible. Journaling prevents corruption by maintaining a log of transactions in a separate journal on disk. In case of a power failure, the recovery procedure can replay the journal and restore the filesystem to a consistent state. The ext4 journal includes the metadata changes associated with an operation, but not necessarily the related data changes. Mount options can be used to select one of three journaling modes, as described in the ext4 kernel documentation. data=ordered, the default, causes ext4 to write all data before committing the associated metadata to the journal. It does not put the data itself into the journal. The data=journal option, instead, causes all data to be written to the journal before it is put into the main filesystem; as a side effect, it disables delayed allocation and direct-I/O support. Finally, data=writeback relaxes the constraints, allowing data to be written to the filesystem after the metadata has been committed to the journal. Another important ext4 feature is delayed allocation, where the filesystem defers the allocation of blocks on disk for data written by applications until that data is actually written to disk. The idea is to wait until the application finishes its operations on the file, then allocate the actual number of data blocks needed on the disk at once. This optimization limits unneeded operations related to short-lived, small files, batches large writes, and helps ensure that data space is allocated contiguously. On the other hand, the writing of data to disk might be delayed (with the default settings) by a minute or so. In the default data=ordered mode, where the journal entry is written only after flushing all pending data, delayed allocation might thus delay the writing of the journal. To assure data is actually written to disk, applications use the fsync() or fdatasync() system calls, causing the data (and the journal) to be written immediately.

  • MAINTAINERS truth and fiction

    Since the release of the 5.5 kernel in January 2020, there have been almost 87,000 patches from just short of 4,600 developers merged into the mainline repository. Reviewing all of those patches would be a tall order for even the most prolific of kernel developers, so decisions on patch acceptance are delegated to a long list of subsystem maintainers, each of whom takes partial or full responsibility for a specific portion of the kernel. These maintainers are documented in a file called, surprisingly, MAINTAINERS. But the MAINTAINERS file, too, must be maintained; how well does it reflect reality? The MAINTAINERS file doesn't exist just to give credit to maintainers; developers make use of it to know where to send patches. The get_maintainer.pl script automates this process by looking at the files modified by a patch and generating a list of email addresses to send it to. Given that misinformation in this file can send patches astray, one would expect it to be kept up-to-date. Recently, your editor received a suggestion from Jakub Kicinski that there may be insights to be gleaned from comparing MAINTAINERS entries against activity in the real world. A bit of Python bashing later, a new analysis script was born.

  • Experimental Patches Allow For New Ioctls To Be Built Over IO_uring

    IO_uring continues to be one of the most exciting technical innovations in the Linux kernel in recent years not only for more performant I/O but also opening up other doors for new Linux innovations. IO_uring has continued adding features since being mainlined in 2019 and now the newest proposed feature is the ability to build new ioctls / kernel interfaces atop IO_uring. The idea of supporting kernel ioctls over IO_uring has been brought up in the past and today lead IO_uring developer Jens Axboe sent out his initial patches. These initial patches are considered experimental and sent out as "request for comments" - they provide the infrastructure to provide a file private command type with IO_uring handling the passing of the arbitrary data.