* + zram-introduce-an-aged-idle-interface-v6.patch added to -mm tree
@ 2021-09-29 23:43 akpm
2021-09-30 0:34 ` Sergey Senozhatsky
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2021-09-29 23:43 UTC (permalink / raw)
To: bgeffon, minchan, mm-commits, senozhatsky
The patch titled
Subject: zram: Introduce an aged idle interface
has been added to the -mm tree. Its filename is
zram-introduce-an-aged-idle-interface-v6.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/zram-introduce-an-aged-idle-interface-v6.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/zram-introduce-an-aged-idle-interface-v6.patch
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 and is updated
there every 3-4 working days
------------------------------------------------------
From: Brian Geffon <bgeffon@google.com>
Subject: zram: Introduce an aged idle interface
Sergey's cleanup suggestions
Link: https://lkml.kernel.org/r/20210929143056.13067-1-bgeffon@google.com
Signed-off-by: Brian Geffon <bgeffon@google.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/block/zram/zram_drv.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/block/zram/zram_drv.c~zram-introduce-an-aged-idle-interface-v6
+++ a/drivers/block/zram/zram_drv.c
@@ -310,7 +310,7 @@ static void mark_idle(struct zram *zram,
if (zram_allocated(zram, index) &&
!zram_test_flag(zram, index, ZRAM_UNDER_WB)) {
#ifdef CONFIG_ZRAM_MEMORY_TRACKING
- is_idle = (!cutoff || ktime_after(cutoff, zram->table[index].ac_time));
+ is_idle = !cutoff || ktime_after(cutoff, zram->table[index].ac_time);
#endif
if (is_idle)
zram_set_flag(zram, index, ZRAM_IDLE);
@@ -332,6 +332,7 @@ static ssize_t idle_store(struct device
* we have memory tracking enabled.
*/
u64 age_sec;
+
if (IS_ENABLED(CONFIG_ZRAM_MEMORY_TRACKING) && !kstrtoull(buf, 0, &age_sec))
cutoff_time = ktime_sub(ktime_get_boottime(),
ns_to_ktime(age_sec * NSEC_PER_SEC));
@@ -343,7 +344,7 @@ static ssize_t idle_store(struct device
if (!init_done(zram))
goto out_unlock;
- /* A age_sec of 0 marks everything as idle, this is the "all" behavior */
+ /* A cutoff_time of 0 marks everything as idle, this is the "all" behavior */
mark_idle(zram, cutoff_time);
rv = len;
_
Patches currently in -mm which might be from bgeffon@google.com are
zram-introduce-an-aged-idle-interface.patch
zram-introduce-an-aged-idle-interface-v5.patch
zram-introduce-an-aged-idle-interface-v6.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: + zram-introduce-an-aged-idle-interface-v6.patch added to -mm tree
2021-09-29 23:43 + zram-introduce-an-aged-idle-interface-v6.patch added to -mm tree akpm
@ 2021-09-30 0:34 ` Sergey Senozhatsky
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Senozhatsky @ 2021-09-30 0:34 UTC (permalink / raw)
To: akpm; +Cc: bgeffon, minchan, mm-commits, senozhatsky
On (21/09/29 16:43), akpm@linux-foundation.org wrote:
> Sergey's cleanup suggestions
>
> Link: https://lkml.kernel.org/r/20210929143056.13067-1-bgeffon@google.com
> Signed-off-by: Brian Geffon <bgeffon@google.com>
> Acked-by: Minchan Kim <minchan@kernel.org>
> Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-30 0:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29 23:43 + zram-introduce-an-aged-idle-interface-v6.patch added to -mm tree akpm
2021-09-30 0:34 ` Sergey Senozhatsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.