Skip to content

Instantly share code, notes, and snippets.

From e75fa7b22e766aa6c7b87aecb30d552fb1d2b386 Mon Sep 17 00:00:00 2001
From: Yafang Shao <[email protected]>
Date: Mon, 16 Dec 2019 05:09:31 -0500
Subject: [PATCH 2/5] mm, memcg: introduce MEMCG_PROT_SKIP for memcg zero usage
case
If the usage of a memcg is zero, we don't need to do useless work to scan
it. That is a minor optimization.
Cc: Roman Gushchin <[email protected]>
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9b3c5df75..16fc88b3f 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -416,6 +416,8 @@ struct address_space {
unsigned long nrpages; /* number of total pages */
/* number of shadow or DAX exceptional entries */
unsigned long nrexceptional;
+ unsigned long nractive;
+ unsigned long nrinactive;
Subject: [PATCH 1/1] mm, fadvise: improve the expensive remote LRU cache
draining after FADV_DONTNEED
Our users reported that there're some random latency spikes when their RT
process is running. Finally we found that latency spike is caused by
FADV_DONTNEED. Which may call lru_add_drain_all() to drain LRU cache on
remote CPUs, and then waits the per-cpu work to complete. The wait time
is uncertain, which may be tens millisecond.
That behavior is unreasonable, because this process is bound to a
specific CPU and the file is only accessed by itself, IOW, there should
@laoar
laoar / 拼多多内推.md
Created March 1, 2025 13:21
校招内推