All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Kees Cook <keescook@chromium.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Joe Perches <joe@perches.com>, Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
	"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
	<x86@kernel.org>, Kan Liang <kan.liang@linux.intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Shawn Landden <shawn@git.icu>
Subject: Re: [PATCH] perf/x86/intel: Mark expected switch fall-throughs
Date: Tue, 25 Jun 2019 21:53:09 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1906252127290.32342@nanos.tec.linutronix.de> (raw)
In-Reply-To: <20190625180525.GA119831@archlinux-epyc>

On Tue, 25 Jun 2019, Nathan Chancellor wrote:
> On Tue, Jun 25, 2019 at 10:12:42AM -0700, Kees Cook wrote:
> > On Tue, Jun 25, 2019 at 09:18:46AM +0200, Peter Zijlstra wrote:
> > > Can it build a kernel without patches yet? That is, why should I care
> > > what LLVM does?
> > 
> > Yes. LLVM trunk builds and boots x86 now. As for distro availability,
> > AIUI, the asm-goto feature missed the 9.0 LLVM branch point, so it'll
> > appear in the following release.
> > 
> > -- 
> > Kees Cook
> 
> I don't think that's right. LLVM 9 hasn't been branched yet so it should
> make it in.
> 
> http://lists.llvm.org/pipermail/llvm-dev/2019-June/133155.html
> 
> If anyone wants to play around with it before then, we wrote a
> self-contained script that will build an LLVM toolchain suitable for
> kernel development:
> 
> https://github.com/ClangBuiltLinux/tc-build

Useful!

But can the script please check for a minimal clang version required to
build that thing.

The default clang-3.8 which is installed on Debian stretch explodes. The
6.0 variant from backports works as advertised.

Kernel builds with the new shiny compiler. Jump labels seem to be enabled.

It complains about a few type conversions:

 arch/x86/kvm/mmu.c:4596:39: warning: implicit conversion from 'int' to 'u8' (aka 'unsigned char') changes value from -205 to 51 [-Wconstant-conversion]
                u8 wf = (pfec & PFERR_WRITE_MASK) ? ~w : 0;
                   ~~                               ^~

but it also makes objtool unhappy:

 arch/x86/events/intel/core.o: warning: objtool: intel_pmu_nhm_workaround()+0xb3: unreachable instruction
 kernel/fork.o: warning: objtool: free_thread_stack()+0x126: unreachable instruction
 mm/workingset.o: warning: objtool: count_shadow_nodes()+0x11f: unreachable instruction
 arch/x86/kernel/cpu/mtrr/generic.o: warning: objtool: get_fixed_ranges()+0x9b: unreachable instruction
 arch/x86/kernel/platform-quirks.o: warning: objtool: x86_early_init_platform_quirks()+0x84: unreachable instruction
 drivers/iommu/irq_remapping.o: warning: objtool: irq_remap_enable_fault_handling()+0x1d: unreachable instruction

Kernel boots. As I'm currently benchmarking VDSO performance, this was
obviosly my first test. Compared to the same kernel built with gcc6.3 the
performance of the VDSO drops slightly.

It's below 1%. Though I need to run the same tests on 4 other uarchs to get
the full picture. This stuff is randomly changing behaviour accross uarchs
depending on how the c source is arranged. So nothing to worry about (yet).

Thanks,

	tglx


  reply	other threads:[~2019-06-25 19:53 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 16:19 [PATCH] perf/x86/intel: Mark expected switch fall-throughs Gustavo A. R. Silva
2019-06-24 19:31 ` Peter Zijlstra
2019-06-24 19:45   ` Joe Perches
2019-06-24 20:37     ` Peter Zijlstra
2019-06-24 20:53       ` Gustavo A. R. Silva
2019-06-24 20:57         ` Joe Perches
2019-06-25  7:20           ` Peter Zijlstra
2019-06-24 22:28         ` Miguel Ojeda
2019-06-25  7:18           ` Peter Zijlstra
2019-06-25 12:47             ` Miguel Ojeda
2019-06-25 18:15               ` Nick Desaulniers
2019-06-25 22:29                 ` Joe Perches
2019-06-25 22:57                   ` Nick Desaulniers
2019-06-25 23:25                     ` Joe Perches
2019-06-26  8:49                 ` Peter Zijlstra
2019-06-26 22:14                   ` Nick Desaulniers
2019-06-27  7:12                     ` Peter Zijlstra
2019-06-28 13:31                       ` Peter Zijlstra
2019-06-28 18:44                         ` Nick Desaulniers
2019-06-29  7:10                           ` Peter Zijlstra
2019-06-25 17:12             ` Kees Cook
2019-06-25 18:05               ` Nathan Chancellor
2019-06-25 19:53                 ` Thomas Gleixner [this message]
2019-06-25 20:27                   ` Nathan Chancellor
2019-06-25 20:37                     ` Nick Desaulniers
2019-06-25 21:47                     ` Thomas Gleixner
2019-06-26  5:10                       ` Nathan Chancellor
2019-06-26 15:18                         ` Thomas Gleixner
2019-06-26 19:00                           ` Nathan Chancellor
2019-06-26 19:46                             ` Thomas Gleixner
2019-06-26 20:03                               ` Nathan Chancellor
2019-06-26  9:24                       ` Peter Zijlstra
2019-06-26  9:55                         ` Peter Zijlstra
2019-06-26 22:23                           ` Nick Desaulniers
2019-06-27  7:35                             ` Peter Zijlstra
2019-06-26 10:43                         ` Peter Zijlstra
2019-06-26 22:15                         ` Nick Desaulniers
2019-06-27  7:16                           ` Peter Zijlstra
2019-06-26 16:30                       ` Peter Zijlstra
2019-06-26 22:33                         ` Nick Desaulniers
2019-06-26 23:11                           ` Thomas Gleixner
2019-06-27  7:11                           ` Peter Zijlstra
2019-06-25 23:46                     ` Arnaldo Carvalho de Melo
2019-06-26  5:14                       ` Nathan Chancellor
2019-06-25 20:09                 ` Kees Cook
2019-06-26  8:06               ` Peter Zijlstra
2019-06-25  7:15         ` Peter Zijlstra
2019-07-25 16:27 ` [tip:perf/urgent] " tip-bot for Gustavo A. R. Silva
2019-07-25 17:06   ` Borislav Petkov
2019-07-25 17:35     ` Peter Zijlstra
2019-07-25 23:18       ` Joe Perches
2019-07-25 23:28         ` Kees Cook

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=alpine.DEB.2.21.1906252127290.32342@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=gustavo@embeddedor.com \
    --cc=hpa@zytor.com \
    --cc=joe@perches.com \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@linux.intel.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=peterz@infradead.org \
    --cc=shawn@git.icu \
    --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 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.