From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Krzysztof Oledzki <ole@ans.pl>, gpf <gpf@simm.ru>,
Netfilter Developer Mailing List
<netfilter-devel@vger.kernel.org>,
Eric Dumazet <dada1@cosmosbay.com>
Subject: Re: Quota on SMP AGAIN
Date: Sun, 30 Dec 2007 18:36:52 +0100 [thread overview]
Message-ID: <4777D734.7090405@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0712292052240.23321@fbirervta.pbzchgretzou.qr>
Jan Engelhardt wrote:
> On Dec 29 2007 19:54, Krzysztof Oledzki wrote:
>
>>> That doesn't help, the problem is that we keep only the counters on
>>> CPU0 up to date, but the data copied to userspace during iptables -L
>>> is chosen by the CPU the iptables command is running on.
>>>
>> As a short-term workaround one can use taskset to force running iptables on
>> CPU#0.
>>
>>
>
> Actually, on one (but fixed) arbitrary core.
Indeed, what a mess. I was just about to commit a patch to
always use first_cpu(cpu_possible_map) for copy_entries_to_user,
but thats no enough, we also need to force ruleset replacement
to choose the same CPU. This effectively eliminates all performance
improvements of the NUMA optimizations during ruleset updates.
Its ugly (not much more than other parts of iptables though),
but we should be able to keep half the improvement by using
raw_smp_processor_id() for ruleset replacements and storing
that number for the next copy_entries_to_user operations.
Alternatively we could flag the matches and targets requiring
this and fix them up during the second pass (counter fixup).
Most of them are rather rarely used I guess (limit, hashlimit,
quota and statistic).
Eric, do you have any better suggestions how to fix this?
next prev parent reply other threads:[~2007-12-30 17:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-27 15:14 Quota on SMP AGAIN gpf
2007-12-27 15:54 ` Jan Engelhardt
2007-12-27 16:55 ` gpf
2007-12-28 15:26 ` Patrick McHardy
2007-12-28 15:50 ` Jan Engelhardt
2007-12-28 16:13 ` Patrick McHardy
2007-12-28 16:38 ` Jan Engelhardt
2007-12-28 16:50 ` Patrick McHardy
2007-12-28 17:00 ` Jan Engelhardt
2007-12-29 16:32 ` Patrick McHardy
2007-12-29 18:54 ` Krzysztof Oledzki
2007-12-29 19:54 ` Jan Engelhardt
2007-12-30 17:36 ` Patrick McHardy [this message]
2007-12-30 18:25 ` Jan Engelhardt
2007-12-30 18:27 ` Patrick McHardy
2007-12-30 21:31 ` Krzysztof Oledzki
2007-12-31 0:19 ` Patrick McHardy
2007-12-31 0:54 ` Jan Engelhardt
2007-12-31 14:15 ` Patrick McHardy
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=4777D734.7090405@trash.net \
--to=kaber@trash.net \
--cc=dada1@cosmosbay.com \
--cc=gpf@simm.ru \
--cc=jengelh@computergmbh.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=ole@ans.pl \
/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).