[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220623023645.F914.409509F4@e16-tech.com>
Date: Thu, 23 Jun 2022 02:36:45 +0800
From: Wang Yugui <wangyugui@...-tech.com>
To: Chuck Lever <chuck.lever@...cle.com>
Cc: linux-nfs@...r.kernel.org, netdev@...r.kernel.org,
david@...morbit.com, tgraf@...g.ch, jlayton@...hat.com
Subject: Re: [PATCH RFC 00/30] Overhaul NFSD filecache
Hi,
fstests generic/531 triggered a panic on kernel 5.19.0-rc3 with this
patchset.
[ 405.478056] BUG: kernel NULL pointer dereference, address: 0000000000000049
[ 405.608016] Call Trace:
[ 405.608016] <TASK>
[ 405.613020] nfs4_get_vfs_file+0x325/0x410 [nfsd]
[ 405.618018] nfsd4_process_open2+0x4ba/0x16d0 [nfsd]
[ 405.623016] ? inode_get_bytes+0x38/0x40
[ 405.623016] ? nfsd_permission+0x97/0xf0 [nfsd]
[ 405.628022] ? fh_verify+0x1cc/0x6f0 [nfsd]
[ 405.633025] nfsd4_open+0x640/0xb30 [nfsd]
[ 405.638025] nfsd4_proc_compound+0x3bd/0x710 [nfsd]
[ 405.643017] nfsd_dispatch+0x143/0x270 [nfsd]
[ 405.648019] svc_process_common+0x3bf/0x5b0 [sunrpc]
more detail in attachment file(531.dmesg)
local.config of fstests:
export NFS_MOUNT_OPTIONS="-o rw,relatime,vers=4.2,nconnect=8"
changes of generic/531
max_allowable_files=$(( 1 * 1024 * 1024 / $nr_cpus / 2 ))
Best Regards
Wang Yugui (wangyugui@...-tech.com)
2022/06/23
> This series overhauls the NFSD filecache, a cache of server-side
> "struct file" objects recently used by NFS clients. The purposes of
> this overhaul are an immediate improvement in cache scalability in
> the number of open files, and preparation for further improvements.
>
> There are three categories of patches in this series:
>
> 1. Add observability of cache operation so we can see what we're
> doing as changes are made to the code.
>
> 2. Improve the scalability of filecache garbage collection,
> addressing several bugs along the way.
>
> 3. Improve the scalability of the filecache hash table by converting
> it to use rhashtable.
>
> The series as it stands survives typical test workloads. Running
> stress-tests like generic/531 is the next step.
>
> These patches are also available in the linux-nfs-bugzilla-386
> branch of
>
> https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git
>
> ---
>
> Chuck Lever (30):
> NFSD: Report filecache LRU size
> NFSD: Report count of calls to nfsd_file_acquire()
> NFSD: Report count of freed filecache items
> NFSD: Report average age of filecache items
> NFSD: Add nfsd_file_lru_dispose_list() helper
> NFSD: Refactor nfsd_file_gc()
> NFSD: Refactor nfsd_file_lru_scan()
> NFSD: Report the number of items evicted by the LRU walk
> NFSD: Record number of flush calls
> NFSD: Report filecache item construction failures
> NFSD: Zero counters when the filecache is re-initialized
> NFSD: Hook up the filecache stat file
> NFSD: WARN when freeing an item still linked via nf_lru
> NFSD: Trace filecache LRU activity
> NFSD: Leave open files out of the filecache LRU
> NFSD: Fix the filecache LRU shrinker
> NFSD: Never call nfsd_file_gc() in foreground paths
> NFSD: No longer record nf_hashval in the trace log
> NFSD: Remove lockdep assertion from unhash_and_release_locked()
> NFSD: nfsd_file_unhash can compute hashval from nf->nf_inode
> NFSD: Refactor __nfsd_file_close_inode()
> NFSD: nfsd_file_hash_remove can compute hashval
> NFSD: Remove nfsd_file::nf_hashval
> NFSD: Remove stale comment from nfsd_file_acquire()
> NFSD: Clean up "open file" case in nfsd_file_acquire()
> NFSD: Document nfsd_file_cache_purge() API contract
> NFSD: Replace the "init once" mechanism
> NFSD: Set up an rhashtable for the filecache
> NFSD: Convert the filecache to use rhashtable
> NFSD: Clean up unusued code after rhashtable conversion
>
>
> fs/nfsd/filecache.c | 677 +++++++++++++++++++++++++++-----------------
> fs/nfsd/filecache.h | 6 +-
> fs/nfsd/nfsctl.c | 10 +
> fs/nfsd/trace.h | 117 ++++++--
> 4 files changed, 522 insertions(+), 288 deletions(-)
>
> --
> Chuck Lever
Download attachment "531.dmesg" of type "application/octet-stream" (55461 bytes)
Powered by blists - more mailing lists