Re: [RFC mm][PATCH 5/5] counting lowmem rss per mm

From: Minchan Kim
Date: Thu Dec 10 2009 - 20:13:05 EST


On Thu, Dec 10, 2009 at 5:01 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
>
> Some case of OOM-Kill is caused by memory shortage in lowmem area. For example,
> NORMAL_ZONE is exhausted on x86-32/HIGHMEM kernel.
>
> Now, oom-killer doesn't have no lowmem usage information of processes and
> selects victim processes based on global memory usage information.
> In bad case, this can cause chains of kills of innocent processes without
> progress, oom-serial-killer.
>
> For making oom-killer lowmem aware, this patch adds counters for accounting
> lowmem usage per process. (patches for oom-killer is not included in this.)
>
> Adding counter is easy but one of concern is the cost for new counter.
>
> Following is the test result of micro-benchmark of parallel page faults.
> Bigger page fault number indicates better scalability.
> (measured under USE_SPLIT_PTLOCKS environemt)
> [Before lowmem counter]
> ÂPerformance counter stats for './multi-fault 2' (5 runs):
>
>    46997471 Âpage-faults        Â( +-  0.720% )
>   1004100076 Âcache-references      ( +-  0.734% )
>   Â180959964 Âcache-misses        ( +-  0.374% )
> Â29263437363580464 Âbus-cycles         ( +-  0.002% )
>
>  60.003315683 Âseconds time elapsed  ( +-  0.004% )
>
> 3.85 miss/faults
> [After lowmem counter]
> ÂPerformance counter stats for './multi-fault 2' (5 runs):
>
>    45976947 Âpage-faults        Â( +-  0.405% )
>   Â992296954 Âcache-references      ( +-  0.860% )
>   Â183961537 Âcache-misses        ( +-  0.473% )
> Â29261902069414016 Âbus-cycles         ( +-  0.002% )
>
>  60.001403261 Âseconds time elapsed  ( +-  0.000% )
>
> 4.0 miss/faults.
>
> Then, small cost is added. But I think this is within reasonable
> range.
>
> If you have good idea for improve this number, it's welcome.
>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
Reviewed-by: Minchan Kim <minchan.kim@xxxxxxxxx>

--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/