From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Fri, 01 Apr 2005 00:17:36 +0000 Subject: Re: Virtual Console Hotplug Leads to OOM Message-Id: <20050401001735.GA3162@kroah.com> List-Id: References: <424AD41F.1040309@sgi.com> In-Reply-To: <424AD41F.1040309@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, Mar 30, 2005 at 11:30:23AM -0500, Prarit Bhargava wrote: > Colleagues, > > I've identified the following critical issue where the hotplug subsystem > can cause OOM-killer to run. IMO this is a critical issue within > hotplug -- in the case below, only the virtual console subsystem is > responsible. > > The virtual consoles that are being spawned are responsible for 2 > hotplug events for every console opened -- one on the opening of the > console, and one on the closing of the console. Yes. > If you run the tty2_test which opens and closes ttys (attached to this > email) you'll see THOUSANDS of hotplug events. After running for 1 > minute on a 16p ia64 I had well over 4000 hotplug events. Guess you need a faster machine, my little x86-64 had way more than that :) > If we're unlucky enough to fall below the low-water memory point at the > same time tty2_test is spawning, the OOM-killer starts up. Memory is > taken up by the hotplug events ... and we're off into the weeds. Yup. > The issue with the virtual console code is that it uses the class_simple > library. This is a problem as the library pre-defines a global kset > parent as class_obj (or at least AFAICT). This parent is used by ALL > subsystems using the class_simple, not just the virtual console subsystem. If you look at the -mm tree, class_simple is now gone. > This parent has a pointer to allow hotplug slot operations for all it's > children (including the virtual consoles). IMO zero-ing this pointer > out is not a valid option as this would break hotplug op's for many > other subystems. Very true. > ** I did notice that the class struct has it's own hotplug value -- > can/should this be used to override the parent's hotplug operations? ** Why would you want to override this? We need those hotplug events. All this means is that an admin better be careful who he lets have access to the tty group :) thanks, greg k-h ------------------------------------------------------- This SF.net email is sponsored by Demarc: A global provider of Threat Management Solutions. Download our HomeAdmin security software for free today! http://www.demarc.com/info/Sentarus/hamr30 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel