From: Arnd Bergmann <arnd@arndb.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
Andi Kleen <ak@suse.de>, Ingo Molnar <mingo@elte.hu>,
Arjan van de Ven <arjan@infradead.org>,
Chris Wright <chrisw@sous-sol.org>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [RFC, Announce] Unified x86 architecture, arch/x86
Date: Sat, 21 Jul 2007 01:55:41 +0200 [thread overview]
Message-ID: <200707210155.42814.arnd@arndb.de> (raw)
In-Reply-To: <1184970779.4012.38.camel@chaos>
On Saturday 21 July 2007, Thomas Gleixner wrote:
> The topic of sharing more x86 code has been discussed on LKML a number
> of times. Various approaches were discussed and we decided to advance
> the discussion by implementing a full solution that brings the
> transition to a shared tree to completion.
Great stuff. I've worked on doing the same for s390 and powerpc
in the past, and really think it's the right thing to do. I've
even started my own x86 merge two or three times in the past
but never got very far because of the quickly moving source.
> In this initial implementation the old arch/i386 and arch/x86_64 trees
> are removed _immediately_, in the same commit, and all future x86
> development goes on in the new, shared tree. So the transition right now
> is one atomic operation.
>
> As a next step we plan to generate a gradual, fully bisectable, fully
> working switchover from the current code to the fully populated
> arch/x86 tree. It will result in about 1000-2000 commits. We are
> releasing our current solution because it 100% represents the finally
> resulting arch/x86 source tree already, and we first wanted to make
> sure that the new architecture layout works fine and folks are happy
> before we go and do the (even more complex) fine-grained work.
I don't think it's really good to do it this way, or maybe I'm still
misunderstanding where you're going. If you really want to end
up with the exact set of files that you have your tree now, I see
absolutely zero point in making it bisectable. On the contrary,
there is nothing particularly complicated in it, so once it has
seen some amount of testing it can better get merged in one
big changeset. I'm just not convinced that it actully is what
we want to end up with.
In my experience, it's very helpful to have a single set of header
files, and merging the two versions of one header usually exposes
bugs that have been fixed in only one of the two, so you get
to fix actual bugs in the process.
In the s390 merge, I also started out in an attempt to guarantee
unchanged object files, much like what you describe. However, it
turned out that fixing it in the process is actually easier.
Either way, 'diff -D __x86_64__' is a great tool for a start, you
should try it out to see how easy it is to merge a lot of files.
To put it into perspective, I think the s390 merge was a lot easier
than the x86 merge, because there is only a very limited set of
hardware configurations for s390 compared to others. We ended up
doing the full merge with three people within less than a week
and no separate files at all.
OTOH, the powerpc merge is now going into its third year, mostly
because it was started with the intention to remove all cruft
in the process and to only allow sane code into the new architecture.
The steps that I'd suggest instead are:
* merge all exported header files of the two architectures. This
alone is a worthy goal, because it allows us to get rid of
the ugly code for deciding which version to use in installed
headers and elsewhere.
* Merge the remaining header files, to end up with a single
include/asm-x86 directory.
* Come up with a model that integrates the machine type selection
of i386 with the way we build things on x86_64. One way would
be to make X86_64 another platform next to X86_PC, X86_VOYAGER
and the others.
* Create an arch/x86/Kconfig that handles the new common
configuration
* Create an arch/x86/Makefile that descends into ../i386/* and
../x86_64/* instead of its subdirectories.
* Merge the arch/x86/* subdirectories, one at a time, starting with
the low-hanging fruit like oprofile or pci, and do the hard
ones like mm and kernel last.
Unfortunately, I don't think I'll spend much time on this, so I
don't get to decide on it, but you asked for feedback ;-)
Arnd <><
next prev parent reply other threads:[~2007-07-21 0:31 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-20 22:32 [RFC, Announce] Unified x86 architecture, arch/x86 Thomas Gleixner
2007-07-20 22:38 ` Jeff Garzik
2007-07-20 22:40 ` Ingo Molnar
2007-07-20 22:42 ` Jeff Garzik
2007-07-20 22:51 ` Linus Torvalds
2007-07-21 2:56 ` Yinghai Lu
2007-07-20 23:55 ` Alan Cox
2007-07-21 0:02 ` H. Peter Anvin
2007-07-21 22:26 ` Oleg Verych
2007-07-20 23:01 ` Arjan van de Ven
2007-07-20 23:23 ` Steven Rostedt
2007-07-21 2:39 ` Glauber de Oliveira Costa
2007-07-20 23:55 ` Michal Piotrowski
2007-07-21 0:03 ` Ingo Molnar
2007-07-21 0:16 ` Michal Piotrowski
2007-07-21 5:40 ` Andi Kleen
2007-07-21 5:50 ` Steven Rostedt
2007-07-21 6:06 ` Andi Kleen
2007-07-21 7:35 ` Adrian Bunk
2007-07-21 7:42 ` Andi Kleen
2007-07-21 8:01 ` Adrian Bunk
2007-07-21 8:15 ` Thomas Gleixner
2007-07-21 8:32 ` Ingo Molnar
2007-07-27 10:50 ` Pavel Machek
2007-07-27 18:11 ` Chris Wright
2007-07-20 23:55 ` Arnd Bergmann [this message]
2007-07-21 1:59 ` Steven Rostedt
2007-07-21 1:01 ` Gabriel C
2007-07-21 5:37 ` Andi Kleen
2007-07-21 5:58 ` Steven Rostedt
2007-07-21 6:09 ` Andi Kleen
2007-07-21 8:15 ` Thomas Gleixner
2007-07-21 8:28 ` Andi Kleen
2007-07-21 13:28 ` Glauber de Oliveira Costa
2007-07-21 9:02 ` Rusty Russell
2007-07-21 11:34 ` Brian Gerst
2007-07-21 12:30 ` Ingo Molnar
2007-07-21 15:11 ` Arjan van de Ven
2007-07-21 6:37 ` Avi Kivity
2007-07-21 10:37 ` David Woodhouse
2007-07-21 10:56 ` Adrian Bunk
2007-07-21 22:25 ` Matt Mackall
2007-07-21 23:51 ` Chris Wright
2007-07-22 7:50 ` Thomas Gleixner
2007-07-22 12:02 ` Matt Mackall
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=200707210155.42814.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=chrisw@sous-sol.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@osdl.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