Skip to contentSkip to conversation

mm: Make CONFIG_FRAME_VECTOR a visible option

PATCH NAK Olof Johansson 2 participants 4 messages Jan 15, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: Make CONFIG_FRAME_VECTOR a visible option

CONFIG_FRAME_VECTOR was made an option to avoid including the bloat on platforms that try to keep footprint down, which makes sense.

The problem with this is external modules that aren't built in-tree. Since they don't have in-tree Kconfig, whether they can be loaded now depends on whether your kernel config enabled some completely unrelated driver that happened to select it. That's a weird and unpredictable situation, and makes for some awkward requirements for the standalone modules.

For these reasons, give someone the option to manually enable this when configuring the kernel.

---
 mm/Kconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
mm/Kconfig +4 -1
index 25c71eb8a7dbd..0d80d06d3715b 100644
@@ -731,7 +731,10 @@ config DEVICE_PUBLIC
 	  the CPU
 
 config FRAME_VECTOR
-	bool
+	bool "Frame vector helper functions"
+	help
+	  Provide some helper functions for frame vectors, to be used
+	  by drivers who operate on userspace memory for DMA.
 
 config ARCH_USES_HIGH_VMA_FLAGS
 	bool
Signature · 1 line
2.11.0
#1 lore raw
Quoted 10 lines · Olof Johansson

CONFIG_FRAME_VECTOR was made an option to avoid including the bloat on platforms that try to keep footprint down, which makes sense.

The problem with this is external modules that aren't built in-tree. Since they don't have in-tree Kconfig, whether they can be loaded now depends on whether your kernel config enabled some completely unrelated driver that happened to select it. That's a weird and unpredictable situation, and makes for some awkward requirements for the standalone modules.

Quoted 2 lines

For these reasons, give someone the option to manually enable this when configuring the kernel.

NAK, we should not confuse kernel users for stuff that is out of tree.

#2 lore raw
Quoted 12 lines · Christoph Hellwig
Quoted 10 lines · Olof Johansson

CONFIG_FRAME_VECTOR was made an option to avoid including the bloat on platforms that try to keep footprint down, which makes sense.

The problem with this is external modules that aren't built in-tree. Since they don't have in-tree Kconfig, whether they can be loaded now depends on whether your kernel config enabled some completely unrelated driver that happened to select it. That's a weird and unpredictable situation, and makes for some awkward requirements for the standalone modules.

Quoted 4 lines
Quoted 2 lines

For these reasons, give someone the option to manually enable this when configuring the kernel.

NAK, we should not confuse kernel users for stuff that is out of tree.

I'd argue it's *more* confusing to expect users to know about and enable some random V4L driver to get this exported kernel API included or not. Happy to add "If in doubt, say 'n' here" help text, like we do for many many other kernel config options.

In this particular case, a module (under early development and not yet ready to upstream, but will be) worked with a random distro kernel that enables the kitchen sink of drivers, but not with a more slimmed down kernel config. Having to enable a driver you'll never use, just to enable some generic exported helpers, is just backwards.

-Olof

#3 lore raw
Quoted 4 lines · Olof Johansson

I'd argue it's *more* confusing to expect users to know about and enable some random V4L driver to get this exported kernel API included or not. Happy to add "If in doubt, say 'n' here" help text, like we do for many many other kernel config options.

It is just like any other library function - you get it with a user.

Quoted 5 lines

In this particular case, a module (under early development and not yet ready to upstream, but will be) worked with a random distro kernel that enables the kitchen sink of drivers, but not with a more slimmed down kernel config. Having to enable a driver you'll never use, just to enable some generic exported helpers, is just backwards.

Just develop the damn driver in a kernel tree and let people pull the whole branch like everyone else: problem solved.