By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: New Linux Patches Aim To Customize Out-Of-Memory Behavior Using BPF
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > Computing > New Linux Patches Aim To Customize Out-Of-Memory Behavior Using BPF
Computing

New Linux Patches Aim To Customize Out-Of-Memory Behavior Using BPF

News Room
Last updated: 2025/04/28 at 7:09 AM
News Room Published 28 April 2025
Share
SHARE

A fresh take is being pursued around allowing the Linux kernel’s out-of-memory (OOM) behavior to be customized using BPF programs.

Google engineer Roman Gushchin has sent out a “request for comments” patch series with a new take on allowing for OOM customization using BPF. There have been previous attempts at BPF-based OOM customization for adapting the kernel’s behavior but no solution yet ultimately deemed the best and suitable for upstreaming.

Broken memory pressure

Gushchin explains in the RFC patch series:

“This patchset adds an ability to customize the out of memory handling using bpf.

It focuses on two parts:
1) OOM handling policy,
2) PSI-based OOM invocation.

The idea to use bpf for customizing the OOM handling is not new, but unlike the previous proposal, which augmented the existing task ranking-based policy, this one tries to be as generic as possible and leverage the full power of the modern bpf.

It provides a generic hook which is called before the existing OOM killer code and allows implementing any policy, e.g. picking a victim task or memory cgroup or potentially even releasing memory in other ways, e.g. deleting tmpfs files (the last one might require some additional but relatively simple changes).

The past attempt to implement memory-cgroup aware policy showed that there are multiple opinions on what the best policy is. As it’s highly workload-dependent and specific to a concrete way of organizing workloads, the structure of the cgroup tree etc, a customizable bpf-based implementation is preferable over a in-kernel implementation with a dozen on sysctls.

The second part is related to the fundamental question on when to declare the OOM event. It’s a trade-off between the risk of unnecessary OOM kills and associated work losses and the risk of infinite trashing and effective soft lockups. In the last few years
several PSI-based userspace solutions were developed (e.g. OOMd or systemd-OOMd). The common idea was to use userspace daemons to implement custom OOM logic as well as rely on PSI monitoring to avoid stalls. In this scenario the userspace daemon was supposed to handle the majority of OOMs, while the in-kernel OOM killer worked as the last resort measure to guarantee that the system would never deadlock on the memory. But this approach creates additional infrastructure churn: userspace OOM daemon is a separate entity which needs to be deployed, updated, monitored. A completely different pipeline needs to be built to monitor both types of OOM events and collect associated logs. A userspace daemon is more restricted in terms on what data is available to it. Implementing a daemon which can work reliably under a heavy memory pressure in the system is also tricky.”

We will see where this newest BPF-based OOM adaptation heads and if it’s ultimately accepted into the mainline Linux kernel.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Waymo robotaxis may be available to buy one day
Next Article Finding ChatGPT Annoying? An Update to Its Personality Is Coming
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

This crazy thin foldable embarrasses the Galaxy Z Fold 7 even before its launch
News
AI job predictions become corporate America’s newest competitive sport | News
News
They Clicked, You Blinked: The Lost Art Of Post-Click Content Experience
Computing
How $10m case against Diddy collapsed after prosecutors got greedy
News

You Might also Like

Computing

They Clicked, You Blinked: The Lost Art Of Post-Click Content Experience

16 Min Read
Computing

Qualcomm launches Snapdragon 8s Gen4, adopted first by Xiaomi and Oppo · TechNode

1 Min Read
Computing

LG Display transfers 8.5-gen LCD plant in Guangzhou to TCL CSOT for $1.52 billion · TechNode

1 Min Read
Computing

DeepSeek AI supports Myanmar earthquake relief efforts · TechNode

1 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?