linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Virtual Console Hotplug Leads to OOM
@ 2005-03-30 16:30 Prarit Bhargava
  2005-03-30 16:31 ` Prarit Bhargava
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Prarit Bhargava @ 2005-03-30 16:30 UTC (permalink / raw)
  To: linux-hotplug

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.

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.

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.

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.

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.

** 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? **

P.




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-01 13:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-30 16:30 Virtual Console Hotplug Leads to OOM Prarit Bhargava
2005-03-30 16:31 ` Prarit Bhargava
2005-04-01  0:17 ` Greg KH
2005-04-01 13:42 ` Prarit Bhargava

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).