linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-mm@kvack.org, Andy Whitcroft <apw@shadowen.org>,
	Dave Hansen <haveblue@us.ibm.com>
Subject: Re: [PATCH] Get rid of zone_table V2
Date: Mon, 18 Sep 2006 17:31:34 -0700	[thread overview]
Message-ID: <20060918173134.d3850903.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0609181711210.30365@schroedinger.engr.sgi.com>

On Mon, 18 Sep 2006 17:14:20 -0700 (PDT)
Christoph Lameter <clameter@sgi.com> wrote:

> i386 code for __inc_zone_page_state which does
> 
> void __inc_zone_page_state(struct page *page, enum zone_stat_item item)
> {
>         __inc_zone_state(page_zone(page), item);
> }
> EXPORT_SYMBOL(__inc_zone_page_state);
> 
> objdump
> 
> 0000078f <__inc_zone_page_state>:
>  78f:   8b 00                   mov    (%eax),%eax
>  791:   c1 e8 19                shr    $0x19,%eax
>  794:   83 e0 01                and    $0x1,%eax
>  797:   69 c0 80 04 00 00       imul   $0x480,%eax,%eax
>  79d:   05 00 00 00 00          add    $0x0,%eax
>  7a2:   e9 50 fe ff ff          jmp    5f7 <__inc_zone_state>
> Disassembly of section .altinstr_replacement:
> 
> note no lookup anymore.

With the mm tree up to but not including get-rid-of-zone_table.patch:


.globl __inc_zone_page_state
	.type	__inc_zone_page_state, @function
__inc_zone_page_state:
.LFB669:
	.loc 1 259 0
.LVL183:
	pushl	%ebp	#
.LCFI113:
	movl	%esp, %ebp	#,
.LCFI114:
	.loc 1 260 0
	movl	8(%ebp), %eax	# page, page
	movl	12(%ebp), %edx	# item, item
	movl	(%eax), %eax	# <variable>.flags, <variable>.flags
	shrl	$30, %eax	#, <variable>.flags
	movl	zone_table(,%eax,4), %eax	# zone_table, tmp64
	call	__inc_zone_state	#
	.loc 1 261 0
	popl	%ebp	#
	ret

With the mm tree up to and including get-rid-of-zone_table.patch:

.globl __inc_zone_page_state
	.type	__inc_zone_page_state, @function
__inc_zone_page_state:
.LFB669:
	.loc 1 259 0
.LVL183:
	pushl	%ebp	#
.LCFI113:
	movl	%esp, %ebp	#,
.LCFI114:
	.loc 1 260 0
	movl	8(%ebp), %eax	# page, page
	movl	12(%ebp), %edx	# item, item
	movl	(%eax), %eax	# <variable>.flags, <variable>.flags
	shrl	$30, %eax	#, <variable>.flags
	leal	(%eax,%eax,2), %eax	#, tmp65
	leal	(%eax,%eax,8), %eax	#, tmp67
	sall	$5, %eax	#, tmp67
	addl	$contig_page_data, %eax	#, tmp69
	call	__inc_zone_state	#
	.loc 1 261 0
	popl	%ebp	#
	ret


Which is pretty much the same thing.  I assume your objdump was of
an unlinked .o file, so contig_page_data shows up as 0x0.

The code looks OK though.

It would be nice to be able to reclaim a few bits from page->flags - we're
awfully short on them.  

--
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:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-09-19  0:31 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-18 19:21 Christoph Lameter
2006-09-18 20:28 ` Andrew Morton
2006-09-18 22:51   ` Christoph Lameter
2006-09-18 23:15     ` Andrew Morton
2006-09-18 23:46       ` Christoph Lameter
2006-09-18 23:58         ` Andrew Morton
2006-09-19  0:08           ` Christoph Lameter
2006-09-19  0:14           ` Christoph Lameter
2006-09-19  0:31             ` Andrew Morton [this message]
2006-09-19  1:20               ` Christoph Lameter
2006-09-19  6:12               ` Christoph Lameter
2006-09-19  6:33                 ` Andrew Morton
2006-09-19 14:10                   ` Christoph Lameter
2006-09-19 15:38                     ` Andrew Morton
2006-09-19 15:41                       ` Christoph Lameter
2006-09-19 16:23                         ` Nick Piggin
2006-09-19 16:45                           ` Nick Piggin
2006-09-19 17:50                             ` Christoph Lameter
2006-09-19 18:24                               ` Andi Kleen
2006-09-19 16:17                       ` Nick Piggin
2006-09-24 10:06 ` Andrew Morton
2006-09-24 16:58   ` Christoph Lameter
2006-09-27  9:19   ` Andrew Morton
2006-09-27  9:26     ` Andy Whitcroft
2006-09-27 11:23     ` [PATCH] zone table removal miss merge Andy Whitcroft
2006-09-27 16:19       ` Christoph Lameter
2006-09-27 11:27     ` [PATCH] Get rid of zone_table V2 Andy Whitcroft
2006-09-27 16:24       ` Andrew Morton
2006-09-30 18:47       ` Christoph Lameter
2006-09-30 18:48         ` Christoph Lameter
2006-09-30 20:08         ` Andrew Morton
2006-10-02 15:57           ` Christoph Lameter
2006-10-02 17:10           ` Christoph Lameter
2006-10-04 10:10             ` Andy Whitcroft
2006-10-06 14:45             ` [PATCH] zoneid fix up calculations for ZONEID_PGSHIFT Andy Whitcroft
2006-10-06 17:00               ` 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=20060918173134.d3850903.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=apw@shadowen.org \
    --cc=clameter@sgi.com \
    --cc=haveblue@us.ibm.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