diff mbox

[14/14] sh: Don't allocate smaller sized mappings on every iteration

Message ID 09b3f0f688064534368f251eac86dc5b0afbc7a1.1254861984.git.matt@console-pimps.org (mailing list archive)
State Accepted
Headers show

Commit Message

Matt Fleming Oct. 6, 2009, 9:22 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index f821c2e..280f6a1 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -214,6 +214,13 @@  again:
 			pmbp->link = pmbe;
 
 		pmbp = pmbe;
+
+		/*
+		 * Instead of trying smaller sizes on every iteration
+		 * (even if we succeed in allocating space), try using
+		 * pmb_sizes[i].size again.
+		 */
+		i--;
 	}
 
 	if (size >= 0x1000000)