All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs: inotify: systemd needs it so make it depend on CONFIG_EMBEDDED
@ 2015-06-19 18:07 Dave Hansen
  2015-06-19 18:18 ` Ilia Mirkin
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Hansen @ 2015-06-19 18:07 UTC (permalink / raw)
  To: dave; +Cc: dave.hansen, john, rlove, eparis, viro, torvalds, linux-kernel


From: Dave Hansen <dave.hansen@linux.intel.com>

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.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: John McCutchan <john@johnmccutchan.com>
Cc: Robert Love <rlove@rlove.org>
Cc: Eric Paris <eparis@parisplace.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org

---

 b/fs/notify/inotify/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/notify/inotify/Kconfig~make-inotify-harder-to-turn-off fs/notify/inotify/Kconfig
--- a/fs/notify/inotify/Kconfig~make-inotify-harder-to-turn-off	2015-06-19 10:54:06.528721072 -0700
+++ b/fs/notify/inotify/Kconfig	2015-06-19 10:55:16.426892530 -0700
@@ -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/

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

* Re: [PATCH] fs: inotify: systemd needs it so make it depend on CONFIG_EMBEDDED
  2015-06-19 18:07 [PATCH] fs: inotify: systemd needs it so make it depend on CONFIG_EMBEDDED Dave Hansen
@ 2015-06-19 18:18 ` Ilia Mirkin
  2015-06-19 18:54   ` Austin S Hemmelgarn
  2015-06-19 21:48   ` Dave Hansen
  0 siblings, 2 replies; 5+ messages in thread
From: Ilia Mirkin @ 2015-06-19 18:18 UTC (permalink / raw)
  To: Dave Hansen
  Cc: dave.hansen, john, rlove, eparis, viro, Linus Torvalds, linux-kernel

On Fri, Jun 19, 2015 at 2:07 PM, Dave Hansen <dave@sr71.net> wrote:
>
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> 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.

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/

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

* Re: [PATCH] fs: inotify: systemd needs it so make it depend on CONFIG_EMBEDDED
  2015-06-19 18:18 ` Ilia Mirkin
@ 2015-06-19 18:54   ` Austin S Hemmelgarn
  2015-06-19 21:48   ` Dave Hansen
  1 sibling, 0 replies; 5+ messages in thread
From: Austin S Hemmelgarn @ 2015-06-19 18:54 UTC (permalink / raw)
  To: Ilia Mirkin, Dave Hansen
  Cc: dave.hansen, john, rlove, eparis, viro, Linus Torvalds, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]

On 2015-06-19 14:18, Ilia Mirkin wrote:
> On Fri, Jun 19, 2015 at 2:07 PM, Dave Hansen <dave@sr71.net> wrote:
>>
>> From: Dave Hansen <dave.hansen@linux.intel.com>
>>
>> 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.
>
> 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.



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2967 bytes --]

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

* Re: [PATCH] fs: inotify: systemd needs it so make it depend on CONFIG_EMBEDDED
  2015-06-19 18:18 ` Ilia Mirkin
  2015-06-19 18:54   ` Austin S Hemmelgarn
@ 2015-06-19 21:48   ` Dave Hansen
  2015-06-22 12:20     ` Austin S Hemmelgarn
  1 sibling, 1 reply; 5+ messages in thread
From: Dave Hansen @ 2015-06-19 21:48 UTC (permalink / raw)
  To: Ilia Mirkin
  Cc: dave.hansen, john, rlove, eparis, viro, Linus Torvalds, linux-kernel

On 06/19/2015 11:18 AM, Ilia Mirkin wrote:
> 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/

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

* Re: [PATCH] fs: inotify: systemd needs it so make it depend on CONFIG_EMBEDDED
  2015-06-19 21:48   ` Dave Hansen
@ 2015-06-22 12:20     ` Austin S Hemmelgarn
  0 siblings, 0 replies; 5+ messages in thread
From: Austin S Hemmelgarn @ 2015-06-22 12:20 UTC (permalink / raw)
  To: Dave Hansen, Ilia Mirkin
  Cc: dave.hansen, john, rlove, eparis, viro, Linus Torvalds, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]

On 2015-06-19 17:48, Dave Hansen wrote:
> On 06/19/2015 11:18 AM, Ilia Mirkin wrote:
>> 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.



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2967 bytes --]

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

end of thread, other threads:[~2015-06-22 12:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-19 18:07 [PATCH] fs: inotify: systemd needs it so make it depend on CONFIG_EMBEDDED Dave Hansen
2015-06-19 18:18 ` Ilia Mirkin
2015-06-19 18:54   ` Austin S Hemmelgarn
2015-06-19 21:48   ` Dave Hansen
2015-06-22 12:20     ` Austin S Hemmelgarn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.