Re: [PATCH 1/4] oom: Do not panic when OOM killer is sysrq triggered

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 9 Jul 2015, Michal Hocko wrote:

> > the titles were wrong for patches 2 and 3, but it doesn't mean we need to 
> > add hacks around the code before organizing this into struct oom_control 
> 
> It is much easier to backport _fixes_ into older kernels (and yes I do
> care about that) if they do not depend on other cleanups. So I do not
> understand your point here. Besides that the cleanup really didn't make
> much change to the actuall fix because one way or another you still have
> to add a simple condition to rule out a heuristic/configuration which
> doesn't apply to sysrq+f path.
> 
> So I am really lost in your argumentation here.
> 

This isn't a bugfix: sysrq+f has, at least for eight years, been able to 
panic the kernel.  We're not fixing a bug, we're changing behavior.  It's 
quite appropriate to reorganize code before a behavior change to make it 
cleaner.

> > or completely pointless comments and printks that will fill the kernel 
> > log.
> 
> Could you explain what is so pointless about a comment which clarifies
> the fact which is not obviously visible from the current function?
> 

It states the obvious, a kthread is not going to be oom killed for 
oom_kill_allocating_task: it's not only current->mm, but also 
oom_unkillable_task(), which quite explicitly checks for PF_KTHREAD.  I 
don't think any reader of this code will assume a kthread is going to be 
oom killed.

> Also could you explain why the admin shouldn't get an information if
> sysrq+f didn't kill anything because no eligible task has been found?

The kernel log is the only notification mechanism that we have of the 
kernel killing a process, we want to avoid spamming it unnecessarily.  The 
kernel log is not the appropriate place for your debugging information 
that would only specify that yes, out_of_memory() was called, but there 
was nothing actionable, especially when that trigger can be constantly 
invoked by userspace once panicking is no longer possible.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]