linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>,
	xuejiufei@huawei.com, ming.lei@canonical.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] mm: clear __GFP_FS when PF_MEMALLOC_NOIO is set
Date: Thu, 4 Sep 2014 19:21:31 +1000	[thread overview]
Message-ID: <20140904092131.GM20473@dastard> (raw)
In-Reply-To: <20140903193058.2bc891a7.akpm@linux-foundation.org>

On Wed, Sep 03, 2014 at 07:30:58PM -0700, Andrew Morton wrote:
> > PF_MEMALLOC_NOIO is only set for some special processes. I think it
> > won't affect much.
> 
> Maybe not now.  But once we add hacks like this, people say "goody" and
> go and use them rather than exerting the effort to sort out their
> deadlocks properly :( There will be more PF_MEMALLOC_NOIO users in
> 2019.

We got PF_MEMALLOC_NOIO because we failed to get vmalloc deadlocks
fixed. The reason vmalloc didn't get fixed?

"there will be more vmalloc users".

> Dunno, I'd like to hear David's thoughts but perhaps it would be better
> to find some way to continue to permit PF_MEMALLOC_NOIO to shrink VFS
> caches for most filesystems and find some fs-specific fix for ocfs2. 
> That would mean testing PF_MEMALLOC_NOIO directly I guess.

No special flags in the superblock shrinker, please. We have tens of
other filesystem shrinkers that might be impacted, too. If we do not
want filesystem shrinkers (note the plural) to run, the
shrink_control->gfp_mask needs to have __GFP_FS cleared from it when
it is first configured and so that context is constant across all
shrinker reclaim cases.

If you're really worried by changing PF_MEMALLOC_NOIO, then we can
introduce PF_MEMALLOC_NOFS and have the mm subsystem mask both flags
appropriately when setting the gfp_mask in the shrink_control
settings. But fundamentally, our reclaim heirarchy defines that NOIO
implies NOFS, and so we need to fix PF_MEMALLOC_NOIO anyway.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

--
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>

  parent reply	other threads:[~2014-09-04  9:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03  5:54 Junxiao Bi
2014-09-03 12:20 ` Trond Myklebust
2014-09-04  2:18   ` Junxiao Bi
2014-09-03 23:10 ` Andrew Morton
2014-09-04  2:08   ` Junxiao Bi
2014-09-04  2:30     ` Andrew Morton
2014-09-04  4:57       ` Junxiao Bi
2014-09-04  8:05       ` Anton Altaparmakov
2014-09-04  9:21       ` Dave Chinner [this message]
2014-09-04  9:05   ` Dave Chinner
2014-09-04  9:23 ` Dave Chinner
2014-09-05  2:32   ` Junxiao Bi
2014-09-05  5:13     ` Junxiao Bi

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=20140904092131.GM20473@dastard \
    --to=david@fromorbit.com \
    --cc=akpm@linux-foundation.org \
    --cc=junxiao.bi@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ming.lei@canonical.com \
    --cc=xuejiufei@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