linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: zhong jiang <zhongjiang@huawei.com>
Cc: Michal Hocko <mhocko@suse.cz>, Hugh Dickins <hughd@google.com>,
	akpm@linux-foundation.org, vbabka@suse.cz, rientjes@google.com,
	linux-mm@kvack.org, Xishi Qiu <qiuxishi@huawei.com>,
	Hanjun Guo <guohanjun@huawei.com>
Subject: Re: [PATCH] mm: fix oom work when memory is under pressure
Date: Mon, 19 Sep 2016 10:27:43 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LSU.2.11.1609191015310.1993@eggly.anvils> (raw)
In-Reply-To: <20160918144248.GA28476@dhcp22.suse.cz>

On Sun, 18 Sep 2016, Michal Hocko wrote:
> On Sun 18-09-16 12:04:47, zhong jiang wrote:
> [...]
> >  index 5048083..72dc475 100644
> > --- a/mm/ksm.c
> > +++ b/mm/ksm.c
> > @@ -299,7 +299,7 @@ static inline void free_rmap_item(struct rmap_item *rmap_item)
> > 
> >  static inline struct stable_node *alloc_stable_node(void)
> >  {
> > -       return kmem_cache_alloc(stable_node_cache, GFP_KERNEL);
> > +       return kmem_cache_alloc(stable_node_cache, __GFP_HIGH);
> >  }
> 
> I do not want to speak for Hugh but I believe he meant something
> different. The above will grant access to memory reserves but it doesn't
> wake kswapd nor the direct reclaim. I guess he meant GFP_KERNEL | __GFP_HIGH

You speak for me correctly, Michal: sorry I wasn't clear, Zhongjiang, yes,
I meant __GFP_HIGH as a modifier for GFP_KERNEL: GFP_KERNEL | __GFP_HIGH

And after running it past Michal and thinking on it some more, I do
still think that it's the right thing to do for alloc_stable_node().
But please only include that change in your patch if you yourself are
comfortable with it: it is very definitely a much lower order issue
than the alloc_rmap_item() issue, and can always be added later.

(I have no view on whether and how this problem still occurs with
OOM reaper: I leave the thinking on that to you and the experts.)

Hugh

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2016-09-19 17:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 14:47 zhongjiang
2016-09-09 11:44 ` Michal Hocko
2016-09-12  9:51   ` zhong jiang
2016-09-12 11:13     ` Michal Hocko
2016-09-12 13:42       ` zhong jiang
2016-09-12 17:44         ` Michal Hocko
2016-09-13 13:13           ` zhong jiang
2016-09-13 13:28             ` Michal Hocko
2016-09-13 14:01               ` zhong jiang
2016-09-14  7:13               ` zhong jiang
2016-09-14  8:42                 ` Michal Hocko
2016-09-14  8:50                   ` zhong jiang
2016-09-14  9:05                     ` Michal Hocko
2016-09-14  8:52                   ` Michal Hocko
2016-09-14  9:25                     ` zhong jiang
2016-09-14 11:29                       ` Tetsuo Handa
2016-09-14 13:52                         ` zhong jiang
2016-09-18  6:00                           ` Tetsuo Handa
2016-09-18  6:13                             ` Tetsuo Handa
2016-09-19  4:44                               ` zhong jiang
2016-09-19  7:15                             ` zhong jiang
2016-09-16 22:13                     ` Hugh Dickins
2016-09-17 15:56                       ` Michal Hocko
2016-09-18  4:04                       ` zhong jiang
2016-09-18 14:42                         ` Michal Hocko
2016-09-19 17:27                           ` Hugh Dickins [this message]

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=alpine.LSU.2.11.1609191015310.1993@eggly.anvils \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=guohanjun@huawei.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=qiuxishi@huawei.com \
    --cc=rientjes@google.com \
    --cc=vbabka@suse.cz \
    --cc=zhongjiang@huawei.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