From: William Lee Irwin III <wli@holomorphy.com>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: percpu-2.5.63-bk5-1 (properly generated)
Date: Sun, 2 Mar 2003 13:06:06 -0800 [thread overview]
Message-ID: <20030302210606.GS24172@holomorphy.com> (raw)
In-Reply-To: <50380000.1046637959@[10.10.2.4]>
At some point in the past, I wrote:
>> make -j44 bzImage > /dev/null 304.02s user 122.14s system 1299% cpu 32.792 total
[...]
On Sun, Mar 02, 2003 at 12:46:00PM -0800, Martin J. Bligh wrote:
> How does that compare with and without your patch though?
There's a relatively large (12s/44s == 27%) difference between absolute
timings on our machines, which suggests a large disturbance in the force.
2.5.63-bk5 virgin appears to get timings in the low 40's.
On Sun, Mar 02, 2003 at 12:46:00PM -0800, Martin J. Bligh wrote:
> Would be useful if you can grab a before and after profile, and see exactly
> what it is that's getting thrashed that you're fixing (may just be everything).
>From the profile posted it's the division in page_zone().
-- wli
diff -urpN pernode-2.5.63-bk5-1/include/linux/mm.h pernode-2.5.63-bk5-2/include/linux/mm.h
--- pernode-2.5.63-bk5-1/include/linux/mm.h 2003-03-02 02:55:14.000000000 -0800
+++ pernode-2.5.63-bk5-2/include/linux/mm.h 2003-03-02 12:55:20.000000000 -0800
@@ -316,6 +316,7 @@ static inline void put_page(struct page
* sets it, so none of the operations on it need to be atomic.
*/
#define NODE_SHIFT 4
+#define ZONE_MASK ((1UL << NODE_SHIFT) - 1)
#define ZONE_SHIFT (BITS_PER_LONG - 8)
struct zone;
@@ -324,7 +325,7 @@ DECLARE_PER_NODE(struct zone *[MAX_NR_ZO
static inline struct zone *page_zone(struct page *page)
{
unsigned long zone = page->flags >> ZONE_SHIFT;
- return per_node(zone_table, zone/MAX_NR_ZONES)[zone % MAX_NR_ZONES];
+ return per_node(zone_table, zone >> NODE_SHIFT)[zone & ZONE_MASK];
}
static inline void set_page_zone(struct page *page, unsigned long zone_num)
diff -urpN pernode-2.5.63-bk5-1/mm/page_alloc.c pernode-2.5.63-bk5-2/mm/page_alloc.c
--- pernode-2.5.63-bk5-1/mm/page_alloc.c 2003-03-02 02:55:14.000000000 -0800
+++ pernode-2.5.63-bk5-2/mm/page_alloc.c 2003-03-02 12:15:00.000000000 -0800
@@ -1262,7 +1262,7 @@ static void __init free_area_init_core(s
*/
for (i = 0; i < size; i++) {
struct page *page = lmem_map + local_offset + i;
- set_page_zone(page, nid * MAX_NR_ZONES + j);
+ set_page_zone(page, (nid << NODE_SHIFT) + j);
set_page_count(page, 0);
SetPageReserved(page);
INIT_LIST_HEAD(&page->list);
next prev parent reply other threads:[~2003-03-02 20:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-02 18:24 percpu-2.5.63-bk5-1 (properly generated) Martin J. Bligh
2003-03-02 20:24 ` William Lee Irwin III
2003-03-02 20:46 ` Martin J. Bligh
2003-03-02 21:06 ` William Lee Irwin III [this message]
2003-03-02 21:58 ` Martin J. Bligh
2003-03-02 22:10 ` William Lee Irwin III
2003-03-02 23:13 ` Martin J. Bligh
2003-03-02 23:42 ` William Lee Irwin III
2003-03-03 0:07 ` Martin J. Bligh
2003-03-03 1:43 ` William Lee Irwin III
2003-03-03 17:40 ` Martin J. Bligh
2003-03-03 22:51 ` William Lee Irwin III
2003-03-03 23:30 ` Martin J. Bligh
2003-03-04 0:14 ` William Lee Irwin III
-- strict thread matches above, loose matches on Subject: below --
2003-03-02 11:07 William Lee Irwin III
2003-03-02 13:15 ` William Lee Irwin III
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=20030302210606.GS24172@holomorphy.com \
--to=wli@holomorphy.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.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;
as well as URLs for NNTP newsgroup(s).