[lkml]   [2002]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectresults: Remove 8 bytes from struct page on 64bit archs


> I'm curious to see how large the tradeoff is with calculating
> virtual in page_address(). The overhead there may be larger than
> the win we get from better cacheline footprint in struct page

Check out:

"struct page can be hazardous to your health"

On this machine (2 way power3) we see a ~5% improvement on dbench by
removing ->zone. Quite a nice improvement.

When we also remove ->virtual and use pointer arithmetic to do
page_address() performance drops back down. The reason for this can
be found in:

Search for divd, remembering the percentage to the left is shifted one
instruction down. Yes divides really hurt.

Basically the difference is:

page_address() using page->virtual:

ld 25,112(31)

page_address() using pointer arithmetic:

.quad mem_map
.quad 0xc000000000000000

ld 9,.LC1
li 11,120 ; sizeof(struct page)
ld 10,.LC2
ld 0,0(9)
subf 0,0,31
divd 0,0,11
sldi 0,0,12
add 25,0,10

Perhaps the compiler should be optimising this better (can we replace
the divide?)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:15    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean