linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	rientjes@google.com, brouer@redhat.com,
	mgorman@techsingularity.net
Subject: Re: [PATCH] mm,page_alloc: apply gfp_allowed_mask before the first allocation attempt.
Date: Mon, 4 Sep 2017 10:47:15 +0200	[thread overview]
Message-ID: <20170904084715.aeyckbfciif7g2z2@dhcp22.suse.cz> (raw)
In-Reply-To: <c03a89e8-e422-9fde-bb49-dac71a8fd7c6@suse.cz>

On Mon 04-09-17 10:22:59, Vlastimil Babka wrote:
> On 09/01/2017 05:16 PM, Tetsuo Handa wrote:
> > Michal Hocko wrote:
> >> On Fri 01-09-17 23:11:31, Tetsuo Handa wrote:
> >>> We are by error initializing alloc_flags before gfp_allowed_mask is
> >>> applied. Apply gfp_allowed_mask before initializing alloc_flags so that
> >>> the first allocation attempt uses correct flags.
> >>
> >> It would be worth noting that this will not matter in most cases,
> >> actually when only the node reclaim is enabled we can misbehave because
> >> NOFS request for PM paths would be ignored.
> 
> Hmm don't we have the same problem with the god-damned node reclaim by
> applying current_gfp_context() also only after the first attempt? But
> that would be present since 21caf2fc1931b.
> Hm, actually no, because reclaim calls current_gfp_context() by itself.
> Good.

Yes.

> Maybe reclaim should also do the gfp_allowed_mask filtering?

I would rather not spread it more than it is really needed.

> I wonder how safe the pm_restrict_gfp_mask() update is when an
> allocation is already looping in __alloc_pages_slowpath()...

It will be broken

> What exactly are your ideas to get rid of gfp_allowed_mask, Michal?

Well I planned to actually examine why do we need it in the first place
and whether the original intention still applies and if yes then replace
it by memalloc_noio_save. It would still be proken in a similar way you
pointed out but something tells me that it is just obsolete.
-- 
Michal Hocko
SUSE Labs

--
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:[~2017-09-04  8:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01 14:11 Tetsuo Handa
2017-09-01 14:28 ` Michal Hocko
2017-09-01 15:16   ` Tetsuo Handa
2017-09-04  8:22     ` Vlastimil Babka
2017-09-04  8:47       ` Michal Hocko [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=20170904084715.aeyckbfciif7g2z2@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=brouer@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=rientjes@google.com \
    --cc=vbabka@suse.cz \
    /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