[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151206095406.GB4022@gmail.com>
Date: Sun, 6 Dec 2015 10:54:06 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Borislav Petkov <bp@...en8.de>
Cc: Peter Zijlstra <peterz@...radead.org>,
lkml <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>
Subject: Re: Reorganize perf kernel side
* Borislav Petkov <bp@...en8.de> wrote:
> Hi guys,
>
> so I've had my eyes on this for a long time now and it has managed to
> get on my nerves just enough to do something about it :-)
>
> So how about moving perf stuff to arch/x86/perf/ and get rid of the
> prefixes in the filenames. This also flattens our folder structure which
> is a good thing and which we've been talking about in the past.
>
> In order to diminish churn, I can do the whole thing in 4-5 patches'
> sets, after having run enough *config smoke tests and 0day bot too.
> Anyway, something like that.
>
> perf_event_<vendor>_<type>.c
>
> can then move to arch/x86/perf/<vendor>/type.c
>
> and have much saner structure.
>
> Thoughts?
Yeah, it would be lovely if you could do that - but could we please name it
'events' instead of 'perf', to follow the existing namespace pattern we are using
for the core bits, where we have kernel/events/ for the core bits, not
kernel/perf/?
Also, how about naming the core x86 bits like this:
arch/x86/events/core.c
which would give us a clear path to split-out core functionality eventually, such
as:
arch/x86/events/sched.c
arch/x86/events/constraints.c
...etc...
...
Just like we've already split out functionality from kernel/events/core.c into
kernel/events/ring_buffer.c.
Btw., kernel/sched/ is using a similar approach, there's core.c, and various
split-out sub-modules. We are slowly migrating from the original humunguous
kernel/sched.c to a more finegrained kernel/sched/subsys.c structure.
... and as you suggested, the x86 vendor dependent bits would be in their own, but
easily accessible directory close to the core, as you suggested:
arch/x86/events/intel/
arch/x86/events/amd/
...
as a lot of work is happening in that space, so promoting it up in the namespace
helps.
So, as an example, we'd have renames like this:
arch/x86/kernel/cpu/perf_event_intel_uncore_nhmex.c
=> arch/x86/events/intel/uncore_nhmex.c
which will be 30% easier to type! Once our muscle memory has re-trained that is. ;-)
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