| From eb69e7d13d7794afd530914aac567b83f3ab1507 Mon Sep 17 00:00:00 2001 |
| From: Tzung-Bi Shih <tzungbi@chromium.org> |
| Date: Thu, 13 Jul 2023 10:21:23 +0800 |
| Subject: [PATCH] FIXUP: CHROMIUM: Reland of add implementation of MGLRU in |
| sysfs |
| |
| The commit title should revise to "CHROMIUM: Add implementation |
| of MGLRU in sysfs". |
| |
| Don't need to declare `run_aging` and `run_eviction` forward. Remove |
| them. |
| |
| Also move forward declaration `run_cmd` just before where it uses to |
| make the intent clear. |
| |
| BUG=b:291009612 |
| TEST=for arch in amd64-generic arm64-generic arm-generic; do \ |
| USE=buildtest emerge-"${arch}" chromeos-kernel-6_1; \ |
| done |
| |
| Change-Id: I0674eb39ab39274a8319a9ffab11ea853db50e1b |
| Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> |
| Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4680852 |
| Reviewed-by: Guenter Roeck <groeck@chromium.org> |
| --- |
| mm/vmscan.c | 12 +++--------- |
| 1 file changed, 3 insertions(+), 9 deletions(-) |
| |
| diff --git a/mm/vmscan.c b/mm/vmscan.c |
| index e05daf3ec4ee461010525197caa9188cd2158d20..7b742c4587677ed0955f0f93c74251040d90727e 100644 |
| --- a/mm/vmscan.c |
| +++ b/mm/vmscan.c |
| @@ -5891,15 +5891,6 @@ static void lru_gen_change_state(bool enabled) |
| * sysfs interface |
| ******************************************************************************/ |
| |
| -static int run_aging(struct lruvec *lruvec, unsigned long seq, struct scan_control *sc, |
| - bool can_swap, bool force_scan); |
| - |
| -static int run_eviction(struct lruvec *lruvec, unsigned long seq, struct scan_control *sc, |
| - int swappiness, unsigned long nr_to_reclaim); |
| - |
| -static int run_cmd(char cmd, int memcg_id, int nid, unsigned long seq, |
| - struct scan_control *sc, int swappiness, unsigned long opt); |
| - |
| static ssize_t min_ttl_ms_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) |
| { |
| return sysfs_emit(buf, "%u\n", jiffies_to_msecs(READ_ONCE(lru_gen_min_ttl))); |
| @@ -6061,6 +6052,9 @@ static ssize_t show_lru_gen_admin(struct kobject *kobj, struct kobj_attribute *a |
| return buf_len; |
| } |
| |
| +static int run_cmd(char cmd, int memcg_id, int nid, unsigned long seq, |
| + struct scan_control *sc, int swappiness, unsigned long opt); |
| + |
| static ssize_t store_lru_gen_admin(struct kobject *kobj, struct kobj_attribute *attr, |
| const char *src, size_t len) |
| { |
| -- |
| 2.34.1 |
| |