public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Greg KH <gregkh@suse.de>, LKML <linux-kernel@vger.kernel.org>,
	Lin Ming <ming.m.lin@intel.com>,
	Stephane Eranian <eranian@google.com>,
	"robert.richter" <robert.richter@amd.com>,
	Corey Ashford <cjashfor@linux.vnet.ibm.com>,
	fweisbec <fweisbec@gmail.com>, paulus <paulus@samba.org>,
	Kay Sievers <kay.sievers@vrfy.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: sysfs: Add an 'events' class. (was: Re: [RFC][PATCH] perf: sysfs type id)
Date: Wed, 10 Nov 2010 14:36:38 +0100	[thread overview]
Message-ID: <20101110133638.GC11388@elte.hu> (raw)
In-Reply-To: <1289392037.2191.105.camel@laptop>


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Tue, 2010-11-09 at 14:13 -0800, Greg KH wrote:
> 
> > You missed the embedded track at Plumbers where we talked about never
> > adding another class to the kernel.  Please use bus_id instead for this.
> 
> I did, it was early and I wasn't aware this all comes under the heading
> of embedded.
> 
> Anyway, anybody got a good example of bus_type I can 'borrow' ?
> 
> Also, it would be really nice if you (plural) could make this subsystem thing 
> happen, calling tihngs a bus that aren't a bus just makes me upset ;-)

Same here - calling events a 'bus' is like totally brain-dead IMHO. It implies 
something hardware, while many events are not related to any hardware component but 
are pure software abstractions: such as context-switches, or syscall entries, or VM 
events.

So i'd rather have 'events' or 'event_source' as a 'class' temporarily, than have it 
as a 'bus' temporarily - and we get the real fix whenever the sysfs unification 
happens.

I also have a question about this future plan mentioned in 
Documentation/sysfs-rules.txt:

 - Hierarchy in a single device tree
   There is only one valid place in sysfs where hierarchy can be examined
   and this is below: /sys/devices.
   It is planned that all device directories will end up in the tree
   below this directory.

So did i get it right, sysfs is going to convert from a VFS hiearchy/enumeration to 
a flat enumeration of entities, all listed in /dev/devices/?

Why is that done? I think it's quite nice that the actual topology is represented 
right now via the sysfs VFS structure - so that we have things like:

   /sys/devices/system/ioapic/ioapic0/

Where there's is a proper hierarchy showing that we have a 'system', which has an 
'ioapic', which has an ioapic numbered '0'. That entity could then grow 'events' and 
have:

   /sys/devices/system/ioapic/ioapic0/events/

And could show various IO-APIC events, such as (future, possible events):

   /sys/devices/system/ioapic/ioapic0/events/irq/
   /sys/devices/system/ioapic/ioapic0/events/register-read/
   /sys/devices/system/ioapic/ioapic0/events/register-write/
   /sys/devices/system/ioapic/ioapic0/events/affinity/
   [...]

So is the plan to get rid of such rich hiearchies and just use a flat store of 
everything in /sys/devices/?

My hope would be to _increase_ the depth of sysfs in the future, to express every 
meaningful hiearchy that exists in the system (be that hw hierarchy or some sw 
abstraction hierarchy). But maybe i got it all wrong so please advise.

Thanks,

	Ingo

  reply	other threads:[~2010-11-10 13:37 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-09 21:45 [RFC][PATCH] perf: sysfs type id Peter Zijlstra
2010-11-09 22:11 ` Kay Sievers
2010-11-09 22:22   ` Peter Zijlstra
2010-11-09 22:40     ` Kay Sievers
2010-11-09 22:13 ` Greg KH
2010-11-09 23:36   ` Michael Ellerman
     [not found]     ` <AANLkTi=UftgQn0ydRd2wszqFtpRrkEcW7dzfapKKix_V@mail.gmail.com>
     [not found]       ` <1289350360.22787.9.camel@concordia>
     [not found]         ` <AANLkTikGHNkUN6t9rPhdE6XOQiqb5xAzH_9eY6L9h2H2@mail.gmail.com>
2010-11-10  1:10           ` Michael Ellerman
2010-11-10  1:19             ` Kay Sievers
2010-11-10  1:45               ` Michael Ellerman
2010-11-10  1:59                 ` Kay Sievers
2010-11-10  3:37                   ` Michael Ellerman
2010-11-10  2:11                 ` Kay Sievers
2010-11-10 17:31     ` Greg KH
2010-11-10 12:27   ` Peter Zijlstra
2010-11-10 13:36     ` Ingo Molnar [this message]
2010-11-10 14:14       ` sysfs: Add an 'events' class. (was: Re: [RFC][PATCH] perf: sysfs type id) Kay Sievers
2010-11-10 15:00         ` Ingo Molnar
2010-11-11  6:39           ` Kay Sievers
2010-11-10 13:01 ` [RFC][PATCH] perf: sysfs type id Stephane Eranian
2010-11-10 14:10   ` Peter Zijlstra
2010-11-10 14:19     ` Peter Zijlstra
2010-11-10 20:08       ` Stephane Eranian
2010-11-10 20:32         ` Peter Zijlstra
2010-11-10 20:53           ` Stephane Eranian
2010-11-10 21:05             ` Peter Zijlstra
2010-11-17  2:35               ` Corey Ashford
2010-11-17  7:02                 ` Kyle Moffett
2010-11-17 11:30                   ` Peter Zijlstra
2010-11-17 11:25                 ` Peter Zijlstra
2010-11-17 19:47                   ` Corey Ashford
2010-11-17 19:57                     ` Peter Zijlstra
2010-11-17 20:01                       ` Peter Zijlstra
2010-11-17 21:39                         ` Corey Ashford
2010-11-10 14:24     ` Stephane Eranian

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=20101110133638.GC11388@elte.hu \
    --to=mingo@elte.hu \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cjashfor@linux.vnet.ibm.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=gregkh@suse.de \
    --cc=hpa@zytor.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=robert.richter@amd.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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