Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1284827
| Path | csiph.com!goblin1!goblin2!goblin.stu.neva.ru!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Ingo Molnar <mingo@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | Re: Reorganize perf kernel side |
| Date | Sun, 06 Dec 2015 11:00:02 +0100 |
| Message-ID | <qCEgO-5hr-15@gated-at.bofh.it> (permalink) |
| References | <qC5VL-81F-1@gated-at.bofh.it> |
| X-Original-To | Borislav Petkov <bp@alien8.de> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=TZ1vPddLa1GrzNPcQUQ2msg69hgO73u9h8Cxa19zvpI=; b=L8FbcZpoDdq4IJjceUyPUKxuNxljtfOd0qFqoFQsyaaAWfNPRv/KAtURQtqLl9s3Kt mDtfBhMfeviy2s2qkHZVLxO24QvGLObV3IRUBLuL+lzzubARL47t/TQMSfLNoWLNsxz0 PF7UTj2SkbVFMYuwrLBi5cJ03bCRFNTJhSvxkOmE+mf40J2PB5cr2agCjvO508Itp5Ds QQC/PB57W0wqb/50NMkUI7VLrJt50YbA35PfgLf8GpmRZxdQZqlxrbP61tA660tUhVrD L8nlqreq1jtDzL4k8QpZ1aFOAe2QfcOgpAf102MjMkE0skvVhQtxhgtUqy0IEMucaNQ0 RuYg== |
| X-Received | by 10.28.73.11 with SMTP id w11mr14143992wma.44.1449395649204; Sun, 06 Dec 2015 01:54:09 -0800 (PST) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 73 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Peter Zijlstra <peterz@infradead.org>, lkml <linux-kernel@vger.kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Arnaldo Carvalho de Melo <acme@infradead.org>, Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org> |
| X-Original-Date | Sun, 6 Dec 2015 10:54:06 +0100 |
| X-Original-Message-ID | <20151206095406.GB4022@gmail.com> |
| X-Original-References | <20151204211756.GR21177@pd.tnic> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1284827 |
Show key headers only | View raw
* Borislav Petkov <bp@alien8.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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Reorganize perf kernel side Borislav Petkov <bp@alien8.de> - 2015-12-04 22:20 +0100
Re: Reorganize perf kernel side Peter Zijlstra <peterz@infradead.org> - 2015-12-04 23:10 +0100
Re: Reorganize perf kernel side Borislav Petkov <bp@alien8.de> - 2015-12-04 23:50 +0100
Re: Reorganize perf kernel side Ingo Molnar <mingo@kernel.org> - 2015-12-06 11:00 +0100
csiph-web