mm: ptl is not bloated if it fits in pointer

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

 



It's silly to force the 64-bit CONFIG_GENERIC_LOCKBREAK architectures
to kmalloc eight bytes for an indirect page table lock: the lock needs
to fit in the space that a pointer to it would occupy, not into an int.

Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx>
---

 kernel/bounds.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 3.13-rc4/kernel/bounds.c	2013-11-22 15:40:37.452192638 -0800
+++ linux/kernel/bounds.c	2013-12-15 14:34:36.304485959 -0800
@@ -22,6 +22,6 @@ void foo(void)
 #ifdef CONFIG_SMP
 	DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS));
 #endif
-	DEFINE(BLOATED_SPINLOCKS, sizeof(spinlock_t) > sizeof(int));
+	DEFINE(BLOATED_SPINLOCKS, sizeof(spinlock_t) > sizeof(spinlock_t *));
 	/* End of constants */
 }

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]