* + mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node.patch added to -mm tree
@ 2016-09-20 21:06 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-09-20 21:06 UTC (permalink / raw)
To: zhongjiang, hughd, mm-commits
The patch titled
Subject: mm,ksm: add __GFP_HIGH to the allocation in alloc_stable_node()
has been added to the -mm tree. Its filename is
mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: zhong jiang <zhongjiang@huawei.com>
Subject: mm,ksm: add __GFP_HIGH to the allocation in alloc_stable_node()
According to Hugh's suggestion, alloc_stable_node() with GFP_KERNEL can in
rare cases cause a hung task warning.
At present, if alloc_stable_node() allocation fails, two break_cows may
want to allocate a couple of pages, and the issue will come up when free
memory is under pressure.
We fix it by adding __GFP_HIGH to GFP, to grant access to memory reserves,
increasing the likelihood of allocation success.
Suggested-by: Hugh Dickins <hughd@google.com>
Link: http://lkml.kernel.org/r/1474354484-58233-1-git-send-email-zhongjiang@huawei.com
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/ksm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN mm/ksm.c~mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node mm/ksm.c
--- a/mm/ksm.c~mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node
+++ a/mm/ksm.c
@@ -299,7 +299,7 @@ static inline void free_rmap_item(struct
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_KERNEL | __GFP_HIGH);
}
static inline void free_stable_node(struct stable_node *stable_node)
_
Patches currently in -mm which might be from zhongjiang@huawei.com are
mmksm-fix-endless-looping-in-allocating-memory-when-ksm-enable.patch
mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node.patch
mm-page_owner-align-with-pageblock_nr-pages.patch
mm-walk-the-zone-in-pageblock_nr_pages-steps.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-20 21:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-20 21:06 + mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).