From: Masahide NAKAMURA <nakam@linux-ipv6.org>
To: David Miller <davem@davemloft.net>
Cc: yoshfuji@linux-ipv6.org, netdev@vger.kernel.org,
usagi-core@linux-ipv6.org
Subject: Re: [PATCH][XFRM] Fixes for net-2.6
Date: Wed, 04 Oct 2006 11:08:01 +0900 [thread overview]
Message-ID: <45231781.9060409@linux-ipv6.org> (raw)
In-Reply-To: <20061003.155504.126762903.davem@davemloft.net>
David Miller wrote:
> From: Masahide NAKAMURA <nakam@linux-ipv6.org>
> Date: Tue, 03 Oct 2006 12:29:54 +0900
>
>> [XFRM] POLICY: Fix per-direction policy counter after flushing.
>>
>> Currently when xfrm_policy_flush() is called per-direction
>> policy counter is cleared. However flusing policy is performed
>> for each type (i.e. main or sub) then it is not always true
>> to make the counter zero.
>>
>> Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
>
> The idea of this code is to avoid updating global state many
> many times during such a flush. This can be expensive and
> cause much SMP cacheline activity as other cpus read the
> counter in the routing lookup path.
Thanks for the clarify. My patch should have included such cacheline
consideration.
> I think what I'll do is reimplement this patch so that a local
> variable is used to maintain how many entries were removed,
> and then simply subtract that counter from xfrm_policy_count[dir]
> at the very end where the assignment to zero occurs.
I feel it's better idea now. I agree to apply it instead of my patch.
Regards,
--
Masahide NAKAMURA
prev parent reply other threads:[~2006-10-04 2:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-03 3:29 [PATCH][XFRM] Fixes for net-2.6 Masahide NAKAMURA
2006-10-03 22:55 ` David Miller
2006-10-04 2:08 ` Masahide NAKAMURA [this message]
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=45231781.9060409@linux-ipv6.org \
--to=nakam@linux-ipv6.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=usagi-core@linux-ipv6.org \
--cc=yoshfuji@linux-ipv6.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
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).