Re: [RFC PATCH 0/7] x86/entry: Create a home for the x86 entry code in arch/x86/entry/

Ingo Molnar
2015-06-05T07:37:37Z

* H. Peter Anvin <hpa@zytor.com> wrote:

> I really dislike deep hierarchies, as I said, because my experience has been
> that they are more confusing than they are helpful, especially over time. The
> arch-example of badness is of course arch/x86/kernel, which is a total
> catch-all, but

Well, directory hierarchy can certainly be overdone, but in general the Linux
kernel has the exact opposite problem: too shallow directory organization due to
two decades of organic growth.

We've been actively working over the last two years to improve the source code
hierarchy gradually: kernel/rcu/, kernel/locking/, kernel/events/, kernel/sched/
and kernel/time/ are all examples of that process. It worked out pretty well IMHO.

This series actively depopulates various catch-all places such as arch/x86/kernel/
and arch/x86/lib/ and moves related code closer to each other.

The purpose of arch/x86/entry/ is:

- implementation of the high level runtime interfaces to enter/exit (call) the
Linux kernel, both for hardware and for software defined ABIs.

Each of the files moved directly relate to these interfaces. It's not limited to
kernel mode entries alone.

We could rename it to arch/x86/abi/, although that would be somewhat confusing I
suspect because it's too generic a name?

Anyway, I pushed this out as it's a step forward and to not hold up ongoing asm
work - we'll see how it works out in practice!

Thanks,

Ingo