Linux 5.8 Lands A General Notification Queue

Written by Michael Larabel in Linux Kernel on 13 June 2020 at 07:40 PM EDT. 8 Comments
LINUX KERNEL
Merged this weekend ahead of Linux 5.8-rc1 is the long-standing work on introducing a general notification queue for the kernel. The general notification queue was pushed back last year from merging but now the initial code is in shape for Linux 5.8.

The general notification queue was added for Linux 5.8 as well as an event source for keys/keyrings such that notifications will be sent to user-space on linking/unlinking keys or changing their attributes. One of the immediate user-space clients of this notification system can be GNOME Online Accounts for better key handling rather than having to keep polling for changes.

The commit provides the GNOME Online Accounts use-case example:
Key/keyring notifications are desirable because if you have your kerberos tickets in a file/directory, your Gnome desktop will monitor that using something like fanotify and tell you if your credentials cache changes.

However, we 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. 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.

In addition to keys/keyrings, the general notification queue was previously brought up for possibly also being used for use-cases like monitoring changes to disks, USB subsystem events, and other happenings where user-space may want convenient and efficient notifications. The notification queue is built atop pipe functionality with a new "notification pipe" flag.

More details from the commit above. The work was spearheaded by Red Hat's David Howells.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week