linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/3] Turn CONFIG_HOTPLUG always on.
@ 2012-09-05  0:01 Greg Kroah-Hartman
  2012-09-05  0:01 ` [patch 1/3] xtensa: remove duplicate CONFIG_HOTPLUG definition Greg Kroah-Hartman
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2012-09-05  0:01 UTC (permalink / raw)
  To: Geert Uytterhoeven, Ralf Baechle, Bjorn Helgaas, Chris Metcalf,
	Chris Zankel
  Cc: Greg KH, linux-arch, linux-kernel

From: Greg KH <gregkh@linuxfoundation.org>

The CONFIG_HOTPLUG variable is tough to turn off, and almost all arches
default to it on.

If you turn it off, it saves you a big 200 or so bytes, and then starts
to cause all sorts of problems as the code paths if the option is
disabled is never really tested, and memory segments start to get thrown
away that driver authors assume will always be present.

So, as part of trying to get rid of the option entirely, let's just turn
the option always on.

Note, to do this properly, I found two duplicate definitions of the
option, in the Tile and Xtensa arch files, this patch series removes
those duplicates first.

Anyone object to me just taking these three patches through my
driver-core tree for 3.7?  After this set, I'll start unwinding the
places where CONFIG_HOTPLUG is used and remove the parts that are not
used anymore now that the option can not be turned off.

thanks,

greg k-h


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

* [patch 1/3] xtensa: remove duplicate CONFIG_HOTPLUG definition
  2012-09-05  0:01 [patch 0/3] Turn CONFIG_HOTPLUG always on Greg Kroah-Hartman
@ 2012-09-05  0:01 ` Greg Kroah-Hartman
  2012-09-05  0:01 ` [patch 2/3] tile: " Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2012-09-05  0:01 UTC (permalink / raw)
  To: Chris Zankel
  Cc: Greg KH, linux-arch, linux-kernel, Geert Uytterhoeven,
	Ralf Baechle, Bjorn Helgaas, Chris Metcalf

[-- Attachment #1: xtensa-remove-duplicate-config_hotplug-definition.patch --]
[-- Type: text/plain, Size: 1508 bytes --]

From: Greg KH <gregkh@linuxfoundation.org>

As part of the plan to remove CONFIG_HOTPLUG, it was found that xtensa
duplicates this config option for no reason (it's already defined as part of
init/Kconfig).  This patch removes it from the xtensa-only Kconfig file.

Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/xtensa/Kconfig |   18 ------------------
 1 file changed, 18 deletions(-)

--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -172,24 +172,6 @@ config CMDLINE
 
 source "mm/Kconfig"
 
-config HOTPLUG
-	bool "Support for hot-pluggable devices"
-	help
-	  Say Y here if you want to plug devices into your computer while
-	  the system is running, and be able to use them quickly.  In many
-	  cases, the devices can likewise be unplugged at any time too.
-
-	  One well known example of this is PCMCIA- or PC-cards, credit-card
-	  size devices such as network cards, modems or hard drives which are
-	  plugged into slots found on all modern laptop computers.  Another
-	  example, used on modern desktops as well as laptops, is USB.
-
-	  Enable HOTPLUG and build a modular kernel.  Get agent software
-	  (from <http://linux-hotplug.sourceforge.net/>) and install it.
-	  Then your kernel will automatically call out to a user mode "policy
-	  agent" (/sbin/hotplug) to load modules and set up software needed
-	  to use devices as you hotplug them.
-
 source "drivers/pcmcia/Kconfig"
 
 source "drivers/pci/hotplug/Kconfig"



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

* [patch 2/3] tile: remove duplicate CONFIG_HOTPLUG definition
  2012-09-05  0:01 [patch 0/3] Turn CONFIG_HOTPLUG always on Greg Kroah-Hartman
  2012-09-05  0:01 ` [patch 1/3] xtensa: remove duplicate CONFIG_HOTPLUG definition Greg Kroah-Hartman
@ 2012-09-05  0:01 ` Greg Kroah-Hartman
  2012-09-05  0:56   ` Chris Metcalf
  2012-09-05  0:01 ` [patch 3/3] CONFIG_HOTPLUG should be always on Greg Kroah-Hartman
  2012-09-06 20:28 ` [patch 0/3] Turn CONFIG_HOTPLUG " Greg KH
  3 siblings, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2012-09-05  0:01 UTC (permalink / raw)
  To: Chris Metcalf
  Cc: Greg KH, linux-arch, linux-kernel, Geert Uytterhoeven,
	Ralf Baechle, Bjorn Helgaas, Chris Zankel

[-- Attachment #1: tile-remove-duplicate-config_hotplug-definition.patch --]
[-- Type: text/plain, Size: 945 bytes --]

From: Greg KH <gregkh@linuxfoundation.org>

As part of the plan to remove CONFIG_HOTPLUG, it was found that tile
duplicates this config option for no reason (it's already defined as part of
init/Kconfig).  This patch removes it from the tile-only Kconfig file.

Cc: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/tile/Kconfig |    8 --------
 1 file changed, 8 deletions(-)

--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -412,14 +412,6 @@ config TILE_USB
 config NEED_BOUNCE_POOL
 	def_bool USB_OHCI_HCD
 
-config HOTPLUG
-	bool "Support for hot-pluggable devices"
-	---help---
-	  Say Y here if you want to plug devices into your computer while
-	  the system is running, and be able to use them quickly.  In many
-	  cases, the devices can likewise be unplugged at any time too.
-	  One well-known example of this is USB.
-
 source "drivers/pci/hotplug/Kconfig"
 
 endmenu



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

* [patch 3/3] CONFIG_HOTPLUG should be always on
  2012-09-05  0:01 [patch 0/3] Turn CONFIG_HOTPLUG always on Greg Kroah-Hartman
  2012-09-05  0:01 ` [patch 1/3] xtensa: remove duplicate CONFIG_HOTPLUG definition Greg Kroah-Hartman
  2012-09-05  0:01 ` [patch 2/3] tile: " Greg Kroah-Hartman
@ 2012-09-05  0:01 ` Greg Kroah-Hartman
  2012-09-06 20:28 ` [patch 0/3] Turn CONFIG_HOTPLUG " Greg KH
  3 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2012-09-05  0:01 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-arch, linux-kernel, Geert Uytterhoeven, Ralf Baechle,
	Bjorn Helgaas, Chris Metcalf, Chris Zankel

[-- Attachment #1: config_hotplug-should-be-always-on.patch --]
[-- Type: text/plain, Size: 1525 bytes --]

From: Greg KH <gregkh@linuxfoundation.org>

CONFIG_HOTPLUG is a very old option, back when we had static systems and it was
odd that any type of device would be removed or added after the system had
started up.  It is quite hard to disable it these days, and even if you do, it
only saves you about 200 bytes.  However, if it is disabled, lots of bugs show
up because it is almost never tested if the option is disabled.

This is a step to eventually just remove the option entirely, which will clean
up all of the devinit* variable and function pointer options, that everyone
(myself include) ends up getting wrong eventually, causing real problems when
memory segments are removed yet we don't expect them to be.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>

---
 init/Kconfig |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1201,13 +1201,7 @@ config KALLSYMS_ALL
 	   Say N unless you really need all symbols.
 
 config HOTPLUG
-	bool "Support for hot-pluggable devices" if EXPERT
-	default y
-	help
-	  This option is provided for the case where no hotplug or uevent
-	  capabilities is wanted by the kernel.  You should only consider
-	  disabling this option for embedded systems that do not use modules, a
-	  dynamic /dev tree, or dynamic device discovery.  Just say Y.
+	def_bool y
 
 config PRINTK
 	default y



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

* Re: [patch 2/3] tile: remove duplicate CONFIG_HOTPLUG definition
  2012-09-05  0:01 ` [patch 2/3] tile: " Greg Kroah-Hartman
@ 2012-09-05  0:56   ` Chris Metcalf
  0 siblings, 0 replies; 8+ messages in thread
From: Chris Metcalf @ 2012-09-05  0:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-arch, linux-kernel, Geert Uytterhoeven, Ralf Baechle,
	Bjorn Helgaas, Chris Zankel

On 9/4/2012 8:01 PM, Greg Kroah-Hartman wrote:
> From: Greg KH <gregkh@linuxfoundation.org>
>
> As part of the plan to remove CONFIG_HOTPLUG, it was found that tile
> duplicates this config option for no reason (it's already defined as part of
> init/Kconfig).  This patch removes it from the tile-only Kconfig file.
>
> Cc: Chris Metcalf <cmetcalf@tilera.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> ---
>  arch/tile/Kconfig |    8 --------
>  1 file changed, 8 deletions(-)

Acked-by: Chris Metcalf <cmetcalf@tilera.com>

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com


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

* Re: [patch 0/3] Turn CONFIG_HOTPLUG always on.
  2012-09-05  0:01 [patch 0/3] Turn CONFIG_HOTPLUG always on Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2012-09-05  0:01 ` [patch 3/3] CONFIG_HOTPLUG should be always on Greg Kroah-Hartman
@ 2012-09-06 20:28 ` Greg KH
  2012-10-05  8:50   ` Andrew Morton
  3 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2012-09-06 20:28 UTC (permalink / raw)
  To: Geert Uytterhoeven, Ralf Baechle, Bjorn Helgaas, Chris Metcalf,
	Chris Zankel
  Cc: linux-arch, linux-kernel

On Tue, Sep 04, 2012 at 05:01:05PM -0700, Greg Kroah-Hartman wrote:
> From: Greg KH <gregkh@linuxfoundation.org>
> 
> The CONFIG_HOTPLUG variable is tough to turn off, and almost all arches
> default to it on.
> 
> If you turn it off, it saves you a big 200 or so bytes, and then starts
> to cause all sorts of problems as the code paths if the option is
> disabled is never really tested, and memory segments start to get thrown
> away that driver authors assume will always be present.
> 
> So, as part of trying to get rid of the option entirely, let's just turn
> the option always on.
> 
> Note, to do this properly, I found two duplicate definitions of the
> option, in the Tile and Xtensa arch files, this patch series removes
> those duplicates first.
> 
> Anyone object to me just taking these three patches through my
> driver-core tree for 3.7?  After this set, I'll start unwinding the
> places where CONFIG_HOTPLUG is used and remove the parts that are not
> used anymore now that the option can not be turned off.

Given the lack of objection, I've now queued these up for 3.7 and will
start unwinding the CONFIG_HOTPLUG mess.

thanks,

greg k-h

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

* Re: [patch 0/3] Turn CONFIG_HOTPLUG always on.
  2012-09-06 20:28 ` [patch 0/3] Turn CONFIG_HOTPLUG " Greg KH
@ 2012-10-05  8:50   ` Andrew Morton
  2012-10-05 14:32     ` Greg KH
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2012-10-05  8:50 UTC (permalink / raw)
  To: Greg KH
  Cc: Geert Uytterhoeven, Ralf Baechle, Bjorn Helgaas, Chris Metcalf,
	Chris Zankel, linux-arch, linux-kernel, Tim Bird

On Thu, 6 Sep 2012 13:28:16 -0700 Greg KH <gregkh@linuxfoundation.org> wrote:

> On Tue, Sep 04, 2012 at 05:01:05PM -0700, Greg Kroah-Hartman wrote:
> > From: Greg KH <gregkh@linuxfoundation.org>
> > 
> > The CONFIG_HOTPLUG variable is tough to turn off, and almost all arches
> > default to it on.
> > 
> > If you turn it off, it saves you a big 200 or so bytes, and then starts
> > to cause all sorts of problems as the code paths if the option is
> > disabled is never really tested, and memory segments start to get thrown
> > away that driver authors assume will always be present.
> > 
> > So, as part of trying to get rid of the option entirely, let's just turn
> > the option always on.
> > 
> > Note, to do this properly, I found two duplicate definitions of the
> > option, in the Tile and Xtensa arch files, this patch series removes
> > those duplicates first.
> > 
> > Anyone object to me just taking these three patches through my
> > driver-core tree for 3.7?  After this set, I'll start unwinding the
> > places where CONFIG_HOTPLUG is used and remove the parts that are not
> > used anymore now that the option can not be turned off.
> 
> Given the lack of objection, I've now queued these up for 3.7 and will
> start unwinding the CONFIG_HOTPLUG mess.
> 

I wonder if this has had sufficient consideration.

It isn't just 200 bytes, is it?  It's all memory which is marked
__devinit* and __devexit* - that's a tremendous amount of stuff.  We
should quantify it.

It wouldn't surprise me if there are organizations who are using
CONFIG_HOTPLUG=n effectively.  We regularly bust a gut to save a few
bytes and for people who really care about this we're here sending them
backwards a lot further than that.

Tim, do you know?

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

* Re: [patch 0/3] Turn CONFIG_HOTPLUG always on.
  2012-10-05  8:50   ` Andrew Morton
@ 2012-10-05 14:32     ` Greg KH
  0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2012-10-05 14:32 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Geert Uytterhoeven, Ralf Baechle, Bjorn Helgaas, Chris Metcalf,
	Chris Zankel, linux-arch, linux-kernel, Tim Bird

On Fri, Oct 05, 2012 at 01:50:36AM -0700, Andrew Morton wrote:
> On Thu, 6 Sep 2012 13:28:16 -0700 Greg KH <gregkh@linuxfoundation.org> wrote:
> 
> > On Tue, Sep 04, 2012 at 05:01:05PM -0700, Greg Kroah-Hartman wrote:
> > > From: Greg KH <gregkh@linuxfoundation.org>
> > > 
> > > The CONFIG_HOTPLUG variable is tough to turn off, and almost all arches
> > > default to it on.
> > > 
> > > If you turn it off, it saves you a big 200 or so bytes, and then starts
> > > to cause all sorts of problems as the code paths if the option is
> > > disabled is never really tested, and memory segments start to get thrown
> > > away that driver authors assume will always be present.
> > > 
> > > So, as part of trying to get rid of the option entirely, let's just turn
> > > the option always on.
> > > 
> > > Note, to do this properly, I found two duplicate definitions of the
> > > option, in the Tile and Xtensa arch files, this patch series removes
> > > those duplicates first.
> > > 
> > > Anyone object to me just taking these three patches through my
> > > driver-core tree for 3.7?  After this set, I'll start unwinding the
> > > places where CONFIG_HOTPLUG is used and remove the parts that are not
> > > used anymore now that the option can not be turned off.
> > 
> > Given the lack of objection, I've now queued these up for 3.7 and will
> > start unwinding the CONFIG_HOTPLUG mess.
> > 
> 
> I wonder if this has had sufficient consideration.
> 
> It isn't just 200 bytes, is it?  It's all memory which is marked
> __devinit* and __devexit* - that's a tremendous amount of stuff.  We
> should quantify it.
> 
> It wouldn't surprise me if there are organizations who are using
> CONFIG_HOTPLUG=n effectively.  We regularly bust a gut to save a few
> bytes and for people who really care about this we're here sending them
> backwards a lot further than that.

Given the recent round of patches that I've applied to the tree making
it so that CONFIG_HOTPLUG=n actually boots and works, that were needed
for the past 6+ kernel versions, I find it very unlikely anyone actually
runs a system in this type of configuration, but I would love to hear
from someone who does if they are out there.

greg k-h

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

end of thread, other threads:[~2012-10-05 14:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05  0:01 [patch 0/3] Turn CONFIG_HOTPLUG always on Greg Kroah-Hartman
2012-09-05  0:01 ` [patch 1/3] xtensa: remove duplicate CONFIG_HOTPLUG definition Greg Kroah-Hartman
2012-09-05  0:01 ` [patch 2/3] tile: " Greg Kroah-Hartman
2012-09-05  0:56   ` Chris Metcalf
2012-09-05  0:01 ` [patch 3/3] CONFIG_HOTPLUG should be always on Greg Kroah-Hartman
2012-09-06 20:28 ` [patch 0/3] Turn CONFIG_HOTPLUG " Greg KH
2012-10-05  8:50   ` Andrew Morton
2012-10-05 14:32     ` Greg KH

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).