From: Jack Steiner <steiner@sgi.com>
To: linux-mm@kvack.org
Cc: clameter@sgi.com
Subject: Excessive memory trapped in pageset lists
Date: Thu, 7 Apr 2005 16:11:01 -0500 [thread overview]
Message-ID: <20050407211101.GA29069@sgi.com> (raw)
The zone structure has 2 lists in the per_cpu_pageset structure.
These lists are used for quickly allocating & freeing pages:
struct zone {
...
struct per_cpu_pageset pageset[NR_CPUS];
}
struct per_cpu_pageset {
...
struct per_cpu_pages pcp[2];
}
struct per_cpu_pages {
...
struct list_head list; // list head for free pages
}
Since the lists are private to a cpu, no global locks are required to
allocate or free pages. This is likely a performance win for many benchmarks.
However, memory in the lists is trapped, ie. not easily available
for allocation by any cpu except the owner of the list. In addition,
there is no "shaker" for this memory.
So how much memory can be in the lists.... Lots!
There is 1 zone per node (on SN). Each zone has 2 lists per cpu.
One list is for "hot" pages, the other is for "cold" pages.
On a big SN system there are 512p and 256 nodes:
512cpus * 256zones * 2 lists/percpu/perzone = 256K lists
On any system with more than 256MB/node (ie, all SN systems), the hot list
will contain 4 to 24 pages.. The cold list will contain 0 - 4 pages.
Assuming worst case, on a 512p system with 256k lists, there can be
a lot of memory trapped in these lists.
28 pages/node/cpu * 512 cpus * 256nodes * 16384 bytes/page = 60GB (Yikes!!!)
In practice, there will be a lot less memory in the lists, but even a
lot less is still way too much.
I have a couple of ideas for fixing this but it looks like Christoph is
actively making changes in this area. Christoph do you want to address
this issue or should I wait for your patch to stabilize?
--
Thanks
Jack Steiner (steiner@sgi.com) 651-683-5302
Principal Engineer SGI - Silicon Graphics, Inc.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
next reply other threads:[~2005-04-07 21:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-07 21:11 Jack Steiner [this message]
2005-04-08 1:24 ` Dave Hansen
2005-04-08 2:34 ` Jack Steiner
2005-04-08 5:18 ` Christoph Lameter
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=20050407211101.GA29069@sgi.com \
--to=steiner@sgi.com \
--cc=clameter@sgi.com \
--cc=linux-mm@kvack.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