[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150901125512.GA13857@gmail.com>
Date: Tue, 1 Sep 2015 14:55:12 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: 平松雅巳 / HIRAMATU,MASAMI
<masami.hiramatsu.pt@...achi.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jiri Olsa <jolsa@...hat.com>,
Andy Lutomirski <luto@...capital.net>,
Denys Vlasenko <dvlasenk@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Qiaowei Ren <qiaowei.ren@...el.com>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 0/4] x86/insn: perf tools: Add a few new x86 instructions
* Adrian Hunter <adrian.hunter@...el.com> wrote:
> > Agreed, what I concern is that someone finds a bug and fixes one of them and
> > another is not fixed.
> >
> > I'll see the forked version and check if it can be merged into the kernel.
>
> Ever since Linus complained about perf tools including kernel headers, I have
> assumed we should have separate source code. That email thread was not cc'ed to
> a mailing list but here is a quote:
>
> Em Sat, Jul 04, 2015 at 08:53:46AM -0700, Linus Torvalds escreveu:
>
> > So this is more fundamental, and looks like it's just due to perf abusing the
> > kernel headers, and now that rbtree has rcu support ("rbtree: Make lockless
> > searches non-fatal"), it gets tons of headers included that really don't work
> > from user space.
> >
> > There might be other things going on, but the rbtree one seems to be a big
> > one. I think perf needs to get its own rbtree header or something, instead of
> > doing that insane "let's include random core kernel headers" thing.
Note that even plain copying and occasional back-merges isn't a bad solution: it's
better than 'messy sharing' of code.
But we can also share code in a bit more organized fashion, and any of the two
solutions I proposed solve these complications:
- if we do the diff -u check warning during perf build then the forked versions
won't stay forked for long. This is the simplest variant.
- if we librarize this functionality into tools/lib/x86/decode/ (and make sure
it's a library that can be linked into the kernel) then we are back to shared
code.
The problem wasn't to share code per se, the problem was to share code in a messy
way, without making it apparent that it's shared code: which made it easy to break
the tools/perf build via harmless looking kernel side changes.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists