From: Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
To: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v3 6/6] ve: add neigh_tbl failcounter
Date: Mon, 12 Oct 2026 07:59:23 +0000 [thread overview]
Message-ID: <179179196327.931154.1346600865078567213.b4-review@b4> (raw)
In-Reply-To: <20261012-ve-printk-irq-v3-6-efc95fd5c78a@virtuozzo.com>
> Count hits of the per-VE neigh_tbl limit in ve.failcount.
>
> This one was delayed due to a high risk of IRQ-context hits,
> when destination VE can't be obtained from get_exec_env.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-135520
> https://virtuozzo.atlassian.net/browse/VSTOR-146839
>
> Feature: per-ve failcounters
> Feature: ve printk
> Signed-off-by: Vladimir Riabchun <vladimir.riabchun@virtuozzo.com>
>
> diff --git a/include/linux/ve.h b/include/linux/ve.h
> index 946df4eebe89..44e04dc75823 100644
> --- a/include/linux/ve.h
> +++ b/include/linux/ve.h
> @@ -97,6 +97,7 @@ struct ve_struct {
>
> atomic_t arp_neigh_nr;
> atomic_t nd_neigh_nr;
> + atomic_t neigh_tbl_failcount;
> unsigned long meminfo_val;
>
> /*
> diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
> index 51cc635be2e2..35fad9658149 100644
> --- a/kernel/ve/ve.c
> +++ b/kernel/ve/ve.c
> @@ -118,6 +118,7 @@ struct ve_struct ve0 = {
>
> .arp_neigh_nr = ATOMIC_INIT(0),
> .nd_neigh_nr = ATOMIC_INIT(0),
> + .neigh_tbl_failcount = ATOMIC_INIT(0),
> .mnt_avail_nr = ATOMIC_INIT(INT_MAX),
> .mnt_max_nr = INT_MAX,
> .mnt_failcount = ATOMIC_INIT(0),
> @@ -834,6 +835,7 @@ static struct cgroup_subsys_state *ve_create(struct cgroup_subsys_state *parent_
>
> atomic_set(&ve->arp_neigh_nr, 0);
> atomic_set(&ve->nd_neigh_nr, 0);
> + atomic_set(&ve->neigh_tbl_failcount, 0);
> ve->mnt_max_nr = MNT_MAX_NR_DEFAULT;
> atomic_set(&ve->mnt_failcount, 0);
> atomic_set(&ve->mnt_avail_nr, MNT_MAX_NR_DEFAULT);
> @@ -1098,6 +1100,7 @@ static const struct ve_failcount_entry {
> VE_FC_ENTRY(mnt),
> VE_FC_ENTRY(netif),
> VE_FC_ENTRY(bpf_prog),
> + VE_FC_ENTRY(neigh_tbl),
> #ifdef CONFIG_AIO
> VE_FC_ENTRY(aio),
> #endif
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> index f90deb17fb25..6c2fc778a8ab 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -520,8 +520,9 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl,
> (glob_entries >= READ_ONCE(tbl->gc_thresh2) &&
> time_after(now, READ_ONCE(tbl->last_flush) + 5 * HZ))) {
> if (!neigh_forced_gc(tbl, ve) && entries >= gc_thresh3) {
> - net_info_ratelimited("%s: neighbor table overflow!\n",
> - tbl->id);
> + net_info_ratelimited("%s: neighbor table overflow for ve %s!\n",
> + tbl->id, ve_name(ve));
Here on hosts with more neighbors than the threshold the host will get a
message which points to a failcount file it doesn't exist. Maybe only
increase failcount in case ve is not super?
--
Vasileios Almpanis <vasileios.almpanis@virtuozzo.com>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-10-12 8:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 22:52 [Devel] [PATCH hci-8.1 v3 0/6] ve/printk: Fix logs leakage via ve_printk called from IRQ context Vladimir Riabchun
2026-10-11 22:52 ` [Devel] [PATCH hci-8.1 v3 1/6] ve/printk: Add sanity checks in ve_printk functions Vladimir Riabchun
2026-10-11 22:57 ` no-reply
2026-10-11 22:52 ` [Devel] [PATCH hci-8.1 v3 2/6] ve/printk: Report potentially leaking usage of " Vladimir Riabchun
2026-10-11 22:59 ` no-reply
2026-10-11 22:52 ` [Devel] [PATCH hci-8.1 v3 3/6] ve/printk: Specify ve in printks Vladimir Riabchun
2026-10-11 23:02 ` no-reply
2026-10-11 22:52 ` [Devel] [PATCH hci-8.1 v3 4/6] ve/printk: Fix time virtualization Vladimir Riabchun
2026-10-11 23:03 ` no-reply
2026-10-11 22:52 ` [Devel] [PATCH hci-8.1 v3 5/6] ve/failcount: Use ve_printk with specified ve Vladimir Riabchun
2026-10-11 23:05 ` no-reply
2026-10-11 22:52 ` [Devel] [PATCH hci-8.1 v3 6/6] ve: add neigh_tbl failcounter Vladimir Riabchun
2026-10-11 23:04 ` no-reply
2026-10-12 7:59 ` Vasileios Almpanis [this message]
2026-10-12 7:59 ` [Devel] [PATCH hci-8.1 v3 0/6] ve/printk: Fix logs leakage via ve_printk called from IRQ context Vasileios Almpanis
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=179179196327.931154.1346600865078567213.b4-review@b4 \
--to=vasileios.almpanis@virtuozzo.com \
--cc=devel@openvz.org \
--cc=vladimir.riabchun@virtuozzo.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox