Linux 5.8 Kernel Gains a Notification Queue

By

Linux 5.8 looks to be one of the biggest releases yet, and includes a general notification queue.

Back in the days of the Linux 5.5 kernel, Red Hat was working on what they called the "general notification queue." This feature was an offshoot of the Linux kernel pipe code and would serve to notify user-space applications and services of events to things like key and keyring changes, block layer events, and USB subsystem events. This would happen in such a way to keep those user-space applications and services from having to constantly poll the kernel interfaces. 

However, Linus Torvalds put the kibosh on the notification queue, because he said it wasn't ready at the time. That was then, this is now, and the feature is set for inclusion in the 5.8 kernel.

According to this comment (by Red Hat's David Howells), the notification queue will also "...have the ability to cache your kerberos tickets in the session, user or persistent keyring so that it isn't left around on disk across a reboot or logout." Howells continues to say, "Keyrings, however, cannot currently be monitored asynchronously, so the desktop has to poll for it - not so good on a laptop. This facility will allow the desktop to avoid the need to poll."

The official overview of the notification queue (for it's proposal in kernel 5.7) sums up the feature quite well:

This facility appears as a pipe that is opened in a special mode. The pipe’s internal ring buffer is used to hold messages that are generated by the kernel. These messages are then read out by read(). Splice and similar are disabled on such pipes due to them wanting to, under some circumstances, revert their additions to the ring - which might end up interleaved with notification messages.

This new feature was merged in Linux 5.8-rc1.

06/15/2020

Related content

  • Critical Linux Kernel Bug Discovered
  • Linux Storage Stack
    Abstraction layers are the alpha and omega in the design of complex architectures. The Linux Storage Stack is an excellent example of well-coordinated layers. Access to storage media is abstracted through a unified interface, without sacrificing functionality.
  • Warewulf Cluster Manager – Administration and Monitoring

    In the last of this four-part series on using Warewulf to build an HPC cluster, I focus a bit more on the administration of a Warewulf cluster, particularly some basic monitoring and the all-important resource manager.

  • Linux I/O Schedulers

    The Linux kernel has several I/O schedulers that can greatly influence performance. We take a quick look at I/O scheduler concepts and the options that exist within Linux.

  • Linux I/O Schedulers
    The Linux kernel has several I/O schedulers that can greatly influence performance. We take a quick look at I/O scheduler concepts and the options that exist within Linux.
comments powered by Disqus