Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1437586

Re: [PATCH 31/31] mm, vmstat: Remove zone and node double accounting by approximating retries

From Mel Gorman <mgorman@techsingularity.net>
Newsgroups linux.kernel
Subject Re: [PATCH 31/31] mm, vmstat: Remove zone and node double accounting by approximating retries
Date 2016-07-06 11:40 +0200
Message-ID <rRRtf-7s1-3@gated-at.bofh.it> (permalink)
References <rQcVb-2Ax-3@gated-at.bofh.it> <rQcVd-2Ax-81@gated-at.bofh.it> <rRIzD-1GV-5@gated-at.bofh.it> <rRQQx-6Wm-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jul 06, 2016 at 09:58:50AM +0100, Mel Gorman wrote:
> On Wed, Jul 06, 2016 at 09:02:52AM +0900, Minchan Kim wrote:
> > On Fri, Jul 01, 2016 at 09:01:39PM +0100, Mel Gorman wrote:
> > > The number of LRU pages, dirty pages and writeback pages must be accounted
> > > for on both zones and nodes because of the reclaim retry logic, compaction
> > > retry logic and highmem calculations all depending on per-zone stats.
> > > 
> > > The retry logic is only critical for allocations that can use any zones.
> > 
> > Sorry, I cannot follow this assertion.
> > Could you explain?
> > 
> 
> The patch has been reworked since and I tried clarifying the changelog.
> Does this help?
> 

It occurred to me at breakfast that this should be more consistent with
the OOM killer on both 32-bit and 64-bit so;

diff --git a/mm/compaction.c b/mm/compaction.c
index dfe7dafe8e8b..640532831b94 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1448,11 +1448,9 @@ bool compaction_zonelist_suitable(struct alloc_context *ac, int order,
 	struct zoneref *z;
 	pg_data_t *last_pgdat = NULL;
 
-#ifdef CONFIG_HIGHMEM
 	/* Do not retry compaction for zone-constrained allocations */
-	if (!is_highmem_idx(ac->high_zoneidx))
+	if (ac->high_zoneidx < ZONE_NORMAL)
 		return false;
-#endif
 
 	/*
 	 * Make sure at least one zone would pass __compaction_suitable if we continue
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ded48e580abc..194a8162528b 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3455,11 +3455,11 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order,
 		return false;
 
 	/*
-	 * Blindly retry allocation requests that cannot use all zones. We do
-	 * not have a reliable and fast means of calculating reclaimable, dirty
-	 * and writeback pages in eligible zones.
+	 * Blindly retry lowmem allocation requests that are often ignored by
+	 * the OOM killer as we not have a reliable and fast means of
+	 * calculating reclaimable, dirty and writeback pages in eligible zones.
 	 */
-	if (IS_ENABLED(CONFIG_HIGHMEM) && !is_highmem_idx(gfp_zone(gfp_mask)))
+	if (ac->high_zoneidx < ZONE_NORMAL)
 		goto out;
 
 	/*

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 31/31] mm, vmstat: Remove zone and node double accounting by approximating retries Mel Gorman <mgorman@techsingularity.net> - 2016-07-01 22:10 +0200
  Re: [PATCH 31/31] mm, vmstat: Remove zone and node double accounting  by approximating retries Minchan Kim <minchan@kernel.org> - 2016-07-06 02:10 +0200
    Re: [PATCH 31/31] mm, vmstat: Remove zone and node double accounting  by approximating retries Mel Gorman <mgorman@techsingularity.net> - 2016-07-06 11:00 +0200
      Re: [PATCH 31/31] mm, vmstat: Remove zone and node double accounting  by approximating retries Mel Gorman <mgorman@techsingularity.net> - 2016-07-06 11:40 +0200
      Re: [PATCH 31/31] mm, vmstat: Remove zone and node double accounting  by approximating retries Minchan Kim <minchan@kernel.org> - 2016-07-07 08:50 +0200
  Re: [PATCH 31/31] mm, vmstat: Remove zone and node double accounting  by approximating retries Dave Hansen <dave.hansen@intel.com> - 2016-07-06 20:20 +0200
    Re: [PATCH 31/31] mm, vmstat: Remove zone and node double accounting  by approximating retries Mel Gorman <mgorman@techsingularity.net> - 2016-07-07 13:30 +0200

csiph-web