Linux-mm Archive on lore.kernel.org
 help / color / Atom feed
From: Wang Yugui <wangyugui@e16-tech.com>
To: linux-mm@kvack.org
Subject: unexpected -ENOMEM from percpu_counter_init()
Date: Thu, 01 Apr 2021 18:51:59 +0800
Message-ID: <20210401185158.3275.409509F4@e16-tech.com> (raw)

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@e16-tech.com)
2021/04/01



             reply index

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 10:51 Wang Yugui [this message]
2021-04-02  1:49 ` Wang Yugui
2021-04-07 12:35 ` Vlastimil Babka
2021-04-07 13:09   ` Wang Yugui
2021-04-07 14:56     ` Dennis Zhou
2021-04-07 23:28       ` Wang Yugui
2021-04-08  2:44         ` Dennis Zhou
2021-04-08  9:20           ` Wang Yugui
2021-04-08 13:48             ` Dennis Zhou
2021-04-08 14:28               ` Filipe Manana
2021-04-08 15:02                 ` Dennis Zhou
2021-04-09 11:39                   ` Filipe Manana
2021-04-09 13:39                     ` Dennis Zhou
2021-04-09 13:42                       ` Filipe Manana
2021-04-09  0:08               ` Wang Yugui
2021-04-09  2:14                 ` Dennis Zhou
2021-04-09  4:02                   ` Wang Yugui
2021-04-09  7:36                     ` Wang Yugui
2021-04-09  7:48                       ` Wang Yugui
2021-04-09 13:56                       ` Dennis Zhou
2021-04-10 15:29                         ` Wang Yugui
2021-04-10 15:52                           ` Dennis Zhou
2021-04-10 16:08                             ` Wang Yugui
2021-04-11 15:20                               ` Wang Yugui
2021-04-12  4:03                                 ` Dennis Zhou
2021-04-12  5:24                                   ` Wang Yugui
2021-04-09  9:52   ` Wang Yugui

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=20210401185158.3275.409509F4@e16-tech.com \
    --to=wangyugui@e16-tech.com \
    --cc=linux-mm@kvack.org \
    /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

Linux-mm Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mm/0 linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ https://lore.kernel.org/linux-mm \
		linux-mm@kvack.org
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kvack.linux-mm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git