From: Paul Jackson <pj@sgi.com>
To: Ray Bryant <raybry@sgi.com>
Cc: wli@holomorphy.com, mbligh@aracnet.com, akpm@osdl.org,
ak@suse.de, raybry@austin.rr.com, linux-mm@kvack.org,
jbarnes@sgi.com, djh@sgi.com, lse-tech@lists.sourceforge.net,
bcasavan@sgi.com, piggin@cyberone.com.au,
linux-kernel@vger.kernel.org, haveblue@us.ibm.com
Subject: Re: [PATCH 2.6.9-rc2-mm1 0/2] mm: memory policy for page cache allocation
Date: Mon, 20 Sep 2004 13:22:50 -0700 [thread overview]
Message-ID: <20040920132250.251736d0.pj@sgi.com> (raw)
In-Reply-To: <20040920190033.26965.64678.54625@tomahawk.engr.sgi.com>
Nits ...
1) better change this line in mempolicy.h
#define MPOL_MAX MPOL_INTERLEAVE
to be instead
#define MPOL_MAX MPOL_ROUNDROBIN
2) Why change the alloc_page_vma() code structure for
MPOL_INTERLEAVE from starting with:
if (unlikely(pol->policy == MPOL_INTERLEAVE)) {
to starting with:
switch (pol->policy) {
case MPOL_INTERLEAVE:
Doesn't the original way work just as well (and keep the patch
smaller)? Just add another 'if(...MPOL_ROUNDROBIN)' section
following the MPOL_INTERLEAVE section. And the other switch
statements in this file don't indent the case lines a tab further.
3) The following line looks like it could trigger after a
hotplug node removal (not that I know how to do that yet):
BUG_ON(!test_bit(nid, (const volatile void *) &node_online_map));
Should the '(const volatile void *)' cast be a nodes_addr() wrapper?
Can this entire line be dropped, or turned into a test:
if (!node_isset(nid, node_online_map))
continue;
4) Patches done with the 'diff -p' option are slightly easier to
read, as they show the procedure the diff seems to appear in.
5) I see no need for the 'else' in:
- if (pol->policy == MPOL_INTERLEAVE)
+ if (pol->policy == MPOL_INTERLEAVE) {
return alloc_page_interleave(gfp, order, interleave_nodes(pol));
+ } else if (pol->policy == MPOL_ROUNDROBIN) {
+ return alloc_page_roundrobin(gfp, order, pol);
+ }
Couldn't one just have this less intrusive patch instead:
if (pol->policy == MPOL_INTERLEAVE)
return alloc_page_interleave(gfp, order, interleave_nodes(pol));
+ if (pol->policy == MPOL_ROUNDROBIN)
+ return alloc_page_roundrobin(gfp, order, pol);
return __alloc_pages(gfp, order, zonelist_policy(gfp, pol));
}
6) Can the added rr_next in task_struct be shared with il_next?
7) Why doesn't alloc_page_roundrobin() have its own accounting, like
alloc_page_interleave() does?
8) Could you explain the for loop in alloc_page_roundrobin()? Won't
the first call to __alloc_pages() within the loop search down all
the nodes in the system, in a numa friendly order (closer nodes
first)? Why then pick another node to search from, in the next
pass of the for loop, which will again search down the same nodes,
using a differently sorted zonelist. Obviously I'm missing something
here.
9) Too bad there's not some pseudo-random value floating around somewhere,
such as a per-node clock or something, that could be used to drive a
pseudo-uniform distribution, without any need for the additional rr_next
state?
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373
--
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 prev parent reply other threads:[~2004-09-20 20:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-20 19:00 Ray Bryant
2004-09-20 19:00 ` [PATCH 2.6.9-rc2-mm1 1/2] " Ray Bryant
2004-09-20 19:00 ` [PATCH 2.6.9-rc2-mm1 2/2] " Ray Bryant
2004-09-20 20:22 ` Paul Jackson [this message]
2004-09-20 20:55 ` [PATCH 2.6.9-rc2-mm1 0/2] " Andi Kleen
2004-09-20 22:13 ` Ray Bryant
2004-09-20 22:37 ` Andi Kleen
2004-09-20 23:16 ` William Lee Irwin III
2004-09-21 1:30 ` Ray Bryant
2004-09-21 9:13 ` Andi Kleen
2004-09-21 9:33 ` William Lee Irwin III
2004-09-21 13:10 ` Ray Bryant
2004-09-20 22:38 ` Steve Longerbeam
2004-09-20 23:48 ` Steve Longerbeam
2004-09-23 15:54 ` [PATCH " Ray Bryant
2004-09-23 23:01 ` Steve Longerbeam
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=20040920132250.251736d0.pj@sgi.com \
--to=pj@sgi.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=bcasavan@sgi.com \
--cc=djh@sgi.com \
--cc=haveblue@us.ibm.com \
--cc=jbarnes@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=mbligh@aracnet.com \
--cc=piggin@cyberone.com.au \
--cc=raybry@austin.rr.com \
--cc=raybry@sgi.com \
--cc=wli@holomorphy.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