[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2727f37b-1742-5532-317e-3be8a984266b@gmail.com>
Date: Fri, 2 Nov 2018 14:39:11 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Saeed Mahameed <saeedm@...lanox.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"arnd@...db.de" <arnd@...db.de>,
"leon@...nel.org" <leon@...nel.org>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Moshe Shemesh <moshe@...lanox.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
Boris Pismenny <borisp@...lanox.com>,
Tariq Toukan <tariqt@...lanox.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
Eran Ben Elisha <eranbe@...lanox.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Ilya Lesokhin <ilyal@...lanox.com>,
Kamal Heib <kamalh@...lanox.com>
Subject: Re: [PATCH] net/mlx5e: fix high stack usage
On 11/02/2018 02:05 PM, Saeed Mahameed wrote:
> temp will be mem copied to priv->stats.sw at the end,
> memcpy(&priv->stats.sw, &s, sizeof(s));
>
> one other way to solve this as suggested by Andrew, is to get rid of
> the temp var and make it point directly to priv->stats.sw
>
What about concurrency ?
This temp variable is there to make sure concurrent readers of stats might
not see mangle data (because another 'reader' just did a memset() and is doing the folding)
mlx5e_get_stats() can definitely be run at the same time by multiple threads.
Powered by blists - more mailing lists