Skip to contentSkip to conversation

question on comment in __oom_kill_task()

DISCUSSION Chris Friesen 1 participant 1 message Apr 2, 2007

lore
Share & tools
lore
#0 lore raw

In __oom_kill_task(), there is a comment that says,

"We give our sacrificial lamb high priority and access to all the memory it needs. That way it should be able to exit() and clear out its resources quickly..."

However, we don't actually change the priority at that point, we just give it a large timeslice.

Would it make sense to actually change the priority/policy using sched_setscheduler() to give the process a deeply negative nice level or maybe even make it realtime?

This seems to help on some of our OOM stress tests.

Chris