From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [patch 3/8] procfs: Add ability to plug in auxiliary fdinfo providers Date: Tue, 14 Aug 2012 19:31:42 +0100 Message-ID: <20120814183142.GH23464@ZenIV.linux.org.uk> References: <20120814140342.354405844@openvz.org> <20120814140620.033884909@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Alexey Dobriyan , Andrew Morton , Pavel Emelyanov , James Bottomley , Matthew Helsley To: Cyrill Gorcunov Return-path: Content-Disposition: inline In-Reply-To: <20120814140620.033884909@openvz.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Aug 14, 2012 at 06:03:45PM +0400, Cyrill Gorcunov wrote: > This patch brings ability to plug in auxiliary fdinfo providers. > For example in further patches eventfd, evenpoll and fsnotify > will print out information associated with files. > > This feature is CONFIG_CHECKPOINT_RESTORE guarded to eliminate > overhead for those who don't need it at all (this > unfortunately makes patch bigger than I wanted). > > The basic usage rule is the following > > - fdinfo provider should register own "show" method > via proc_register_fdinfo_driver call, where "show" > methods are rather well known seq-file operations > > - once the kernel opens /proc/$pid/fdinfo/$fd file > it calls for ->probe() method in registered fdinfo > drivers, and if probe success, then seq-file "show" > operations will be called to provide out additional > infomation > > Initially we considered to inject some "show" metod to > file_operations but since there really a number of > file_operations declared inside kernel (and in real the > further patches cover onle eventfd/epoll/inotify) the > waste of memory space will be inacceptable I think. NAK. This is too ugly to live. Put it into file_operations, with NULL meaning default output, or don't do it at all. And no, "it's only if you enable CONFIG_SOME_SHIT" gambit won't fly - we have all seen it played too many times. All it takes is one politically-inclined induhvidual adding a dependency to some "vertically integrated" turd (*cough* systemd *spit* udev *cough*) and we are stuck with the damn thing. CGROUP shite is already there, DEVTMPFS is well on its way, etc.