Skip to contentSkip to conversation

fs: inotify: systemd needs it so make it depend on CONFIG_EMBEDDED

PATCH In review Dave Hansen 3 participants 5 messages Jun 19, 2015 – Jun 22, 2015

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

PATCH 1/1 fs: inotify: systemd needs it so make it depend on CONFIG_EMBEDDED

From: Dave Hansen <[email protected]>

I have a little microbenchmark that sits and does write() in a loop. The number one kernel function in the profiles is __srcu_read_lock() from fsnotify(). I decided to turn off INOTIFY in order to see what the potential from optimizing this path would be. I ended up with a system at the rescue console as systemd complained that dependencies were not met mounting some non-root filesystems:

systemd: inotify_init1() failed: Function not implemented
systemd: Dependency failed for Mark the need to relabel after reboot.
systemd: Triggering OnFailure= dependencies of local-fs.target.
systemd: inotify_init1() failed: Function not implemented
systemd: Dependency failed for /gcc.

It looks like CONFIG_INOTIFY is now a critical part of any system that wants to both use systemd and boot. Let's make it depend on CONFIG_EMBEDDED.

Cc John McCutchan <[email protected]>
Cc Robert Love <[email protected]>
Cc Eric Paris <[email protected]>
Cc Alexander Viro <[email protected]>
Cc Linus Torvalds <[email protected]>

---

 b/fs/notify/inotify/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/notify/inotify/Kconfig renamed from fs/notify/inotify/Kconfig~make-inotify-harder-to-turn-off +1 -1
diff -puN fs/notify/inotify/Kconfig~make-inotify-harder-to-turn-off fs/notify/inotify/Kconfig
@@ -1,5 +1,5 @@
 config INOTIFY_USER
-	bool "Inotify support for userspace"
+	bool "Inotify support for userspace" if EMBEDDED
 	select ANON_INODES
 	select FSNOTIFY
 	default y

_
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw
Quoted 16 lines · Dave Hansen

From: Dave Hansen <[email protected]>

I have a little microbenchmark that sits and does write() in a loop. The number one kernel function in the profiles is __srcu_read_lock() from fsnotify(). I decided to turn off INOTIFY in order to see what the potential from optimizing this path would be. I ended up with a system at the rescue console as systemd complained that dependencies were not met mounting some non-root filesystems:

systemd: inotify_init1() failed: Function not implemented
systemd: Dependency failed for Mark the need to relabel after reboot.
systemd: Triggering OnFailure= dependencies of local-fs.target.
systemd: inotify_init1() failed: Function not implemented
systemd: Dependency failed for /gcc.

Quoted 3 lines

It looks like CONFIG_INOTIFY is now a critical part of any system that wants to both use systemd and boot. Let's make it depend on CONFIG_EMBEDDED.

Is systemd depending on something really reason enough to make it depend on EMBEDDED? For example all the cgroups stuff is not only not dependent on embedded, but also off by default, and I'm sure there are a boatload of other dependencies which any normal system has no business worrying about but that are required by systemd.

-ilia
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
Quoted 21 lines · Ilia Mirkin
Quoted 16 lines · Dave Hansen

From: Dave Hansen <[email protected]>

I have a little microbenchmark that sits and does write() in a loop. The number one kernel function in the profiles is __srcu_read_lock() from fsnotify(). I decided to turn off INOTIFY in order to see what the potential from optimizing this path would be. I ended up with a system at the rescue console as systemd complained that dependencies were not met mounting some non-root filesystems:

systemd: inotify_init1() failed: Function not implemented
systemd: Dependency failed for Mark the need to relabel after reboot.
systemd: Triggering OnFailure= dependencies of local-fs.target.
systemd: inotify_init1() failed: Function not implemented
systemd: Dependency failed for /gcc.

Quoted 3 lines

It looks like CONFIG_INOTIFY is now a critical part of any system that wants to both use systemd and boot. Let's make it depend on CONFIG_EMBEDDED.

Quoted 7 lines

Is systemd depending on something really reason enough to make it depend on EMBEDDED? For example all the cgroups stuff is not only not dependent on embedded, but also off by default, and I'm sure there are a boatload of other dependencies which any normal system has no business worrying about but that are required by systemd.

-ilia

I agree with this, kconfig isn't designed to make sure that your system will boot. There are plenty of non-embedded systems that don't use systemd at all (such as every Linux based system on the TOP500 list, and a large majority of Gentoo installations), and also have no reason to have INOTIFY enabled.

I would stipulate however that systemd _should_ (if it doesn't already) clearly document this and any other kernel configuration dependencies.

#3 lore raw
In reply to Ilia Mirkin
Quoted 5 lines · Ilia Mirkin

Is systemd depending on something really reason enough to make it depend on EMBEDDED? For example all the cgroups stuff is not only not dependent on embedded, but also off by default, and I'm sure there are a boatload of other dependencies which any normal system has no business worrying about but that are required by systemd.

Does the lack of cgroups keep a (normal) system from booting, though? --
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/

#4 lore raw
Quoted 8 lines · Dave Hansen
Quoted 5 lines · Ilia Mirkin

Is systemd depending on something really reason enough to make it depend on EMBEDDED? For example all the cgroups stuff is not only not dependent on embedded, but also off by default, and I'm sure there are a boatload of other dependencies which any normal system has no business worrying about but that are required by systemd.

Does the lack of cgroups keep a (normal) system from booting, though?

Define 'normal'. Just because userspace software depends on something doesn't mean we should force that on everyone, even if disabling it could make some systems fail to boot (that is an inherent risk in building your own kernel). dnotify (inotify's predecessor) is an excellent example of this: nfs-utils depends on it, and that not working can definitely make a system fail to boot, yet it is not hidden behind some other config option, but defaults to being on.

Making inotify default to on (like dnotify) is a better solution to this, anyone who is going around turning off options that default to on in kconfig should be prepared to deal with a system that doesn't boot anyway, and EMBEDDED is intended (AFAICT) for saving space on systems with limited memory, not hiding userspace dependencies that have other legitimate reasons to be disabled.