All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Ebbert <cebbert.lkml@gmail.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: linux-kernel@vger.kernel.org,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Jiri Kosina <jkosina@suse.cz>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Jason Baron <jbaron@akamai.com>,
	yrl.pp-manager.tt@hitachi.com, Borislav Petkov <bpetkov@suse.de>,
	Ingo Molnar <mingo@kernel.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: i915.ko WC writes are slow after ea8596bb2d8d379
Date: Wed, 8 Oct 2014 05:10:59 -0500	[thread overview]
Message-ID: <20141008051059.65566251@as> (raw)
In-Reply-To: <20141008090336.GD12897@nuc-i3427.alporthouse.com>

On Wed, 8 Oct 2014 10:03:36 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> 
> I ran into a problem on a Sandybridge i5-2500s whilst measuring the
> performance of GTT write-combining access. I found subsequent runs were
> about 10-40x slower than the first. For example,
> 
> igt/gem_gtt_speed:
> 
> Time to read 16k through a GTT map:             325.285µs
> Time to write 16k through a GTT map:              4.729µs
> Time to clear 16k through a GTT map:              4.584µs
> Time to clear 16k through a cached GTT map:       1.342µs
> 
> on the second run became:
> 
> Time to read 16k through a GTT map:             332.148µs
> Time to write 16k through a GTT map:            209.411µs
> Time to clear 16k through a GTT map:             56.460µs
> Time to clear 16k through a cached GTT map:      50.897µs
> 
> Naively I would say that we lost the wc on our ioremap.
> /sys/kernel/debug/x86/pat_memtype_list remained the same across repeated
> runs.
> 
> A bisection pointed to 
> 
> commit ea8596bb2d8d37957f3e92db9511c50801689180
> Author: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Date:   Thu Jul 18 20:47:53 2013 +0900
> 
>     kprobes/x86: Remove unused text_poke_smp() and text_poke_smp_batch() functions
> 
> of which the active ingredient was just
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index b32ebf9..f4001e0 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2334,7 +2334,6 @@ config HAVE_ATOMIC_IOMAP
>  
>  config HAVE_TEXT_POKE_SMP
>         bool
> -       select STOP_MACHINE if SMP
>  
>  config X86_DEV_DMA_OPS
>         bool
> 
> and adding that back into the current build, e.g.

Hmm, set_mtrr() uses stop_machine(). I wonder if your MTRRs are out of
sync and your results depend on which CPU the test runs on?

> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 3632743..48a8a69 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -87,6 +87,7 @@ config X86
>         select HAVE_USER_RETURN_NOTIFIER
>         select ARCH_BINFMT_ELF_RANDOMIZE_PIE
>         select HAVE_ARCH_JUMP_LABEL
> +       select STOP_MACHINE
>         select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
>         select SPARSE_IRQ
>         select GENERIC_FIND_FIRST_BIT
> 
> fixes the regression.
> 
> For the record, this kernel build doesn't use modules, which seems relevant
> in light of ea8596bb2 "fixes a Kconfig dependency issue on STOP_MACHINE
> in the case of CONFIG_SMP && !CONFIG_MODULE_UNLOAD".

  reply	other threads:[~2014-10-08 10:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08  9:03 i915.ko WC writes are slow after ea8596bb2d8d379 Chris Wilson
2014-10-08 10:10 ` Chuck Ebbert [this message]
2014-10-08 19:49   ` Chris Wilson
2014-10-08 21:36     ` H. Peter Anvin
2014-10-09  6:53       ` Chris Wilson
2014-10-09 12:44         ` Chuck Ebbert
2014-10-09 13:00           ` Chris Wilson
2014-10-09 14:46             ` Chuck Ebbert
2014-10-09 15:14               ` Chris Wilson
2015-11-18 14:48   ` Chris Wilson
2015-11-18 15:57     ` Andy Lutomirski
2015-11-19  8:14       ` Ingo Molnar
2015-11-19 10:03         ` [PATCH] kernel: Remove stop_machine() Kconfig dependency Chris Wilson
2015-11-19  8:16     ` i915.ko WC writes are slow after ea8596bb2d8d379 Ingo Molnar
2014-10-08 17:47 ` Chuck Ebbert
2014-10-09  1:45   ` Masami Hiramatsu

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=20141008051059.65566251@as \
    --to=cebbert.lkml@gmail.com \
    --cc=bpetkov@suse.de \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=hpa@linux.intel.com \
    --cc=jbaron@akamai.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=yrl.pp-manager.tt@hitachi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.