xfs
[Top] [All Lists]

Re: [PATCH 1.2/2] mm: introduce memalloc_nofs_{save,restore} API

To: linux-mm@xxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 1.2/2] mm: introduce memalloc_nofs_{save,restore} API
From: Michal Hocko <mhocko@xxxxxxxxxx>
Date: Wed, 27 Apr 2016 15:07:12 +0200
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, Theodore Ts'o <tytso@xxxxxxx>, Chris Mason <clm@xxxxxx>, Jan Kara <jack@xxxxxxx>, ceph-devel@xxxxxxxxxxxxxxx, cluster-devel@xxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, logfs@xxxxxxxxx, xfs@xxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, reiserfs-devel@xxxxxxxxxxxxxxx, linux-ntfs-dev@xxxxxxxxxxxxxxxxxxxxx, linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx, linux-afs@xxxxxxxxxxxxxxxxxxx, LKML <linux-kernel@xxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1461758075-21815-2-git-send-email-mhocko@xxxxxxxxxx>
References: <1461671772-1269-2-git-send-email-mhocko@xxxxxxxxxx> <1461758075-21815-1-git-send-email-mhocko@xxxxxxxxxx> <1461758075-21815-2-git-send-email-mhocko@xxxxxxxxxx>
User-agent: Mutt/1.5.24 (2015-08-30)
On Wed 27-04-16 13:54:35, Michal Hocko wrote:
> From: Michal Hocko <mhocko@xxxxxxxx>
> 

Ups missed Dave's note about:

> GFP_NOFS context is used for the following 4 reasons currently
>       - to prevent from deadlocks when the lock held by the allocation
>         context would be needed during the memory reclaim
>       - to prevent from stack overflows during the reclaim because
>         the allocation is performed from a deep context already
>       - to prevent lockups when the allocation context depends on
>         other reclaimers to make a forward progress indirectly
>       - just in case because this would be safe from the fs POV

        - silence lockdep false positives
-- 
Michal Hocko
SUSE Labs

<Prev in Thread] Current Thread [Next in Thread>