Whamcloud - gitweb
LU-18169 osc: do not use deprecated NR_UNSTABLE_NFS 62/56162/5
authorQian Yingjin <qian@ddn.com>
Mon, 26 Aug 2024 07:50:14 +0000 (15:50 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Sep 2024 15:13:20 +0000 (15:13 +0000)
commit39a465f6b3c11cbd892d456f68fdb867044d693c
treec18431bd31ffe7ffbc198f05224013cb3b65adb9
parentdca487cd2dd6c0a805928bd22f49ceb7328df814
LU-18169 osc: do not use deprecated NR_UNSTABLE_NFS

A performance test script hanged the whole system with the
configuration of NUMA and SLES15sp3 OS version.
However, when we disalbe the unstable_check for unstable pages,
the test can be passed:
lctl set_param llite.*.unstable_stats=0

Found the root reason finally: we are using NR_UNSTABLE_NFS
wrongly, it was deprecated on SLES15sp3 after backport from the
upstream linux kernel with some its own modifications:
NR_UNSTABLE_NFS, /* NFS unstable pages - DEPRECATED DO NOT USE */

This is a special bug in SLEL15 kernel.
Thus we check whether NR_UNSTABLE_NFS is defined but was
deprecated during autoconf checking.

Moreover, the cgroups (memcg) does not work for the newer kernel,
the reason is that NR_UNSTABLE_NFS was removed, and it is wrongly
using NR_ZONE_WRITE_PENDING for memory accounting.
According to the kernel patch:
"mm/writeback: discard NR_UNSTABLE_NFS, use NR_WRITEBACK instead"
kernel v5.8-rc1 commit: 8d92890bd6b8502d6aee4b37430ae6444ade7a8c
it should account unstable pages in NR_WRITEBACK and WB_WRITEBACK.
This patch fixes it accordingly.

This patch also removes the unnecessary NR_ZONE_WRITE_PENDING
check.

Fixes: d4094475c99(LU-16699 osc: Prefer NR_ZONE_WRITE_PENDING)
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: I28e36aa152f1c683ad717a94c779069caab6c54c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56162
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/autoconf/lustre-libcfs.m4
lustre/include/lustre_compat.h
lustre/osc/osc_page.c