+ zsmalloc-implement-writeback-mechanism-for-zsmalloc-fix.patch added to mm-unstable branch

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

 



The patch titled
     Subject: zsmalloc: implement writeback mechanism for zsmalloc (fix)
has been added to the -mm mm-unstable branch.  Its filename is
     zsmalloc-implement-writeback-mechanism-for-zsmalloc-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zsmalloc-implement-writeback-mechanism-for-zsmalloc-fix.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Nhat Pham <nphamcs@xxxxxxxxx>
Subject: zsmalloc: implement writeback mechanism for zsmalloc (fix)
Date: Wed, 23 Nov 2022 11:17:03 -0800

Use get_first_page(), and add cond_resched() in retry loop.

Link: https://lkml.kernel.org/r/20221123191703.2902079-3-nphamcs@xxxxxxxxx
Signed-off-by: Nhat Pham <nphamcs@xxxxxxxxx>
Suggested-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/zsmalloc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/mm/zsmalloc.c~zsmalloc-implement-writeback-mechanism-for-zsmalloc-fix
+++ a/mm/zsmalloc.c
@@ -2509,12 +2509,13 @@ static int zs_reclaim_page(struct zs_poo
 		remove_zspage(class, zspage, fullness);
 
 		spin_unlock(&pool->lock);
+		cond_resched();
 
 		/* Lock backing pages into place */
 		lock_zspage(zspage);
 
 		obj_idx = 0;
-		page = zspage->first_page;
+		page = get_first_page(zspage);
 		while (1) {
 			handle = find_alloced_obj(class, page, &obj_idx);
 			if (!handle) {
_

Patches currently in -mm which might be from nphamcs@xxxxxxxxx are

zsmalloc-consolidate-zs_pools-migrate_lock-and-size_classs-locks.patch
zsmalloc-add-a-lru-to-zs_pool-to-keep-track-of-zspages-in-lru-order.patch
zsmalloc-add-a-lru-to-zs_pool-to-keep-track-of-zspages-in-lru-order-fix.patch
zsmalloc-add-zpool_ops-field-to-zs_pool-to-store-evict-handlers.patch
zsmalloc-implement-writeback-mechanism-for-zsmalloc.patch
zsmalloc-implement-writeback-mechanism-for-zsmalloc-fix.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