mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Hillf Danton" <hillf.zj@alibaba-inc.com>
To: "Johannes Weiner" <hannes@cmpxchg.org>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>,
	<linux-mm@kvack.org>, "Hillf Danton" <hillf.zj@alibaba-inc.com>
Subject: Re: [patch 06/12] mm: oom_kill: simplify OOM killer locking
Date: Wed, 25 Mar 2015 16:05:57 +0800	[thread overview]
Message-ID: <048701d066d2$86b182d0$94148870$@alibaba-inc.com> (raw)
In-Reply-To: <048301d066d1$653e63d0$2fbb2b70$@alibaba-inc.com>


> --- a/include/linux/oom.h
> +++ b/include/linux/oom.h
> @@ -32,6 +32,8 @@ enum oom_scan_t {
>  /* Thread is the potential origin of an oom condition; kill first on oom */
>  #define OOM_FLAG_ORIGIN		((__force oom_flags_t)0x1)
> 
> +extern struct mutex oom_lock;
> +
>  static inline void set_current_oom_origin(void)
>  {
>  	current->signal->oom_flags |= OOM_FLAG_ORIGIN;
> @@ -60,9 +62,6 @@ extern void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
>  			     struct mem_cgroup *memcg, nodemask_t *nodemask,
>  			     const char *message);
> 
> -extern bool oom_zonelist_trylock(struct zonelist *zonelist, gfp_t gfp_flags);
> -extern void oom_zonelist_unlock(struct zonelist *zonelist, gfp_t gfp_flags);
Alternately expose three functions, rather than oom_lock mutex?
bool oom_trylock(void);
void oom_lock(void);
void oom_unlock(void);

Hillf


       reply	other threads:[~2015-03-25  8:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <048301d066d1$653e63d0$2fbb2b70$@alibaba-inc.com>
2015-03-25  8:05 ` Hillf Danton [this message]
2015-03-25  6:17 [patch 00/12] mm: page_alloc: improve OOM mechanism and policy Johannes Weiner
2015-03-25  6:17 ` [patch 06/12] mm: oom_kill: simplify OOM killer locking Johannes Weiner
2015-03-26 13:31   ` Michal Hocko
2015-03-26 15:17     ` Johannes Weiner
2015-03-26 16:07       ` Michal Hocko

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='048701d066d2$86b182d0$94148870$@alibaba-inc.com' \
    --to=hillf.zj@alibaba-inc.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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

all inboxes | Powered by JetHome®