Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964801AbWEBNAR (ORCPT ); Tue, 2 May 2006 09:00:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964802AbWEBNAQ (ORCPT ); Tue, 2 May 2006 09:00:16 -0400 Received: from mtagate4.de.ibm.com ([195.212.29.153]:39607 "EHLO mtagate4.de.ibm.com") by vger.kernel.org with ESMTP id S964801AbWEBNAO (ORCPT ); Tue, 2 May 2006 09:00:14 -0400 In-Reply-To: <20060429075311.GB1886@kroah.com> Subject: Re: [PATCH] s390: Hypervisor File System To: Greg KH , joel.becker@oracle.com Cc: akpm@osdl.org, ioe-lkml@rameria.de, joern@wohnheim.fh-wedel.de, linux-kernel@vger.kernel.org, mschwid2@de.ibm.com, penberg@cs.helsinki.fi X-Mailer: Lotus Notes Build V70_M4_01112005 Beta 3NP January 11, 2005 Message-ID: From: Michael Holzheu Date: Tue, 2 May 2006 15:00:20 +0200 X-MIMETrack: Serialize by Router on D12ML061/12/M/IBM(Release 6.53HF654 | July 22, 2005) at 02/05/2006 15:01:22 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4028 Lines: 94 Hi Greg and Joel, Greg KH wrote on 04/29/2006 09:53:11 AM: > On Fri, Apr 28, 2006 at 11:22:25AM +0200, Michael Holzheu wrote: > > On zSeries machines there exists an interface which allows the operating > > system to retrieve LPAR hypervisor accounting data. For example, it is > > possible to get usage data for physical and virtual cpus. In order to > > provide this information to user space programs, I implemented a new > > virtual Linux file system named 'hypfs' using the Linux 2.6 libfs > > framework. The name 'hypfs' stands for 'Hypervisor Filesystem'. All the > > accounting information is put into different virtual files which can be > > accessed from user space. All data is represented as ASCII strings. > > > > When the file system is mounted the accounting information is retrieved > > and a file system tree is created with the attribute files containing > > the cpu information. The content of the files remains unchanged until a > > new update is made. An update can be triggered from user space through > > writing 'something' into a special purpose update file. > > > > We create the following directory structure: > > > > / > > update > > cpus/ > > > > type > > mgmtime > > > > ... > > hyp/ > > type > > systems/ > > > > cpus/ > > > > type > > mgmtime > > cputime > > onlinetime > > > > ... > > > > cpus/ > > ... > > > > - update: File to trigger update > > - cpus/: Directory for all physical cpus > > - cpus//: Directory for one physical cpu. > > - cpus//type: Type name of physical zSeries cpu. > > - cpus//mgmtime: Physical-LPAR-management time in microseconds. > > - hyp/: Directory for hypervisor information > > - hyp/type: Typ of hypervisor (currently only 'LPAR Hypervisor') > > - systems/: Directory for all LPARs > > - systems//: Directory for one LPAR. > > - systems//cpus//: Directory for the virtual cpus > > - systems//cpus//type: Typ of cpu. > > - systems//cpus//mgmtime: > > Accumulated number of microseconds during which a physical > > CPU was assigned to the logical cpu and the cpu time was > > consumed by the hypervisor and was not provided to > > the LPAR (LPAR overhead). > > > > - systems//cpus//cputime: > > Accumulated number of microseconds during which a physical CPU > > was assigned to the logical cpu and the cpu time was consumed > > by the LPAR. > > > > - systems//cpus//onlinetime: > > Accumulated number of microseconds during which the logical CPU > > has been online. > > > > As mount point for the filesystem /sys/hypervisor is created. > > > > The update process is triggered when writing 'something' into the > > 'update' file at the top level hypfs directory. You can do this e.g. > > with 'echo 1 > update'. During the update the whole directory structure > > is deleted and built up again. > > This sounds a lot like configfs. Why not use that instead? > After having a deeper look into configfs, I do not understand how to create a directory tree. Is it somehow possible to create a directory tree as a result of mkdir? Maybe I missed here something... Michael - 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/