+ mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node-v2.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-v2.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-v2.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node-v2.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: zhongjiang <zhongjiang@xxxxxxxxxx>
Subject: mm,ksm: add __GFP_HIGH to the allocation in alloc_stable_node()


According to HUgh's suggestion, alloc_stable_node() with GFP_KERNEL
will cause the hungtask, despite less possiblity.

At present, if alloc_stable_node allocate fails, two break_cow 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 the __GFP_HIGH to GFP. because it grant access to
some of meory reserves. it will make progress to make it allocation
successful at the utmost.

Link: http://lkml.kernel.org/r/1475070362-44469-1-git-send-email-zhongjiang@xxxxxxxxxx
Acked-by: Hugh Dickins <hughd@xxxxxxxxxx>
Suggested-by: Hugh Dickins <hughd@xxxxxxxxxx>
Signed-off-by: zhong jiang <zhongjiang@xxxxxxxxxx>
---
 1 file changed, 8 insertions(+), 1 deletion(-)

index 5048083..5e98c0b 100644
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/ksm.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff -puN mm/ksm.c~mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node-v2 mm/ksm.c
--- a/mm/ksm.c~mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node-v2
+++ a/mm/ksm.c
@@ -299,6 +299,13 @@ static inline void free_rmap_item(struct
 
 static inline struct stable_node *alloc_stable_node(void)
 {
+	/*
+	 * The caller can take too long time with GFP_KERNEL when memory
+	 * is under pressure, it may be lead to the hung task. Therefore,
+	 * Adding the __GFP_HIGH to this. it grant access to some of
+	 * memory reserves. and it will make progress to make it allocation
+	 * successful at the utmost.
+	 */
 	return kmem_cache_alloc(stable_node_cache, GFP_KERNEL | __GFP_HIGH);
 }
 
_

Patches currently in -mm which might be from zhongjiang@xxxxxxxxxx are

mmksm-fix-endless-looping-in-allocating-memory-when-ksm-enable.patch
mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node.patch
mmksm-add-__gfp_high-to-the-allocation-in-alloc_stable_node-v2.patch
mm-page_owner-align-with-pageblock_nr-pages.patch
mm-walk-the-zone-in-pageblock_nr_pages-steps.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]
  Powered by Linux