public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Paul Jackson <pj@sgi.com>
Cc: laijs@cn.fujitsu.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove unnecessary memmove() in cgroup_path()
Date: Thu, 22 May 2008 03:24:56 -0500	[thread overview]
Message-ID: <20080522032456.21b805a4.pj@sgi.com> (raw)
In-Reply-To: <20080522030324.2b650f93.pj@sgi.com>

One more question ... how does the kernel text size (size vmlinux)
change with this patch?

It may well be that the kernel gets a few bytes -larger-, rather than
smaller, due to the extra instructions involved in manipulating the
more indirect buffer pointer and in tracking the value of that pointer
on cgroup_path() entry separately from the value on return.

If that's the case, then the net performance impact of this patch might
be negative, depending on how one measures it.  Given the increasingly
high costs of cache misses on modern CPU architectures, it is often
better to execute a few additional instructions that are likely already
in the cache (as 'memmove()' might be) than to increase the kernel text
size with rarely executed code lines that will (1) miss the cache more
often, even though (2) they consume fewer CPU cycles to execute.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.940.382.4214

  reply	other threads:[~2008-05-22  8:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-22  7:30 [PATCH] remove unnecessary memmove() in cgroup_path() Lai Jiangshan
2008-05-22  8:03 ` Paul Jackson
2008-05-22  8:24   ` Paul Jackson [this message]
2008-05-22  8:25   ` Li Zefan
2008-05-22  8:39 ` Paul Jackson

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=20080522032456.21b805a4.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=laijs@cn.fujitsu.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