From: Benjamin LaHaise <bcrl@linux.intel.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] get_empty_filp tweaks, inline epoll_init_file()
Date: Mon, 23 Jan 2006 21:49:54 -0800 [thread overview]
Message-ID: <20060124054954.GB16694@linux.intel.com> (raw)
In-Reply-To: <20060123214451.7e2fc885.akpm@osdl.org>
On Mon, Jan 23, 2006 at 09:44:51PM -0800, Andrew Morton wrote:
> Benjamin LaHaise <bcrl@linux.intel.com> wrote:
> >
> > This patch eliminates a handful of cache references by keeping current
> > in a register instead of reloading (helps x86)
>
> Are you sure it helps? I was checking that the other day and found that the
> compiler caches current quite competently.
I was looking at the code on x86-64 where it reloads from %gs:0, but x86
reloads current too.
0xc015599b <get_empty_filp+105>: mov $0xfffff000,%eax
0xc01559a0 <get_empty_filp+110>: and %esp,%eax
- eax is current_thread_info()
0xc01559a2 <get_empty_filp+112>: mov (%eax),%edx
- dereference to get current
0xc01559a4 <get_empty_filp+114>: mov 0x174(%edx),%edx
- load current->fsuid
0xc01559aa <get_empty_filp+120>: mov %edx,0x48(%esi)
- store in file->f_uid
0xc01559ad <get_empty_filp+123>: mov (%eax),%eax
- reload current
0xc01559af <get_empty_filp+125>: mov 0x184(%eax),%eax
- load current->fsgid
0xc01559b5 <get_empty_filp+131>: mov %eax,0x4c(%esi)
- store in file->f_gid
-ben
prev parent reply other threads:[~2006-01-24 5:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-24 5:28 [PATCH] get_empty_filp tweaks, inline epoll_init_file() Benjamin LaHaise
2006-01-24 5:44 ` Andrew Morton
2006-01-24 5:49 ` Benjamin LaHaise [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=20060124054954.GB16694@linux.intel.com \
--to=bcrl@linux.intel.com \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).