]> Git Repo - linux.git/commit
mm/memcontrol.c: fix order calculation in try_charge()
authorJerome Marchand <[email protected]>
Fri, 6 Nov 2015 02:47:29 +0000 (18:47 -0800)
committerLinus Torvalds <[email protected]>
Fri, 6 Nov 2015 03:34:48 +0000 (19:34 -0800)
commit3608de0787e51d3d826656e105524b48ade7b16f
tree57acacb92f952f5633a4cc31bf92712f818d2a61
parenta5f65109026b35b654b94fdcd26a971185a53adc
mm/memcontrol.c: fix order calculation in try_charge()

Since commit 6539cc053869 ("mm: memcontrol: fold mem_cgroup_do_charge()"),
the order to pass to mem_cgroup_oom() is calculated by passing the
number of pages to get_order() instead of the expected size in bytes.
AFAICT, it only affects the value displayed in the oom warning message.
This patch fix this.

Michal said:

: We haven't noticed that just because the OOM is enabled only for page
: faults of order-0 (single page) and get_order work just fine.  Thanks for
: noticing this.  If we ever start triggering OOM on different orders this
: would be broken.

Signed-off-by: Jerome Marchand <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c
This page took 0.049492 seconds and 4 git commands to generate.