1 Apr 2010 01:00
Re: [PATCH -mm] proc: don't take ->siglock for /proc/pid/oom_adj
Oleg Nesterov <oleg <at> redhat.com>
2010-03-31 23:00:32 GMT
2010-03-31 23:00:32 GMT
On 03/31, David Rientjes wrote:
>
> On Wed, 31 Mar 2010, Oleg Nesterov wrote:
>
> > David, I just can't understand why
> > oom-badness-heuristic-rewrite.patch
> > duplicates the related code in fs/proc/base.c and why it preserves
> > the deprecated signal->oom_adj.
>
> You could combine the two write functions together and then two read
> functions together if you'd like.
Yes,
> > static ssize_t oom_any_adj_write(struct file *file, const char __user *buf,
> > size_t count, bool deprecated_mode)
> > {
> >
> > if (depraceted_mode) {
> > if (oom_score_adj == OOM_ADJUST_MAX)
> > oom_score_adj = OOM_SCORE_ADJ_MAX;
>
> ???
What?
> > else
> > oom_score_adj = (oom_score_adj * OOM_SCORE_ADJ_MAX) /
> > -OOM_DISABLE;
> > }
(Continue reading)
.
> PageActive(page) will return an int 0 or 1, mode is also int 0 or 1(
> already != ISOLATE_BOTH).
> There are comparible and why must to be sure to boolean values?
hm, ok. you are right.
please resend this part as individual patch.
> >> - if (mode != ISOLATE_BOTH && page_is_file_cache(page) != file)
> >> + if (page_is_file_cache(page) != file)
> >> return ret;
> >
> > no. please consider lumpy reclaim.
RSS Feed