From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Jesse Barnes <jbarnes@engr.sgi.com>,
akpm@osdl.org, linux-kernel@vger.kernel.org
Cc: steiner@sgi.com
Subject: Re: [PATCH] allocate page caches pages in round robin fasion
Date: Fri, 13 Aug 2004 07:50:34 -0700 [thread overview]
Message-ID: <84960000.1092408633@[10.10.2.4]> (raw)
In-Reply-To: <200408121646.50740.jbarnes@engr.sgi.com>
> On a NUMA machine, page cache pages should be spread out across the system
> since they're generally global in nature and can eat up whole nodes worth of
> memory otherwise. This can end up hurting performance since jobs will have
> to make off node references for much or all of their non-file data.
>
> The patch works by adding an alloc_page_round_robin routine that simply
> allocates on successive nodes each time its called, based on the value of a
> per-cpu variable modulo the number of nodes. The variable is per-cpu to
> avoid cacheline contention when many cpus try to do page cache allocations at
> once.
I really don't think this is a good idea - you're assuming there's really
no locality of reference, which I don't think is at all true in most cases.
If we round-robin it ... surely 7/8 of your data (on your 8 node machine)
will ALWAYS be off-node ? I thought we discussed this at KS/OLS - what is
needed is to punt old pages back off onto another node, rather than swapping
them out. That way all your pages are going to be local.
> After dd if=/dev/zero of=/tmp/bigfile bs=1G count=2 on a stock kernel:
> Node 7 MemUsed: 49248 kB
> Node 6 MemUsed: 42176 kB
> Node 5 MemUsed: 316880 kB
> Node 4 MemUsed: 36160 kB
> Node 3 MemUsed: 45152 kB
> Node 2 MemUsed: 50000 kB
> Node 1 MemUsed: 68704 kB
> Node 0 MemUsed: 2426256 kB
>
> and after the patch:
> Node 7 MemUsed: 328608 kB
> Node 6 MemUsed: 319424 kB
> Node 5 MemUsed: 318608 kB
> Node 4 MemUsed: 321600 kB
> Node 3 MemUsed: 319648 kB
> Node 2 MemUsed: 327504 kB
> Node 1 MemUsed: 389504 kB
> Node 0 MemUsed: 744752 kB
OK, so it obviously does something ... but is the dd actually faster?
I'd think it's slower ...
M.
PS. I think it prob makes sense to make the *receiving* node's kswapd
do the transfer if possible for work distribution reasons ... however
I'm pretty sure there are some locking assumptions that mean this won't
be easy / possible.
next prev parent reply other threads:[~2004-08-13 14:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-12 23:46 Jesse Barnes
2004-08-13 0:13 ` William Lee Irwin III
2004-08-13 0:25 ` Jesse Barnes
2004-08-13 0:32 ` William Lee Irwin III
2004-08-13 14:50 ` Martin J. Bligh [this message]
2004-08-13 15:59 ` Jesse Barnes
2004-08-13 16:20 ` Martin J. Bligh
2004-08-13 16:34 ` Jesse Barnes
2004-08-13 16:47 ` Martin J. Bligh
2004-08-13 17:31 ` Nick Piggin
2004-08-13 21:16 ` Martin J. Bligh
2004-08-13 22:59 ` Martin J. Bligh
2004-08-14 1:21 ` Nick Piggin
[not found] <fa.hmrqqf6.ckie1e@ifi.uio.no>
[not found] ` <fa.cg3cafa.ngi9og@ifi.uio.no>
2004-08-13 17:31 ` Ray Bryant
[not found] <fa.hmbmqn2.d4ef9c@ifi.uio.no>
[not found] ` <fa.g1i2d5e.1kgqq80@ifi.uio.no>
2004-08-13 16:33 ` Ray Bryant
[not found] <2sxuC-429-3@gated-at.bofh.it>
2004-08-13 1:14 ` Andi Kleen
2004-08-13 1:26 ` William Lee Irwin III
2004-08-13 1:29 ` Jesse Barnes
2004-08-13 16:04 ` Jesse Barnes
2004-08-13 17:31 ` Brent Casavant
2004-08-13 20:16 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2004-08-12 23:38 Jesse Barnes
2004-08-13 1:36 ` Dave Hansen
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='84960000.1092408633@[10.10.2.4]' \
--to=mbligh@aracnet.com \
--cc=akpm@osdl.org \
--cc=jbarnes@engr.sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=steiner@sgi.com \
/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
all inboxes | Powered by JetHome®