unexpected -ENOMEM from percpu_counter_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux