]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm,thp,shm: limit gfp mask to no more than specified
authorRik van Riel <riel@surriel.com>
Thu, 31 Dec 2020 22:04:25 +0000 (22:04 +0000)
committerJohannes Weiner <hannes@cmpxchg.org>
Thu, 31 Dec 2020 22:04:25 +0000 (22:04 +0000)
commita72cb6e378ea73e7d805ac8e7191d58d2147651b
tree5f42146f266f0bc72d84e88992cc1773c7532b9f
parentcb6bc5f380220696afd38a71e7d4ee6cfe8fb2fa
mm,thp,shm: limit gfp mask to no more than specified

Matthew Wilcox pointed out that the i915 driver opportunistically
allocates tmpfs memory, but will happily reclaim some of its pool if no
memory is available.

Make sure the gfp mask used to opportunistically allocate a THP is always
at least as restrictive as the original gfp mask.

Link: https://lkml.kernel.org/r/20201124194925.623931-3-riel@surriel.com
Signed-off-by: Rik van Riel <riel@surriel.com>
Suggested-by: Matthew Wilcox <willy@infradead.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Xu Yu <xuyu@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shmem.c