Skip to contentSkip to conversation

mm-page_alloc-correct-return-value-of-populated-elements-if-bulk-array-is-populated.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 6, 2021 Stable branch

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/page_alloc: correct return value of populated elements if bulk array is populated
has been removed from the -mm tree. Its filename was
mm-page_alloc-correct-return-value-of-populated-elements-if-bulk-array-is-populated.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Mel Gorman <[email protected]>
Subject: mm/page_alloc: correct return value of populated elements if bulk array is populated

Dave Jones reported the following

This made it into 5.13 final, and completely breaks NFSD for me (Serving tcp v3 mounts). Existing mounts on clients hang, as do new mounts from new clients. Rebooting the server back to rc7 everything recovers.

The commit b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after checking populated elements") returns the wrong value if the array is already populated which is interpreted as an allocation failure. Dave reported this fixes his problem and it also passed a test running dbench over NFS.

Fixes b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after checking populated elements")
Cc Dan Carpenter <[email protected]>
Cc Jesper Dangaard Brouer <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc <[email protected]> [5.13+]

---

 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_alloc.c renamed from mm/page_alloc.c~mm-page_alloc-correct-return-value-of-populated-elements-if-bulk-array-is-populated +1 -1
@@ -5058,7 +5058,7 @@ unsigned long __alloc_pages_bulk(gfp_t g
 
 	/* Already populated array? */
 	if (unlikely(page_array && nr_pages - nr_populated == 0))
-		return 0;
+		return nr_populated;
 
 	/* Use the single page allocator for one page. */
 	if (nr_pages - nr_populated == 1)

_

Patches currently in -mm which might be from [email protected] are