Skip to contentSkip to conversation

use oom_killer_disabled in page fault oom path

PATCH Superseded Dave Young 4 participants 5 messages Apr 26, 2011

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Dave Young

author
#0 lore raw

PATCH 2/2 use oom_killer_disabled in page fault oom path

Currently oom_killer_disabled is only used in __alloc_pages_slowpath, For page fault oom case it is not considered. One use case is virtio balloon driver, when memory pressure is high, virtio ballooning will cause oom killing due to such as page fault oom.

Thus add oom_killer_disabled checking in pagefault_out_of_memory.

---
 mm/oom_kill.c |    3 +++
 1 file changed, 3 insertions(+)
mm/oom_kill.c +3 -0
@@ -747,6 +747,9 @@ out:
  */
 void pagefault_out_of_memory(void)
 {
+	if (oom_killer_disabled)
+		return;
+
 	if (try_set_system_oom()) {
 		out_of_memory(NULL, 0, 0, NULL);
 		clear_system_oom();
Reviewed-by on v1 2/2
#1 lore raw
Quoted 8 lines · On Tue, 26 Apr 2011 13:31:50 +0800 Dave Young <[email protected]> wrote:

Currently oom_killer_disabled is only used in __alloc_pages_slowpath, For page fault oom case it is not considered. One use case is virtio balloon driver, when memory pressure is high, virtio ballooning will cause oom killing due to such as page fault oom.

Thus add oom_killer_disabled checking in pagefault_out_of_memory.

Reviewed-by on v1 2/2
#2 lore raw
In reply to Dave Young
Quoted 8 lines

Currently oom_killer_disabled is only used in __alloc_pages_slowpath, For page fault oom case it is not considered. One use case is virtio balloon driver, when memory pressure is high, virtio ballooning will cause oom killing due to such as page fault oom.

Thus add oom_killer_disabled checking in pagefault_out_of_memory.

Thank you.

#3 lore raw
In reply to Dave Young
Quoted 4 lines · Dave Young

Currently oom_killer_disabled is only used in __alloc_pages_slowpath, For page fault oom case it is not considered. One use case is virtio balloon driver, when memory pressure is high, virtio ballooning will cause oom killing due to such as page fault oom.

Other mm guys already accepted but sorry I can't understand your point since I am not familiar with virtio.

Now oom_killer_disabled is used by only hibernation and hibernation freezes processes so page fault shouldn't happen.

Now are you using oom_killer_disabled in virtio?
Could you elaborate use case ?

Thanks.

Signature · 9 lines
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#4 lore raw
Quoted 6 lines · Minchan Kim
Quoted 4 lines · Dave Young

Currently oom_killer_disabled is only used in __alloc_pages_slowpath, For page fault oom case it is not considered. One use case is virtio balloon driver, when memory pressure is high, virtio ballooning will cause oom killing due to such as page fault oom.

Quoted 8 lines

Other mm guys already accepted but sorry I can't understand your point since I am not familiar with virtio.

Now oom_killer_disabled is used by only hibernation and hibernation freezes processes so page fault shouldn't happen.

Now are you using oom_killer_disabled in virtio?
Could you elaborate use case ?

Sorry, I lost your [1/2] in my mail box.
I will see it in marc linux-mm

Signature · 9 lines
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>