From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753373AbbLFJyd (ORCPT ); Sun, 6 Dec 2015 04:54:33 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:37170 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753214AbbLFJyK (ORCPT ); Sun, 6 Dec 2015 04:54:10 -0500 Date: Sun, 6 Dec 2015 10:54:06 +0100 From: Ingo Molnar To: Borislav Petkov Cc: Peter Zijlstra , lkml , Thomas Gleixner , Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim Subject: Re: Reorganize perf kernel side Message-ID: <20151206095406.GB4022@gmail.com> References: <20151204211756.GR21177@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151204211756.GR21177@pd.tnic> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Borislav Petkov 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__.c > > can then move to arch/x86/perf//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