* [PATCH] memcg: enable accounting for veth queues
@ 2022-04-27 10:34 Vasily Averin
[not found] ` <1c338b99-8133-6126-2ff2-94a4d3f26451-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Vasily Averin @ 2022-04-27 10:34 UTC (permalink / raw)
To: Roman Gushchin, Vlastimil Babka, Shakeel Butt
Cc: kernel, linux-kernel, Michal Hocko, cgroups, netdev,
David S. Miller, Jakub Kicinski, Paolo Abeni
veth netdevice defines own rx queues and allocates array containing
up to 4095 ~750-bytes-long 'struct veth_rq' elements. Such allocation
is quite huge and should be accounted to memcg.
Signed-off-by: Vasily Averin <vvs@openvz.org>
---
drivers/net/veth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index d29fb9759cc9..bd67f458641a 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -1310,7 +1310,7 @@ static int veth_alloc_queues(struct net_device *dev)
struct veth_priv *priv = netdev_priv(dev);
int i;
- priv->rq = kcalloc(dev->num_rx_queues, sizeof(*priv->rq), GFP_KERNEL);
+ priv->rq = kcalloc(dev->num_rx_queues, sizeof(*priv->rq), GFP_KERNEL_ACCOUNT);
if (!priv->rq)
return -ENOMEM;
--
2.31.1
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <1c338b99-8133-6126-2ff2-94a4d3f26451-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>]
* Re: [PATCH] memcg: enable accounting for veth queues [not found] ` <1c338b99-8133-6126-2ff2-94a4d3f26451-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> @ 2022-04-27 16:58 ` Jakub Kicinski [not found] ` <20220427095854.79554fab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Jakub Kicinski @ 2022-04-27 16:58 UTC (permalink / raw) To: Vasily Averin Cc: Roman Gushchin, Vlastimil Babka, Shakeel Butt, kernel-GEFAQzZX7r8dnm+yROfE0A, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Michal Hocko, cgroups-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, David S. Miller, Paolo Abeni On Wed, 27 Apr 2022 13:34:29 +0300 Vasily Averin wrote: > Subject: [PATCH] memcg: enable accounting for veth queues This is a pure networking patch, right? The prefix should be "net: ", I think. > veth netdevice defines own rx queues and allocates array containing > up to 4095 ~750-bytes-long 'struct veth_rq' elements. Such allocation > is quite huge and should be accounted to memcg. > > Signed-off-by: Vasily Averin <vvs-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20220427095854.79554fab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>]
* Re: [PATCH] memcg: enable accounting for veth queues [not found] ` <20220427095854.79554fab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> @ 2022-04-27 22:48 ` Vasily Averin 2022-04-29 5:17 ` [PATCH net] net: enable memcg " Vasily Averin 1 sibling, 0 replies; 5+ messages in thread From: Vasily Averin @ 2022-04-27 22:48 UTC (permalink / raw) To: Jakub Kicinski Cc: Roman Gushchin, Vlastimil Babka, Shakeel Butt, kernel-GEFAQzZX7r8dnm+yROfE0A, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Michal Hocko, cgroups-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, David S. Miller, Paolo Abeni On 4/27/22 19:58, Jakub Kicinski wrote: > On Wed, 27 Apr 2022 13:34:29 +0300 Vasily Averin wrote: >> Subject: [PATCH] memcg: enable accounting for veth queues > > This is a pure networking patch, right? The prefix should be "net: ", > I think. Thank you for the remark, I'll fix it. Initially it was a part of the patch accounted resources accounted when creating a new netdevice, but then I moved this piece to a separate patch, because unlike other cases, it is specific to veth. Thank you, Vasily Averin ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net] net: enable memcg accounting for veth queues [not found] ` <20220427095854.79554fab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> 2022-04-27 22:48 ` Vasily Averin @ 2022-04-29 5:17 ` Vasily Averin [not found] ` <0b28d49b-605c-ac1a-df85-643164e69039-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: Vasily Averin @ 2022-04-29 5:17 UTC (permalink / raw) To: Jakub Kicinski Cc: Roman Gushchin, Vlastimil Babka, Shakeel Butt, kernel-GEFAQzZX7r8dnm+yROfE0A, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Michal Hocko, cgroups-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, David S. Miller, Paolo Abeni veth netdevice defines own rx queues and allocates array containing up to 4095 ~750-bytes-long 'struct veth_rq' elements. Such allocation is quite huge and should be accounted to memcg. Signed-off-by: Vasily Averin <vvs-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> --- drivers/net/veth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/veth.c b/drivers/net/veth.c index d29fb9759cc9..bd67f458641a 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c @@ -1310,7 +1310,7 @@ static int veth_alloc_queues(struct net_device *dev) struct veth_priv *priv = netdev_priv(dev); int i; - priv->rq = kcalloc(dev->num_rx_queues, sizeof(*priv->rq), GFP_KERNEL); + priv->rq = kcalloc(dev->num_rx_queues, sizeof(*priv->rq), GFP_KERNEL_ACCOUNT); if (!priv->rq) return -ENOMEM; -- 2.31.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <0b28d49b-605c-ac1a-df85-643164e69039-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>]
* Re: [PATCH net] net: enable memcg accounting for veth queues [not found] ` <0b28d49b-605c-ac1a-df85-643164e69039-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> @ 2022-05-01 12:20 ` patchwork-bot+netdevbpf-DgEjT+Ai2ygdnm+yROfE0A 0 siblings, 0 replies; 5+ messages in thread From: patchwork-bot+netdevbpf-DgEjT+Ai2ygdnm+yROfE0A @ 2022-05-01 12:20 UTC (permalink / raw) To: Vasily Averin Cc: kuba-DgEjT+Ai2ygdnm+yROfE0A, roman.gushchin-fxUVXftIFDnyG1zEObXtfA, vbabka-AlSwsSmVLrQ, shakeelb-hpIqsD4AKlfQT0dZR+AlfA, kernel-GEFAQzZX7r8dnm+yROfE0A, linux-kernel-u79uwXL29TY76Z2rM5mHXA, mhocko-IBi9RG/b67k, cgroups-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q, pabeni-H+wXaHxf7aLQT0dZR+AlfA Hello: This patch was applied to netdev/net-next.git (master) by David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>: On Fri, 29 Apr 2022 08:17:35 +0300 you wrote: > veth netdevice defines own rx queues and allocates array containing > up to 4095 ~750-bytes-long 'struct veth_rq' elements. Such allocation > is quite huge and should be accounted to memcg. > > Signed-off-by: Vasily Averin <vvs-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> > --- > drivers/net/veth.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summary with links: - [net] net: enable memcg accounting for veth queues https://git.kernel.org/netdev/net-next/c/961c6136359e You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-05-01 12:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-27 10:34 [PATCH] memcg: enable accounting for veth queues Vasily Averin
[not found] ` <1c338b99-8133-6126-2ff2-94a4d3f26451-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2022-04-27 16:58 ` Jakub Kicinski
[not found] ` <20220427095854.79554fab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2022-04-27 22:48 ` Vasily Averin
2022-04-29 5:17 ` [PATCH net] net: enable memcg " Vasily Averin
[not found] ` <0b28d49b-605c-ac1a-df85-643164e69039-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2022-05-01 12:20 ` patchwork-bot+netdevbpf-DgEjT+Ai2ygdnm+yROfE0A
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox