Patch "zram: clear IDLE flag in mark_idle()" has been added to the 6.6-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    zram: clear IDLE flag in mark_idle()

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     zram-clear-idle-flag-in-mark_idle.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 178d758702e06a3b8f11c5b61839c900d0ac1356
Author: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
Date:   Tue Oct 29 00:36:15 2024 +0900

    zram: clear IDLE flag in mark_idle()
    
    [ Upstream commit d37da422edb0664a2037e6d7d42fe6d339aae78a ]
    
    If entry does not fulfill current mark_idle() parameters, e.g.  cutoff
    time, then we should clear its ZRAM_IDLE from previous mark_idle()
    invocations.
    
    Consider the following case:
    - mark_idle() cutoff time 8h
    - mark_idle() cutoff time 4h
    - writeback() idle - will writeback entries with cutoff time 8h,
      while it should only pick entries with cutoff time 4h
    
    The bug was reported by Shin Kawamura.
    
    Link: https://lkml.kernel.org/r/20241028153629.1479791-3-senozhatsky@xxxxxxxxxxxx
    Fixes: 755804d16965 ("zram: introduce an aged idle interface")
    Signed-off-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
    Reported-by: Shin Kawamura <kawasin@xxxxxxxxxx>
    Acked-by: Brian Geffon <bgeffon@xxxxxxxxxx>
    Cc: Minchan Kim <minchan@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Cc: <stable@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index e05eace18cc47..27f9ae16a7282 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -319,6 +319,8 @@ static void mark_idle(struct zram *zram, ktime_t cutoff)
 #endif
 		if (is_idle)
 			zram_set_flag(zram, index, ZRAM_IDLE);
+		else
+			zram_clear_flag(zram, index, ZRAM_IDLE);
 		zram_slot_unlock(zram, index);
 	}
 }




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux