[alternative-merged] mm-disable-zsmalloc-on-preempt_rt.patch removed from -mm tree

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

 



The patch titled
     Subject: mm: disable zsmalloc on PREEMPT_RT
has been removed from the -mm tree.  Its filename was
     mm-disable-zsmalloc-on-preempt_rt.patch

This patch was dropped because an alternative patch was merged

------------------------------------------------------
From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Subject: mm: disable zsmalloc on PREEMPT_RT

For efficiency reasons, zsmalloc is using a slim `handle'.  The value is
the address of a memory allocation of 4 or 8 bytes depending on the size
of the long data type.  The lowest bit in that allocated memory is used as
a bit spin lock.

The usage of the bit spin lock is problematic because with the bit spin
lock held zsmalloc acquires a rwlock_t and spinlock_t which are both
sleeping locks on PREEMPT_RT and therefore must not be acquired with
disabled preemption.

There is a patch which extends the handle on PREEMPT_RT so that a full
spinlock_t fits (even with lockdep enabled) and then eliminates the bit
spin lock.  I'm not sure how sensible zsmalloc on PREEMPT_RT is given that
it is used to store compressed user memory.

Disable ZSMALLOC on PREEMPT_RT. If there is need for it, we can try to
get it to work.

Link: https://lkml.kernel.org/r/20210923170121.1860133-1-bigeasy@xxxxxxxxxxxxx
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/mm/Kconfig~mm-disable-zsmalloc-on-preempt_rt
+++ a/mm/Kconfig
@@ -636,6 +636,7 @@ config ZSWAP_ZPOOL_DEFAULT_Z3FOLD
 
 config ZSWAP_ZPOOL_DEFAULT_ZSMALLOC
 	bool "zsmalloc"
+	depends on !PREEMPT_RT
 	select ZSMALLOC
 	help
 	  Use the zsmalloc allocator as the default allocator.
@@ -686,7 +687,7 @@ config Z3FOLD
 
 config ZSMALLOC
 	tristate "Memory allocator for compressed pages"
-	depends on MMU
+	depends on MMU && !PREEMPT_RT
 	help
 	  zsmalloc is a slab-based memory allocator designed to store
 	  compressed RAM pages.  zsmalloc uses virtual memory mapping
_

Patches currently in -mm which might be from bigeasy@xxxxxxxxxxxxx are

mm-disable-numa_balancing_default_enabled-and-transparent_hugepage-on-preempt_rt.patch
mm-page_alloc-use-migrate_disable-in-drain_local_pages_wq.patch




[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