Skip to content

Commit

Permalink
sparc64: Define WANT_PAGE_VIRTUAL
Browse files Browse the repository at this point in the history
As sparse warns, without this struct page pointer subtraction is
extremely expensive, and this is a pretty common operation in
fast paths.

With this define struct page becomes 64 bytes which makes for a
simple subtract and shift, instead of a costly divide or reciprocol
multiply.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 12, 2008
1 parent 17f04fb commit b0f1e79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/sparc/include/asm/page_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

#ifndef __ASSEMBLY__

#define WANT_PAGE_VIRTUAL

extern void _clear_page(void *page);
#define clear_page(X) _clear_page((void *)(X))
struct page;
Expand Down

0 comments on commit b0f1e79

Please sign in to comment.