From patchwork Wed Dec 20 15:26:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Schatzberg X-Patchwork-Id: 13500246 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EA6CC3DA6E for ; Wed, 20 Dec 2023 15:27:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D595A8D0003; Wed, 20 Dec 2023 10:27:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CE7AB8D0001; Wed, 20 Dec 2023 10:27:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B11058D0003; Wed, 20 Dec 2023 10:27:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 981B68D0001 for ; Wed, 20 Dec 2023 10:27:15 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 62E2FA2160 for ; Wed, 20 Dec 2023 15:27:15 +0000 (UTC) X-FDA: 81587575230.29.2D7396B Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) by imf12.hostedemail.com (Postfix) with ESMTP id 873424001E for ; Wed, 20 Dec 2023 15:27:13 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EUo+yVFo; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf12.hostedemail.com: domain of schatzberg.dan@gmail.com designates 209.85.219.48 as permitted sender) smtp.mailfrom=schatzberg.dan@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1703086033; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=GGeG3BQJs8KXUJq1DB8Qp/yk33MHWE5qrkTbzfRxpso=; b=J5H4OSdywaW5H8zzPVSuEWF/XBumQ5p3h+cy5kUNF+lMGzrsoEcU7JXPljNAUy1GN3kB7K v0jWjJIwsgZ4uPIbvxgb+2tjxBUSM03O5/VdByACxwv1Lyu92BZ98YNE17ELEKZGP1EcKW QwlomqaZzmOy/M+vRkGmFmLIYophn6w= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=EUo+yVFo; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf12.hostedemail.com: domain of schatzberg.dan@gmail.com designates 209.85.219.48 as permitted sender) smtp.mailfrom=schatzberg.dan@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1703086033; a=rsa-sha256; cv=none; b=kd7n2NZAWlnp+NDthNXxj9eoKNGjnaH1gHgVxp5SOCdl0ld4DI/7LQZnQhB8qZwjBaUlmI lMQCUZtzCtx/lwfAb6+QLOozimu/j+kL4+gu9YqUOv5Pi8hw/cpVdkZpY28Fed63eW/bwX MVzTbndirTIctsrh34l2sRYunHP84gI= Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-67f6729a57fso6623766d6.1 for ; Wed, 20 Dec 2023 07:27:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703086032; x=1703690832; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GGeG3BQJs8KXUJq1DB8Qp/yk33MHWE5qrkTbzfRxpso=; b=EUo+yVFo26Jlb6w6CSQ7cjK8qb7U0fuN4FcuHIfphWRxJ8fsoSBTi6M8h8qKYXgb8e a9gXmwXLPWwFmIquFyOaNVzrMIGXebmkzne180sJH8neK1zq2mzj+3n2ngUaGW2uohlp bHG8owiIQA87fLucUVqBnqUBK26ZEiy/AUMEaHRRnmwLDkZJiChorVWxBL5ku2jNlJ9V K9yY0a7jVIo4ZApZvpznELZM13Wqu80Tn6qI+AakBjWHcPn7iQMnv/AGVPVFPVC5KQjF IHuY5zcl4jOehJI+XjTHdfOIoiWf6QZ5Zm+G1KNM1jAzhwhxJrmiBeMuRCK5y+tbw0h/ eVTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703086032; x=1703690832; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GGeG3BQJs8KXUJq1DB8Qp/yk33MHWE5qrkTbzfRxpso=; b=oZt0xNQ0wgMigEmy8wPH/gGzXaQOXEjpy7TsJ9lYSKz97hIl2Rmvi2+kBo4Uh3M3XL dboz+V7qJhxTmyvKF/APxDCcFSfZP4P3RghkjZRTsBhVBtA2aP/CGvf71WwuTp6l/Mn2 LSfNb8CnR30TYtZxnWlfuNzngittD9nWjacd/hl4HqU52eYyG6b78AZ2yrGBwNy8JlaD YwG7mj22EqFBZzN4ZKhyOYImwUaR0lomUkEjWmYlt/IBnAh64IAyEwaaD2pKkgjnk7T7 nGeXZw7x3HULNLq0L4Sokgww9GbmjaxdX2jZwt0hhHAYKjpTaBY8QzCzYnJGLzEX2AgF IwTQ== X-Gm-Message-State: AOJu0Yx0QRPycIwnhpuhctjNPNxA66CWvCnLMctIA7Nx23erKwkK3Kp3 6pyGgI9tq6Q4A2d05tPdMjL+h4jVii6siA== X-Google-Smtp-Source: AGHT+IEzkCtuXKrCGnKuBmzDm+mPo6Gt/cgqwgYPQEwzS5DMjQVntJCFa2a9HakWaD1ykKsbxKhg2A== X-Received: by 2002:a05:6214:1d0a:b0:67f:4c93:6f16 with SMTP id e10-20020a0562141d0a00b0067f4c936f16mr4682609qvd.27.1703086032331; Wed, 20 Dec 2023 07:27:12 -0800 (PST) Received: from localhost ([2620:10d:c091:400::5:1124]) by smtp.gmail.com with ESMTPSA id m14-20020a0ce8ce000000b0067f19f17629sm4991299qvo.82.2023.12.20.07.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:27:12 -0800 (PST) From: Dan Schatzberg To: Johannes Weiner , Roman Gushchin , Yosry Ahmed , Huan Yang Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Tejun Heo , Zefan Li , Jonathan Corbet , Michal Hocko , Shakeel Butt , Muchun Song , Andrew Morton , Kefeng Wang , SeongJae Park , "Vishal Moola (Oracle)" , Nhat Pham , Yue Zhao Subject: [PATCH v5 2/2] mm: add swapiness= arg to memory.reclaim Date: Wed, 20 Dec 2023 07:26:51 -0800 Message-Id: <20231220152653.3273778-3-schatzberg.dan@gmail.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231220152653.3273778-1-schatzberg.dan@gmail.com> References: <20231220152653.3273778-1-schatzberg.dan@gmail.com> MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: eyhka95meu31gsmu9hxuu9ceq6bercui X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 873424001E X-HE-Tag: 1703086033-909464 X-HE-Meta: U2FsdGVkX182tVSFO6aShtjjBHyu8XDlH1yVS1AEFE8ZZ4BCbwsT7KIUWNJ9iEnb+bK6ckYyj7OVTk1ZelVJud1UMYoBOBchsy+x9hKu53CSUBsM4q/VVnHVw4X93Uk8mWItxwKr4XWrF5hU52So7hUklTdvPM+ZznVV5ab107mUL6kuDM9HhmxcOzSTukACrJUsDS23Ow7hg6UJnurydxcJQZP7kWpu+MkgUswd6vRf+QCYhOHP6H82NrRWpfz4/ZQ40ndVCCLXkvhUm+EpPyK0JI8oxfgmjESjfVycClGKQWZNyDzsLmc0lvq1ywfzHpMDvFkaIo2UnnGd4u32ld/VDIu6/aCXx9vcKd11lo9utnNiBEefM1ft4V98wD6SWB3th9Rykmbyrbs9Ju0FH8U44J9KR4qnpTMo1CRN9q+ww6cZITfQ0Ye6LdVeMK0RyUFl+einM3ypMqU8DvT1DSS95fqiotg50JDaC92P9osdTrIsxZ9Yg8dmcIROI60p6RSD9GjZXRaC9YZ/pKbzMH9Nv6ygNXfFkaDtcdCwJ/j7Kz85QTL3039s/WOkO6Xo/cCbbijvWe2jrxRUCtNIuStkrgO/HpK5vPtk9MpBNH4LAOxjEMZV9ThB28051AGYxJjX+NIE3xEAOJhMfA3ueR21PgzO42H8gms2U48ln+llnDUWrgtBVVSYDid3n6jF8FWfNJdSos/gA8T7ZQqFVWz5kxgK0/og+x+1Nk5FQCrCW3ssfcjemEh4jQ704kdkzjHaMynciTOArPVFgMOtmZPTMPnE6H4du9RutnMnJ3P+LMXB+/CctxTvUd3Uz5x9tXkzIK2YXEc2GTDiqC2+sUV+ogJaBqx+keFg81ybjdaMttbhnCXtjjbWBXJ4g7vD4Agk/oueMbtUCfhF5I+bPpBn0W0To9ZGejgBTRRjNSNFyG1erqVzPrqtU4rKaKMKCNi7aqX9ZmBaBBrCf1D OGBSKIOz QuPtSkou54ZYeAc5tOMrdsculi/xAVMNg+K1tUAVcV8t4eP6xCJ0ss8TGyz3HHko9O0C9SPZWk5DB8t1mprY/cAkx6Uys8M3U1pPiXaJJEGLgkyacxfcexGnbiruKymwHBOZwoZxiuNNbFWyQ8NQZqUGcLoJKYuziZK9RSWJ5xC1jFVZfmQYpgfL+nPIEKgEL4GBaB4aloccI4TI9vjLmNZ1D/B285O3U8BCTpEvvHRgPCZOXSfODmJG5ZIc3Rdl1vZ3bdI93wOv106z/0/QmP8MzB5sFrqIgR4K9ZxHxl2voxQk9+ew2Tkr9/P7r3Krv/SaIsqs16L/Gpd2jHgMB7HTdvzGWG0kTHse/Yk+cL30L4hr8lxVnQCh9hmYeIzim6ORzjZnayuQ/LI5nUS6m82N5LWWusCGhooDQg3reViED3W5BW5jIdKG5KT3MZvckFoGQoVuoleqo3TCgTpvyLK/DpWiTYV4xxnoexywEgCCadNbTtgE6NrpGvQpXLr5EeoJd7FkpYYVDdj621vlFJ0B5tjmg4SWVP0/IVP+UYZ2BR5954dJTorJJoQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Allow proactive reclaimers to submit an additional swappiness= argument to memory.reclaim. This overrides the global or per-memcg swappiness setting for that reclaim attempt. For example: echo "2M swappiness=0" > /sys/fs/cgroup/memory.reclaim will perform reclaim on the rootcg with a swappiness setting of 0 (no swap) regardless of the vm.swappiness sysctl setting. Userspace proactive reclaimers use the memory.reclaim interface to trigger reclaim. The memory.reclaim interface does not allow for any way to effect the balance of file vs anon during proactive reclaim. The only approach is to adjust the vm.swappiness setting. However, there are a few reasons we look to control the balance of file vs anon during proactive reclaim, separately from reactive reclaim: * Swapout should be limited to manage SSD write endurance. In near-OOM situations we are fine with lots of swap-out to avoid OOMs. As these are typically rare events, they have relatively little impact on write endurance. However, proactive reclaim runs continuously and so its impact on SSD write endurance is more significant. Therefore it is desireable to control swap-out for proactive reclaim separately from reactive reclaim * Some userspace OOM killers like systemd-oomd[1] support OOM killing on swap exhaustion. This makes sense if the swap exhaustion is triggered due to reactive reclaim but less so if it is triggered due to proactive reclaim (e.g. one could see OOMs when free memory is ample but anon is just particularly cold). Therefore, it's desireable to have proactive reclaim reduce or stop swap-out before the threshold at which OOM killing occurs. In the case of Meta's Senpai proactive reclaimer, we adjust vm.swappiness before writes to memory.reclaim[2]. This has been in production for nearly two years and has addressed our needs to control proactive vs reactive reclaim behavior but is still not ideal for a number of reasons: * vm.swappiness is a global setting, adjusting it can race/interfere with other system administration that wishes to control vm.swappiness. In our case, we need to disable Senpai before adjusting vm.swappiness. * vm.swappiness is stateful - so a crash or restart of Senpai can leave a misconfigured setting. This requires some additional management to record the "desired" setting and ensure Senpai always adjusts to it. With this patch, we avoid these downsides of adjusting vm.swappiness globally. [1]https://www.freedesktop.org/software/systemd/man/latest/systemd-oomd.service.html [2]https://github.com/facebookincubator/oomd/blob/main/src/oomd/plugins/Senpai.cpp#L585-L598 Signed-off-by: Dan Schatzberg Acked-by: Michal Hocko Acked-by: Chris Li Reviewed-by: Nhat Pham --- Documentation/admin-guide/cgroup-v2.rst | 18 ++++---- include/linux/swap.h | 3 +- mm/memcontrol.c | 56 ++++++++++++++++++++----- mm/vmscan.c | 13 +++++- 4 files changed, 69 insertions(+), 21 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 3f85254f3cef..ee42f74e0765 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -1282,17 +1282,10 @@ PAGE_SIZE multiple when read back. This is a simple interface to trigger memory reclaim in the target cgroup. - This file accepts a single key, the number of bytes to reclaim. - No nested keys are currently supported. - Example:: echo "1G" > memory.reclaim - The interface can be later extended with nested keys to - configure the reclaim behavior. For example, specify the - type of memory to reclaim from (anon, file, ..). - Please note that the kernel can over or under reclaim from the target cgroup. If less bytes are reclaimed than the specified amount, -EAGAIN is returned. @@ -1304,6 +1297,17 @@ PAGE_SIZE multiple when read back. This means that the networking layer will not adapt based on reclaim induced by memory.reclaim. +The following nested keys are defined. + + ========== ================================ + swappiness Swappiness value to reclaim with + ========== ================================ + + Specifying a swappiness value instructs the kernel to perform + the reclaim with that swappiness value. Note that this has the + same semantics as vm.swappiness applied to memcg reclaim with + all the existing limitations and potential future extensions. + memory.peak A read-only single value file which exists on non-root cgroups. diff --git a/include/linux/swap.h b/include/linux/swap.h index e2ab76c25b4a..8afdec40efe3 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -412,7 +412,8 @@ extern unsigned long try_to_free_pages(struct zonelist *zonelist, int order, extern unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *memcg, unsigned long nr_pages, gfp_t gfp_mask, - unsigned int reclaim_options); + unsigned int reclaim_options, + int *swappiness); extern unsigned long mem_cgroup_shrink_node(struct mem_cgroup *mem, gfp_t gfp_mask, bool noswap, pg_data_t *pgdat, diff --git a/mm/memcontrol.c b/mm/memcontrol.c index fbe9f02dd206..6d627a754851 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -2449,7 +2450,8 @@ static unsigned long reclaim_high(struct mem_cgroup *memcg, psi_memstall_enter(&pflags); nr_reclaimed += try_to_free_mem_cgroup_pages(memcg, nr_pages, gfp_mask, - MEMCG_RECLAIM_MAY_SWAP); + MEMCG_RECLAIM_MAY_SWAP, + NULL); psi_memstall_leave(&pflags); } while ((memcg = parent_mem_cgroup(memcg)) && !mem_cgroup_is_root(memcg)); @@ -2740,7 +2742,7 @@ static int try_charge_memcg(struct mem_cgroup *memcg, gfp_t gfp_mask, psi_memstall_enter(&pflags); nr_reclaimed = try_to_free_mem_cgroup_pages(mem_over_limit, nr_pages, - gfp_mask, reclaim_options); + gfp_mask, reclaim_options, NULL); psi_memstall_leave(&pflags); if (mem_cgroup_margin(mem_over_limit) >= nr_pages) @@ -3660,7 +3662,7 @@ static int mem_cgroup_resize_max(struct mem_cgroup *memcg, } if (!try_to_free_mem_cgroup_pages(memcg, 1, GFP_KERNEL, - memsw ? 0 : MEMCG_RECLAIM_MAY_SWAP)) { + memsw ? 0 : MEMCG_RECLAIM_MAY_SWAP, NULL)) { ret = -EBUSY; break; } @@ -3774,7 +3776,7 @@ static int mem_cgroup_force_empty(struct mem_cgroup *memcg) return -EINTR; if (!try_to_free_mem_cgroup_pages(memcg, 1, GFP_KERNEL, - MEMCG_RECLAIM_MAY_SWAP)) + MEMCG_RECLAIM_MAY_SWAP, NULL)) nr_retries--; } @@ -6720,7 +6722,7 @@ static ssize_t memory_high_write(struct kernfs_open_file *of, } reclaimed = try_to_free_mem_cgroup_pages(memcg, nr_pages - high, - GFP_KERNEL, MEMCG_RECLAIM_MAY_SWAP); + GFP_KERNEL, MEMCG_RECLAIM_MAY_SWAP, NULL); if (!reclaimed && !nr_retries--) break; @@ -6769,7 +6771,7 @@ static ssize_t memory_max_write(struct kernfs_open_file *of, if (nr_reclaims) { if (!try_to_free_mem_cgroup_pages(memcg, nr_pages - max, - GFP_KERNEL, MEMCG_RECLAIM_MAY_SWAP)) + GFP_KERNEL, MEMCG_RECLAIM_MAY_SWAP, NULL)) nr_reclaims--; continue; } @@ -6895,19 +6897,50 @@ static ssize_t memory_oom_group_write(struct kernfs_open_file *of, return nbytes; } +enum { + MEMORY_RECLAIM_SWAPPINESS = 0, + MEMORY_RECLAIM_NULL, +}; + +static const match_table_t tokens = { + { MEMORY_RECLAIM_SWAPPINESS, "swappiness=%d"}, + { MEMORY_RECLAIM_NULL, NULL }, +}; + static ssize_t memory_reclaim(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off) { struct mem_cgroup *memcg = mem_cgroup_from_css(of_css(of)); unsigned int nr_retries = MAX_RECLAIM_RETRIES; unsigned long nr_to_reclaim, nr_reclaimed = 0; + int swappiness = -1; unsigned int reclaim_options; - int err; + char *old_buf, *start; + substring_t args[MAX_OPT_ARGS]; buf = strstrip(buf); - err = page_counter_memparse(buf, "", &nr_to_reclaim); - if (err) - return err; + + old_buf = buf; + nr_to_reclaim = memparse(buf, &buf) / PAGE_SIZE; + if (buf == old_buf) + return -EINVAL; + + buf = strstrip(buf); + + while ((start = strsep(&buf, " ")) != NULL) { + if (!strlen(start)) + continue; + switch (match_token(start, tokens, args)) { + case MEMORY_RECLAIM_SWAPPINESS: + if (match_int(&args[0], &swappiness)) + return -EINVAL; + if (swappiness < MIN_SWAPPINESS || swappiness > MAX_SWAPPINESS) + return -EINVAL; + break; + default: + return -EINVAL; + } + } reclaim_options = MEMCG_RECLAIM_MAY_SWAP | MEMCG_RECLAIM_PROACTIVE; while (nr_reclaimed < nr_to_reclaim) { @@ -6926,7 +6959,8 @@ static ssize_t memory_reclaim(struct kernfs_open_file *of, char *buf, reclaimed = try_to_free_mem_cgroup_pages(memcg, min(nr_to_reclaim - nr_reclaimed, SWAP_CLUSTER_MAX), - GFP_KERNEL, reclaim_options); + GFP_KERNEL, reclaim_options, + swappiness == -1 ? NULL : &swappiness); if (!reclaimed && !nr_retries--) return -EAGAIN; diff --git a/mm/vmscan.c b/mm/vmscan.c index d91963e2d47f..aa5666842c49 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -92,6 +92,9 @@ struct scan_control { unsigned long anon_cost; unsigned long file_cost; + /* Swappiness value for reclaim. NULL will fall back to per-memcg/global value */ + int *swappiness; + /* Can active folios be deactivated as part of reclaim? */ #define DEACTIVATE_ANON 1 #define DEACTIVATE_FILE 2 @@ -2327,7 +2330,8 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc, struct pglist_data *pgdat = lruvec_pgdat(lruvec); struct mem_cgroup *memcg = lruvec_memcg(lruvec); unsigned long anon_cost, file_cost, total_cost; - int swappiness = mem_cgroup_swappiness(memcg); + int swappiness = sc->swappiness ? + *sc->swappiness : mem_cgroup_swappiness(memcg); u64 fraction[ANON_AND_FILE]; u64 denominator = 0; /* gcc */ enum scan_balance scan_balance; @@ -2608,6 +2612,9 @@ static int get_swappiness(struct lruvec *lruvec, struct scan_control *sc) mem_cgroup_get_nr_swap_pages(memcg) < MIN_LRU_BATCH) return 0; + if (sc->swappiness) + return *sc->swappiness; + return mem_cgroup_swappiness(memcg); } @@ -6463,12 +6470,14 @@ unsigned long mem_cgroup_shrink_node(struct mem_cgroup *memcg, unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *memcg, unsigned long nr_pages, gfp_t gfp_mask, - unsigned int reclaim_options) + unsigned int reclaim_options, + int *swappiness) { unsigned long nr_reclaimed; unsigned int noreclaim_flag; struct scan_control sc = { .nr_to_reclaim = max(nr_pages, SWAP_CLUSTER_MAX), + .swappiness = swappiness, .gfp_mask = (current_gfp_context(gfp_mask) & GFP_RECLAIM_MASK) | (GFP_HIGHUSER_MOVABLE & ~GFP_RECLAIM_MASK), .reclaim_idx = MAX_NR_ZONES - 1,