From: Ying Xue <ying.xue@windriver.com>
To: Thomas Graf <tgraf@suug.ch>
Cc: <davem@davemloft.net>, <jon.maloy@ericsson.com>,
<Paul.Gortmaker@windriver.com>, <erik.hugne@ericsson.com>,
<netdev@vger.kernel.org>, <tipc-discussion@lists.sourceforge.net>
Subject: Re: [PATCH net-next v2 6/7] rhashtable: initialize atomic nelems variable
Date: Wed, 7 Jan 2015 18:26:21 +0800 [thread overview]
Message-ID: <54AD09CD.3010100@windriver.com> (raw)
In-Reply-To: <20150107095332.GK21820@casper.infradead.org>
On 01/07/2015 05:53 PM, Thomas Graf wrote:
> On 01/07/15 at 01:41pm, Ying Xue wrote:
>> Signed-off-by: Ying Xue <ying.xue@windriver.com>
>> Cc: Thomas Graf <tgraf@suug.ch>
>
> Is this really needed at all? We initialize the full rhashtable
> struct to 0 in rhashtable_init().
>
>
I am not sure whether we really need to reinitialize atomic variable
again although we have reset it with memset() or something else. But I
see many places in kernel where we do this, for example:
Although we use kmem_cache_zalloc() to allocate "net" structure instance
in net_alloc(), there are still several places where to reinitialize its
atomic variables again:
setup_net()
atomic_set(&net->use_count, 0);
rt_genid_init()
atomic_set(&net->ipv4.rt_genid, 0);
atomic_set(&net->fnhe_genid, 0);
Can you please definitely confirm that the reinitialisation is redundant
for us?
Regards,
Ying
next prev parent reply other threads:[~2015-01-07 10:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 5:41 [PATCH net-next v2 0/7] Involve rhashtable_lookup_insert routine Ying Xue
2015-01-07 5:41 ` [PATCH net-next v2 1/7] rhashtable: optimize rhashtable_lookup routine Ying Xue
2015-01-07 5:41 ` [PATCH net-next v2 2/7] rhashtable: introduce rhashtable_wakeup_worker helper function Ying Xue
2015-01-07 9:34 ` Thomas Graf
2015-01-07 5:41 ` [PATCH net-next v2 3/7] rhashtable: involve rhashtable_lookup_insert routine Ying Xue
2015-01-07 5:41 ` [PATCH net-next v2 4/7] rhashtable: future table needs to be traversed when remove an object Ying Xue
2015-01-07 9:39 ` Thomas Graf
2015-01-07 5:41 ` [PATCH net-next v2 5/7] rhashtable: avoid unnecessary wakeup for worker queue Ying Xue
2015-01-07 9:50 ` Thomas Graf
2015-01-07 10:28 ` Ying Xue
2015-01-07 5:41 ` [PATCH net-next v2 6/7] rhashtable: initialize atomic nelems variable Ying Xue
2015-01-07 9:53 ` Thomas Graf
2015-01-07 10:26 ` Ying Xue [this message]
2015-01-07 10:36 ` Thomas Graf
2015-01-07 5:41 ` [PATCH net-next v2 7/7] tipc: convert tipc reference table to use generic rhashtable Ying Xue
2015-01-07 9:54 ` [PATCH net-next v2 0/7] Involve rhashtable_lookup_insert routine Thomas Graf
2015-01-09 3:48 ` David Miller
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=54AD09CD.3010100@windriver.com \
--to=ying.xue@windriver.com \
--cc=Paul.Gortmaker@windriver.com \
--cc=davem@davemloft.net \
--cc=erik.hugne@ericsson.com \
--cc=jon.maloy@ericsson.com \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
--cc=tipc-discussion@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).