public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ravikiran G Thirumalai <kiran@in.ibm.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@digeo.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch] Inline vm_acct_memory
Date: Thu, 29 May 2003 15:22:20 +0530	[thread overview]
Message-ID: <20030529095220.GA21263@in.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0305290656010.1317-100000@localhost.localdomain>

On Thu, May 29, 2003 at 06:59:47AM +0100, Hugh Dickins wrote:
> On Thu, 29 May 2003, Ravikiran G Thirumalai wrote:
> > ...
> > Vanilla
> > -------
> > vm_enough_memory 786 778 780 735
> > vm_acct_memory	870 952 884 898
> > -----------------------------------
> > tot of above    1656 1730 1664 1633
> > 
> > do_mmap_pgoff 	3559 3673 3669 3807
> > expand_stack	27 34 33 42
> > unmap_region	236 267 280 280
> > do_brk		594 596 615 615
> > exit_mmap	51 52 44 52	
> > mprotect_fixup	47 55 55 57
> > do_mremap	0 2 1 1
> > poll_idle	101553 108687 89281 86251
> > 
> > Inline
> > ------
> > vm_enough_memory 1539 1488 1488 1472
> > do_mmap_pgoff 	3510 3523 3436 3475
> > expand_stack	27 33 32 27
> > unmap_region	295 340 311 349
> > do_brk		641 583 659 640
> > exit_mmap	33 52 44 42
> > mprotect_fixup	54 65 73 64
> > do_mremap	2 0 0 0
> > poll_idle	98733 85659 104994 103096
> 
> There does look to be a regression in unmap_region.

Yeah, but there is an improvement of a greater magnitude in do_mmap_pgoff
...by about 190 ticks. There is a regression of about 60 ticks in 
unmap_region (taking standard deviation into consideration).  Change
in ticks for do_brk is not statistically significant.

> 
> Though I'd be reluctant to assign much general significance
> to any of these numbers (suspect it might all come out quite
> differently on another machine, another config, another run).
>

I agree with this for vm_unacct_memory, since it is called from many
places.  Based on the workload, nos could be different (if all the
callsites are called with comparable frequency).   
However, if the workload is such that one particular caller is
stressed much more than other callers, then, maybe inlining  helps 
as in this case where do_mmap_pgoff is stresed more?  

> But the probable best course is just to inline vm_acct_memory
> as you did, but also uninline vm_unacct_memory: placing the
> static inline vm_acct_memory and then vm_unacct_memory just
> before vm_enough_memory in mm/mmap.c.

Sounds reasonable.  I'll give this a run and see how the profiles look.

Thanks,
Kiran

      reply	other threads:[~2003-05-29  9:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-28 11:05 [patch] Inline vm_acct_memory Ravikiran G Thirumalai
2003-05-28 11:04 ` Andrew Morton
2003-05-28 15:45 ` Hugh Dickins
2003-05-29  2:23   ` Andrew Morton
2003-05-29  4:43     ` Ravikiran G Thirumalai
2003-05-29  5:59       ` Hugh Dickins
2003-05-29  9:52         ` Ravikiran G Thirumalai [this message]

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=20030529095220.GA21263@in.ibm.com \
    --to=kiran@in.ibm.com \
    --cc=akpm@digeo.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.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