From: kernel test robot <lkp@intel.com>
To: Kairui Song <ryncsn@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [RFC PATCH v2 1/5] workingset: simplify and use a more intuitive model
Date: Wed, 13 Sep 2023 05:05:46 +0800 [thread overview]
Message-ID: <202309130414.AExd7FVY-lkp@intel.com> (raw)
In-Reply-To: <20230912184511.49333-2-ryncsn@gmail.com>
Hi Kairui,
[This is a private test report for your RFC patch.]
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.6-rc1]
[cannot apply to akpm-mm/mm-everything next-20230912]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Kairui-Song/workingset-simplify-and-use-a-more-intuitive-model/20230913-024648
base: linus/master
patch link: https://lore.kernel.org/r/20230912184511.49333-2-ryncsn%40gmail.com
patch subject: [RFC PATCH v2 1/5] workingset: simplify and use a more intuitive model
config: i386-tinyconfig (https://download.01.org/0day-ci/archive/20230913/202309130414.AExd7FVY-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230913/202309130414.AExd7FVY-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309130414.AExd7FVY-lkp@intel.com/
All warnings (new ones prefixed by >>):
mm/workingset.c: In function 'lru_refault':
>> mm/workingset.c:253:43: warning: unused variable 'inactive' [-Wunused-variable]
253 | unsigned long workingset, active, inactive, inactive_file, inactive_anon = 0;
| ^~~~~~~~
>> mm/workingset.c:253:23: warning: unused variable 'workingset' [-Wunused-variable]
253 | unsigned long workingset, active, inactive, inactive_file, inactive_anon = 0;
| ^~~~~~~~~~
vim +/inactive +253 mm/workingset.c
243
244 /*
245 * Calculate and test refault distance
246 */
247 static inline bool lru_refault(struct mem_cgroup *memcg,
248 struct lruvec *lruvec,
249 unsigned long eviction, bool file,
250 int bits, int bucket_order)
251 {
252 unsigned long refault, distance;
> 253 unsigned long workingset, active, inactive, inactive_file, inactive_anon = 0;
254
255 eviction <<= bucket_order;
256 refault = atomic_long_read(&lruvec->nonresident_age);
257
258 /*
259 * The unsigned subtraction here gives an accurate distance
260 * across nonresident_age overflows in most cases. There is a
261 * special case: usually, shadow entries have a short lifetime
262 * and are either refaulted or reclaimed along with the inode
263 * before they get too old. But it is not impossible for the
264 * nonresident_age to lap a shadow entry in the field, which
265 * can then result in a false small refault distance, leading
266 * to a false activation should this old entry actually
267 * refault again. However, earlier kernels used to deactivate
268 * unconditionally with *every* reclaim invocation for the
269 * longest time, so the occasional inappropriate activation
270 * leading to pressure on the active list is not a problem.
271 */
272 distance = (refault - eviction) & (~0UL >> (BITS_PER_LONG - bits));
273
274 active = lruvec_page_state(lruvec, NR_ACTIVE_FILE);
275 inactive_file = lruvec_page_state(lruvec, NR_INACTIVE_FILE);
276 if (mem_cgroup_get_nr_swap_pages(memcg) > 0) {
277 active += lruvec_page_state(lruvec, NR_ACTIVE_ANON);
278 inactive_anon = lruvec_page_state(lruvec, NR_INACTIVE_ANON);
279 }
280
281 /*
282 * Compare the distance to the existing workingset size. We
283 * don't activate pages that couldn't stay resident even if
284 * all the memory was available to the workingset. Whether
285 * workingset competition needs to consider anon or not depends
286 * on having free swap space.
287 *
288 * When there are already enough active pages, be less aggressive
289 * on reactivating pages, challenge an already established set of
290 * active pages with one time refaulted page may not be a good idea.
291 */
292 if (active >= (inactive_anon + inactive_file))
293 return distance < inactive_anon + inactive_file;
294 else
295 return distance < active + (file ? inactive_anon : inactive_file);
296 }
297
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-09-12 21:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 18:45 [RFC PATCH v2 0/5] Refault distance checking for MGLRU Kairui Song
2023-09-12 18:45 ` [RFC PATCH v2 1/5] workingset: simplify and use a more intuitive model Kairui Song
2023-09-12 19:47 ` Johannes Weiner
2023-09-13 9:26 ` Kairui Song
2023-09-12 21:05 ` kernel test robot [this message]
2023-09-12 18:45 ` [RFC PATCH v2 2/5] workingset: update comment in workingset.c Kairui Song
2023-09-12 18:45 ` [RFC PATCH v2 3/5] workingset: simplify lru_gen_test_recent Kairui Song
2023-09-12 21:28 ` kernel test robot
2023-09-13 12:31 ` kernel test robot
2023-09-12 18:45 ` [RFC PATCH v2 4/5] lru_gen: convert avg_total and avg_refaulted to atomic Kairui Song
2023-09-12 18:45 ` [RFC PATCH v2 5/5] workingset, lru_gen: apply refault-distance based re-activation Kairui Song
2023-09-12 21:49 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202309130414.AExd7FVY-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ryncsn@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.