From: Andi Kleen <andi@firstfloor•org>
To: Satoshi OSHIMA <satoshi.oshima.fk@hitachi•com>
Cc: netdev@vger•kernel.org, haoki@redhat•com, 吉藤英明 <yoshfuji@linux-ipv6•org>
Subject: Re: [RFC/PATCH 2/3] UDP memory usage accounting: accounting unit and variable
Date: 21 Sep 2007 15:10:18 +0200 [thread overview]
Message-ID: <p734pho9nb9.fsf@bingen.suse.de> (raw)
In-Reply-To: <46F3B88D.1030601@hitachi.com>
Satoshi OSHIMA <satoshi.oshima.fk@hitachi•com> writes:
> This patch introduces global variable for UDP memory accounting.
> The unit is page.
The global variable doesn't seem to be very MP scalable, especially
if you change it for each packet. This will be a very hot cache line,
in the worst case bouncing around a large machine.
Possible alternatives:
- Per CPU variables
- You only change the global on socket creation time (by pre allocating a large
amount) or when the system comes under memory pressure.
- Batching of the global updates for multiple packets [that's a variant
of the previous one, might be still too costly though]
Also for such variables it's usually good to cache line pad them on SMP
to avoid false sharing with something else.
-Andi
next prev parent reply other threads:[~2007-09-21 13:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-21 12:26 [RFC/PATCH 2/3] UDP memory usage accounting: accounting unit and variable Satoshi OSHIMA
2007-09-21 13:10 ` Andi Kleen [this message]
2007-09-27 18:54 ` Hideo AOKI
2007-09-28 13:24 ` Satoshi OSHIMA
2007-09-29 3:22 ` Herbert Xu
-- strict thread matches above, loose matches on Subject: below --
2007-09-28 13:40 Satoshi OSHIMA
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=p734pho9nb9.fsf@bingen.suse.de \
--to=andi@firstfloor$(echo .)org \
--cc=haoki@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=satoshi.oshima.fk@hitachi$(echo .)com \
--cc=yoshfuji@linux-ipv6$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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