linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] mm/damon: fixes for the jiffies-related issues
@ 2025-10-30  2:07 Quanmin Yan
  2025-10-30  2:07 ` [PATCH v2 1/2] mm/damon/stat: change last_refresh_jiffies to a global variable Quanmin Yan
  2025-10-30  2:07 ` [PATCH v2 2/2] mm/damon/sysfs: change next_update_jiffies " Quanmin Yan
  0 siblings, 2 replies; 5+ messages in thread
From: Quanmin Yan @ 2025-10-30  2:07 UTC (permalink / raw)
  To: sj
  Cc: akpm, damon, linux-kernel, linux-mm, yanquanmin1,
	wangkefeng.wang, zuoze1

On 32-bit systems, the kernel initializes jiffies to "-5 minutes" to
make jiffies wrap bugs appear earlier. However, this may cause the
time_before() series of functions to return unexpected values, resulting
in DAMON not functioning as intended. Meanwhile, similar issues exist
in some specific user operation scenarios.

This patchset addresses these issues. The first patch is about the
DAMON_STAT module, and the second patch is about the core layer's sysfs.

Changes from v1
(https://lore.kernel.org/all/20251028061927.1378746-1-yanquanmin1@huawei.com/)
- Added commit information describing another similar issue. (found by SJ)
- Making last_refresh_jiffies a global variable and initialize it on
  damon_stat_start(). (suggested by SJ)
- Added a new patch that fixes the same root cause issue in the core
  layer's sysfs. (found and suggested by SJ)

Quanmin Yan (2):
  mm/damon/stat: change last_refresh_jiffies to a global variable
  mm/damon/sysfs: change next_update_jiffies to a global variable

 mm/damon/stat.c  |  9 ++++++---
 mm/damon/sysfs.c | 10 +++++++---
 2 files changed, 13 insertions(+), 6 deletions(-)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-30 14:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-30  2:07 [PATCH v2 0/2] mm/damon: fixes for the jiffies-related issues Quanmin Yan
2025-10-30  2:07 ` [PATCH v2 1/2] mm/damon/stat: change last_refresh_jiffies to a global variable Quanmin Yan
2025-10-30 14:31   ` SeongJae Park
2025-10-30  2:07 ` [PATCH v2 2/2] mm/damon/sysfs: change next_update_jiffies " Quanmin Yan
2025-10-30 14:32   ` SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox