linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] memcg OOM notifications and PF_EXITING checks
@ 2014-01-15 15:01 Michal Hocko
  2014-01-15 15:01 ` [RFC 1/3] memcg: notify userspace about OOM only when and action is due Michal Hocko
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Michal Hocko @ 2014-01-15 15:01 UTC (permalink / raw)
  To: linux-mm
  Cc: LKML, Johannes Weiner, David Rientjes, KOSAKI Motohiro, Andrew Morton

Hi,
this is an attempt to restart discussions regarding memcg OOM
notifications and break out conditions.

"memcg: do not hang on OOM when killed by userspace OOM access to memory
reserves" which was a first patch in the series was already merged to -mm
tree (http://www.ozlabs.org/~akpm/mmotm/broken-out/memcg-do-not-hang-on-oom-when-killed-by-userspace-oom-access-to-memory-reserves.patch)
but it didn't see ack from neither David nor Johannes. I would be happy
if we agreed on that one as well.

The first patch in this series implements and extends an idea proposed
by David to not notify userspace when the OOM killer might back out and
prevent from killing. Johannes was not fond of the idea because this
changes userspace interface in a subtle way because somebody might be
relying on notifications as a signal that the memcg is getting into
troubles. It has been argued that there are memory thresholds and
vmpressure notifications for such an use case.

I am in favor to make change the notification and draw the line when to
notify to "kernel or userspace has to perform an action". It makes sense
to me, it is still racy though. Something might have exiting millisecond
after notification fired but it at least is consistent.

The second patch is trivial and it removes PF_EXITING check for the
current in mem_cgroup_out_of_memory because it is no longer needed when
we have the check in the charging path.

The last patch is just an attempt and might be totally wrong. I've
noticed that we are not checking for the killed tasks in
mem_cgroup_out_of_memory which might break usecases where a task was
killed by vmpressure or thresholds handlers but the killed task cannot
terminate in time. We should rather not kill something else.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-01-16 14:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-15 15:01 [RFC PATCH 0/3] memcg OOM notifications and PF_EXITING checks Michal Hocko
2014-01-15 15:01 ` [RFC 1/3] memcg: notify userspace about OOM only when and action is due Michal Hocko
2014-01-15 17:56   ` Johannes Weiner
2014-01-15 19:00     ` Michal Hocko
2014-01-15 20:30       ` Johannes Weiner
2014-01-16 14:10         ` Michal Hocko
2014-01-15 15:01 ` [RFC 2/3] memcg: do not check PF_EXITING in mem_cgroup_out_of_memory Michal Hocko
2014-01-15 15:01 ` [RFC 3/3] memcg,oom: do not check PF_EXITING and do not set TIF_MEMDIE Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox