Hi, This problem happend in 5.12.0-0.rc5.20210331git2bb25b3a748a too. https://kojipkgs.fedoraproject.org/packages/kernel/5.12.0/0.rc5.20210331git2bb25b3a748a.181.eln110/ Best Regards Wang Yugui (wangyugui@xxxxxxxxxxxx) 2021/04/02 > Hi, > > an unexpected -ENOMEM from percpu_counter_init() happened when xfstest > with kernel 5.11.10 and 5.10.27 > > direct caller: > int btrfs_drew_lock_init(struct btrfs_drew_lock *lock) > { > int ret; > > ret = percpu_counter_init(&lock->writers, 0, GFP_KERNEL); > if (ret) > return ret; > > atomic_set(&lock->readers, 0); > init_waitqueue_head(&lock->pending_readers); > init_waitqueue_head(&lock->pending_writers); > > return 0; > } > > upper caller: > nofs_flag = memalloc_nofs_save(); > ret = btrfs_drew_lock_init(&root->snapshot_lock); > memalloc_nofs_restore(nofs_flag); > if (ret == -ENOMEM) printk("ENOMEM btrfs_drew_lock_init\n"); > if (ret) > goto fail; > > The hardware of this server: > CPU: Xeon(R) CPU E5-2660 v2(10 core) *2 > memory: 192G, no swap > > Only one xfstests job is running in this server, and about 7% of memory > is used. > > Any advice please. > > Best Regards > Wang Yugui (wangyugui@xxxxxxxxxxxx) > 2021/04/01