linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan.kim@gmail.com>
To: David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Hugh Dickins <hughd@google.com>, Izik Eidus <ieidus@redhat.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	linux-mm@kvack.org
Subject: Re: [patch v2] oom: replace PF_OOM_ORIGIN with toggling oom_score_adj
Date: Thu, 14 Apr 2011 10:21:56 +0900	[thread overview]
Message-ID: <BANLkTi=EVZJVdYSx7LitP__gPH4PBEJy6w@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1104131811470.19388@chino.kir.corp.google.com>

On Thu, Apr 14, 2011 at 10:12 AM, David Rientjes <rientjes@google.com> wrote:
> On Thu, 14 Apr 2011, Minchan Kim wrote:
>
>> Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
>>
>
> Thanks!
>
>> Seem to be reasonable and code don't have a problem.
>> But couldn't we make the function in general(ex, passed task_struct)
>> and use it when we change oom_score_adj(ex, oom_score_adj_write)?
>>
>
> I thought about doing that, but oom_score_adj_write doesn't operate on
> current, so it needs to lock p->sighand differently and also does a test
> to ensure that the new value is only less than the current value for
> CAP_SYS_RESOURCE.  That test is required to take place under the lock as
> well.
>

Yes. We already have facilities for it(ex, task_lock, lock_task_sighand).
And I think CAP_SYS_RESOURCE check in general function don't have a problem.

Of course, it adds unnecessary overhead slightly but it's not a hot
path.  What's problem for you to go ahead?


-- 
Kind regards,
Minchan Kim

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-04-14  1:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13 18:33 [patch] oom: replace PF_OOM_ORIGIN with toggling oom_score_adj David Rientjes
2011-04-14  0:03 ` KOSAKI Motohiro
2011-04-14  0:41   ` [patch v2] " David Rientjes
2011-04-14  0:46     ` KOSAKI Motohiro
2011-04-14  1:09     ` Minchan Kim
2011-04-14  1:12       ` David Rientjes
2011-04-14  1:21         ` Minchan Kim [this message]
2011-04-14  7:55           ` Matt Fleming
2011-04-14 20:18     ` [patch v3] " David Rientjes
2011-04-15 22:35       ` Hugh Dickins
2011-04-15 23:03         ` David Rientjes
2011-04-16  1:48           ` Hugh Dickins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=EVZJVdYSx7LitP__gPH4PBEJy6w@mail.gmail.com' \
    --to=minchan.kim@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=ieidus@redhat.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).