From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Anvin <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
the arch/x86 maintainers <x86@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ning Qu <quning@google.com>
Subject: Re: [RFC] de-asmify the x86-64 system call slowpath
Date: Thu, 6 Feb 2014 02:55:34 +0200 [thread overview]
Message-ID: <20140206005534.GA27848@node.dhcp.inet.fi> (raw)
In-Reply-To: <CA+55aFxpBkTn3LvSzxFj7ZoxuY=Rrg0OoAVuk5dK-ZLsO8kk4A@mail.gmail.com>
On Wed, Feb 05, 2014 at 04:32:55PM -0800, Linus Torvalds wrote:
> On Sun, Jan 26, 2014 at 2:28 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > Comments? This was obviously brought on by my frustration with the
> > currently nasty do_notify_resume() always returning to iret for the
> > task_work case, and PeterZ's patch that fixed that, but made the asm
> > mess even *worse*.
>
> Actually, I should have taken a closer look.
>
> Yes, do_notify_resume() is a real issue, and my stupid open/close
> test-case showed that part of the profile.
>
> But the "iretq" that dominates on the kernel build is actually the
> page fault one.
>
> I noticed this when I compared "-e cycles:pp" with "-e cycles:p". The
> single-p version shows largely the same profile for the kernel, except
> that instead of showing "iretq" as the big cost, it shows the first
> instruction in "page_fault".
>
> In fact, even when *not* zoomed into the kernel DSO, "page_fault"
> actually takes 5% of CPU time according to pref report. That's really
> quite impressive.
>
> I suspect the Haswell architecture has made everything else cheaper,
> and the exception overhead hasn't kept up. I'm wondering if there is
> anything we could do to speed this up - like doing gang lookup in the
> page cache and pre-populating the page tables opportunistically.
One thing that could help is THP for file-backed pages. And there's
prototype with basic infrasturure and support for ramfs and
shmem/tmpfs (by Ning Qu). Work in progress.
--
Kirill A. Shutemov
next prev parent reply other threads:[~2014-02-06 0:58 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-26 22:28 [RFC] de-asmify the x86-64 system call slowpath Linus Torvalds
2014-01-27 0:22 ` Al Viro
2014-01-27 4:32 ` Linus Torvalds
2014-01-27 4:48 ` H. Peter Anvin
2014-01-27 7:42 ` Al Viro
2014-01-27 22:06 ` Andy Lutomirski
2014-01-27 22:17 ` Linus Torvalds
2014-01-27 22:32 ` Al Viro
2014-01-27 22:43 ` Linus Torvalds
2014-01-27 22:46 ` Andy Lutomirski
2014-01-28 0:22 ` H. Peter Anvin
2014-01-28 0:44 ` Andy Lutomirski
2014-01-27 23:07 ` Al Viro
2014-01-27 10:27 ` Peter Zijlstra
2014-01-27 11:36 ` Al Viro
2014-01-27 17:39 ` Oleg Nesterov
2014-01-28 1:18 ` Al Viro
2014-01-28 16:38 ` Oleg Nesterov
2014-01-28 16:48 ` Al Viro
2014-01-28 17:19 ` Oleg Nesterov
2014-02-06 0:32 ` Linus Torvalds
2014-02-06 0:55 ` Kirill A. Shutemov [this message]
2014-02-06 2:32 ` Linus Torvalds
2014-02-06 4:33 ` Linus Torvalds
2014-02-06 21:29 ` Linus Torvalds
2014-02-06 22:24 ` Kirill A. Shutemov
2014-02-07 1:31 ` Linus Torvalds
2014-02-07 15:42 ` [RFC, PATCH] mm: map few pages around fault address if they are in page cache Kirill A. Shutemov
2014-02-07 17:32 ` Andi Kleen
2014-02-07 17:56 ` Kirill A. Shutemov
2014-02-07 18:11 ` Andi Kleen
2014-02-06 5:42 ` [RFC] de-asmify the x86-64 system call slowpath Ingo Molnar
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=20140206005534.GA27848@node.dhcp.inet.fi \
--to=kirill@shutemov.name \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=quning@google.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@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).