news.volyx.in

The real realtime preemption end game (lwn.net)

459 points by chmaynard · 1010 days ago · 269 comments on HN

Article summary

The Linux kernel's realtime preemption project has been ongoing for nearly 20 years, with the goal of ensuring that the highest-priority process can run with minimal delay. One remaining challenge is the printk() function, which is used for kernel logging and can introduce latency. The printk() problem has been worked on since 2018, with around 300 patches submitted or waiting to be merged. The goal is to make printk() asynchronous, allowing for faster and more reliable logging.

Main themes

  • realtime preemption
  • kernel logging
  • printk() function
  • logging strategies
  • CAP theorem
  • security and auditing

What commenters say

  • Guaranteed delivery of logs is not always necessary and can come at the cost of service downtime.
  • Logging can be essential for security and auditing, and losing logs can make it difficult to track issues.
  • Using a local queue for logging can help prevent data loss in case of temporary network issues, but may not be sufficient in all cases.
  • The CAP theorem applies to logging, and trade-offs must be made between consistency, availability, and partition tolerance.
  • Network-based logging can be less likely to cause blocking and jitter compared to disk-based logging.
  • In some cases, such as audit logs, guaranteed delivery and retention of logs are required by law or regulation.
  • The importance of logging varies depending on the context, with some systems requiring durable and tamper-evident logs, while others may prioritize best-effort logging.