Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Mon, Nov 24, 2014 at 11:01:38AM +0100, Pieter Smith wrote: > On Sun, Nov 23, 2014 at 04:32:51PM -0800, Josh Triplett wrote: > > On Sun, Nov 23, 2014 at 07:28:10PM -0500, Jeff Layton wrote: > > > On Sun, 23 Nov 2014 15:36:37 -0800 > > > Josh Triplett wrote: > > > > > > > On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: > > > > > On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: > > > > > > On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: > > > > > > > Truly removing sendfile/sendpage means that you can't even > > > > > > > compile NFS > > > > > > > into the tree. > > > > > > > > > > > > If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a > > > > > > large > > > > > > stack of "select" and "depends on", both directly and indirectly; > > > > > > adding > > > > > > a "select SPLICE_SYSCALL" to it seems fine. (That select does need > > > > > > adding, though. Pieter, you need to test-compile more than just > > > > > > tinyconfig and defconfig. Try an allyesconfig with *just* splice > > > > > > turned > > > > > > off, and make sure that compiles.) > > > > > > > > > > Did exacly that. Took forever on my hardware, but no problems. > > > > > > > > Ah, I see. Looking more closely at nfsd, it looks like it already has a > > > > code path for filesystems that don't do splice. I think, rather than > > > > making nfsd select SPLICE_SYSCALL, that it would suffice to change the > > > > "rqstp->rq_splice_ok = true;" in svc_process_common (net/sunrpc/svc.c) > > > > to: > > > > > > > > rqstp->rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); > > > > > > > > Then nfsd should simply *always* fall back to its non-splice support. > > > > > > > > > > I'd probably prefer the above, actually. We have to keep supporting > > > non-splice enabled fs' for the forseeable future, so we may as well > > > allow people to run nfsd in such configurations. It could even be > > > useful for testing the non-splice-enabled codepaths. > > > > Good point! > > > > - Josh Triplett > > I'll add this to svc_process_common. I can squash this into PATCH 3, which is > where the syscalls can be compiled out. The log entry may however get a little > crowded and multi-functional. > > Should I keep this as a separate patch? I'd keep it as a separate patch, yes. It doesn't become necessary until patch 6, so you can add it as a new patch between patches 3 and 6. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, Nov 23, 2014 at 04:32:51PM -0800, Josh Triplett wrote: > On Sun, Nov 23, 2014 at 07:28:10PM -0500, Jeff Layton wrote: > > On Sun, 23 Nov 2014 15:36:37 -0800 > > Josh Triplett wrote: > > > > > On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: > > > > On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: > > > > > On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: > > > > > > Truly removing sendfile/sendpage means that you can't even compile > > > > > > NFS > > > > > > into the tree. > > > > > > > > > > If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large > > > > > stack of "select" and "depends on", both directly and indirectly; > > > > > adding > > > > > a "select SPLICE_SYSCALL" to it seems fine. (That select does need > > > > > adding, though. Pieter, you need to test-compile more than just > > > > > tinyconfig and defconfig. Try an allyesconfig with *just* splice > > > > > turned > > > > > off, and make sure that compiles.) > > > > > > > > Did exacly that. Took forever on my hardware, but no problems. > > > > > > Ah, I see. Looking more closely at nfsd, it looks like it already has a > > > code path for filesystems that don't do splice. I think, rather than > > > making nfsd select SPLICE_SYSCALL, that it would suffice to change the > > > "rqstp->rq_splice_ok = true;" in svc_process_common (net/sunrpc/svc.c) > > > to: > > > > > > rqstp->rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); > > > > > > Then nfsd should simply *always* fall back to its non-splice support. > > > > > > > I'd probably prefer the above, actually. We have to keep supporting > > non-splice enabled fs' for the forseeable future, so we may as well > > allow people to run nfsd in such configurations. It could even be > > useful for testing the non-splice-enabled codepaths. > > Good point! > > - Josh Triplett I'll add this to svc_process_common. I can squash this into PATCH 3, which is where the syscalls can be compiled out. The log entry may however get a little crowded and multi-functional. Should I keep this as a separate patch? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Mon, Nov 24, 2014 at 09:38:20AM +0100, Geert Uytterhoeven wrote: > On Mon, Nov 24, 2014 at 12:36 AM, Josh Triplett wrote: > > On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: > >> On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: > >> > On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: > >> > > Truly removing sendfile/sendpage means that you can't even compile NFS > >> > > into the tree. > >> > > >> > If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large > >> > stack of "select" and "depends on", both directly and indirectly; adding > >> > a "select SPLICE_SYSCALL" to it seems fine. (That select does need > >> > adding, though. Pieter, you need to test-compile more than just > >> > tinyconfig and defconfig. Try an allyesconfig with *just* splice turned > >> > off, and make sure that compiles.) > >> > >> Did exacly that. Took forever on my hardware, but no problems. > > > > Ah, I see. Looking more closely at nfsd, it looks like it already has a > > code path for filesystems that don't do splice. I think, rather than > > making nfsd select SPLICE_SYSCALL, that it would suffice to change the > > "rqstp->rq_splice_ok = true;" in svc_process_common (net/sunrpc/svc.c) > > to: > > > > rqstp->rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); > > > > Then nfsd should simply *always* fall back to its non-splice support. > > Hence I suggest adding to the nfsd help text: > > While nfsd works without SPLICE_SYSCALL, you may want to enable > SPLICE_SYSCALL for <...> (performance?) reasons. It already seems sufficiently unlikely to enable NFSD while disabling SPLICE_SYSCALL (in the latter case, turning on EXPERT to do so). It doesn't seem worth adding such a note to NFSD. At most, I'd say that NFSD might want a note somewhere in its documentation saying that it takes advantage of filesystems with splice support if serving files from one, and if running on a kernel that has splice. > (Hmm, does Kconfig need a "suggests", cfr. Debian package dependencies?) Perhaps, though that seems much lower priority than, for instance, transitive "select". - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Mon, Nov 24, 2014 at 12:36 AM, Josh Triplett wrote: > On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: >> On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: >> > On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: >> > > Truly removing sendfile/sendpage means that you can't even compile NFS >> > > into the tree. >> > >> > If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large >> > stack of "select" and "depends on", both directly and indirectly; adding >> > a "select SPLICE_SYSCALL" to it seems fine. (That select does need >> > adding, though. Pieter, you need to test-compile more than just >> > tinyconfig and defconfig. Try an allyesconfig with *just* splice turned >> > off, and make sure that compiles.) >> >> Did exacly that. Took forever on my hardware, but no problems. > > Ah, I see. Looking more closely at nfsd, it looks like it already has a > code path for filesystems that don't do splice. I think, rather than > making nfsd select SPLICE_SYSCALL, that it would suffice to change the > "rqstp->rq_splice_ok = true;" in svc_process_common (net/sunrpc/svc.c) > to: > > rqstp->rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); > > Then nfsd should simply *always* fall back to its non-splice support. Hence I suggest adding to the nfsd help text: While nfsd works without SPLICE_SYSCALL, you may want to enable SPLICE_SYSCALL for <...> (performance?) reasons. (Hmm, does Kconfig need a "suggests", cfr. Debian package dependencies?) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Mon, Nov 24, 2014 at 12:36 AM, Josh Triplett j...@joshtriplett.org wrote: On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large stack of select and depends on, both directly and indirectly; adding a select SPLICE_SYSCALL to it seems fine. (That select does need adding, though. Pieter, you need to test-compile more than just tinyconfig and defconfig. Try an allyesconfig with *just* splice turned off, and make sure that compiles.) Did exacly that. Took forever on my hardware, but no problems. Ah, I see. Looking more closely at nfsd, it looks like it already has a code path for filesystems that don't do splice. I think, rather than making nfsd select SPLICE_SYSCALL, that it would suffice to change the rqstp-rq_splice_ok = true; in svc_process_common (net/sunrpc/svc.c) to: rqstp-rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); Then nfsd should simply *always* fall back to its non-splice support. Hence I suggest adding to the nfsd help text: While nfsd works without SPLICE_SYSCALL, you may want to enable SPLICE_SYSCALL for ... (performance?) reasons. (Hmm, does Kconfig need a suggests, cfr. Debian package dependencies?) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Mon, Nov 24, 2014 at 09:38:20AM +0100, Geert Uytterhoeven wrote: On Mon, Nov 24, 2014 at 12:36 AM, Josh Triplett j...@joshtriplett.org wrote: On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large stack of select and depends on, both directly and indirectly; adding a select SPLICE_SYSCALL to it seems fine. (That select does need adding, though. Pieter, you need to test-compile more than just tinyconfig and defconfig. Try an allyesconfig with *just* splice turned off, and make sure that compiles.) Did exacly that. Took forever on my hardware, but no problems. Ah, I see. Looking more closely at nfsd, it looks like it already has a code path for filesystems that don't do splice. I think, rather than making nfsd select SPLICE_SYSCALL, that it would suffice to change the rqstp-rq_splice_ok = true; in svc_process_common (net/sunrpc/svc.c) to: rqstp-rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); Then nfsd should simply *always* fall back to its non-splice support. Hence I suggest adding to the nfsd help text: While nfsd works without SPLICE_SYSCALL, you may want to enable SPLICE_SYSCALL for ... (performance?) reasons. It already seems sufficiently unlikely to enable NFSD while disabling SPLICE_SYSCALL (in the latter case, turning on EXPERT to do so). It doesn't seem worth adding such a note to NFSD. At most, I'd say that NFSD might want a note somewhere in its documentation saying that it takes advantage of filesystems with splice support if serving files from one, and if running on a kernel that has splice. (Hmm, does Kconfig need a suggests, cfr. Debian package dependencies?) Perhaps, though that seems much lower priority than, for instance, transitive select. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, Nov 23, 2014 at 04:32:51PM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 07:28:10PM -0500, Jeff Layton wrote: On Sun, 23 Nov 2014 15:36:37 -0800 Josh Triplett j...@joshtriplett.org wrote: On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large stack of select and depends on, both directly and indirectly; adding a select SPLICE_SYSCALL to it seems fine. (That select does need adding, though. Pieter, you need to test-compile more than just tinyconfig and defconfig. Try an allyesconfig with *just* splice turned off, and make sure that compiles.) Did exacly that. Took forever on my hardware, but no problems. Ah, I see. Looking more closely at nfsd, it looks like it already has a code path for filesystems that don't do splice. I think, rather than making nfsd select SPLICE_SYSCALL, that it would suffice to change the rqstp-rq_splice_ok = true; in svc_process_common (net/sunrpc/svc.c) to: rqstp-rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); Then nfsd should simply *always* fall back to its non-splice support. I'd probably prefer the above, actually. We have to keep supporting non-splice enabled fs' for the forseeable future, so we may as well allow people to run nfsd in such configurations. It could even be useful for testing the non-splice-enabled codepaths. Good point! - Josh Triplett I'll add this to svc_process_common. I can squash this into PATCH 3, which is where the syscalls can be compiled out. The log entry may however get a little crowded and multi-functional. Should I keep this as a separate patch? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Mon, Nov 24, 2014 at 11:01:38AM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 04:32:51PM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 07:28:10PM -0500, Jeff Layton wrote: On Sun, 23 Nov 2014 15:36:37 -0800 Josh Triplett j...@joshtriplett.org wrote: On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large stack of select and depends on, both directly and indirectly; adding a select SPLICE_SYSCALL to it seems fine. (That select does need adding, though. Pieter, you need to test-compile more than just tinyconfig and defconfig. Try an allyesconfig with *just* splice turned off, and make sure that compiles.) Did exacly that. Took forever on my hardware, but no problems. Ah, I see. Looking more closely at nfsd, it looks like it already has a code path for filesystems that don't do splice. I think, rather than making nfsd select SPLICE_SYSCALL, that it would suffice to change the rqstp-rq_splice_ok = true; in svc_process_common (net/sunrpc/svc.c) to: rqstp-rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); Then nfsd should simply *always* fall back to its non-splice support. I'd probably prefer the above, actually. We have to keep supporting non-splice enabled fs' for the forseeable future, so we may as well allow people to run nfsd in such configurations. It could even be useful for testing the non-splice-enabled codepaths. Good point! - Josh Triplett I'll add this to svc_process_common. I can squash this into PATCH 3, which is where the syscalls can be compiled out. The log entry may however get a little crowded and multi-functional. Should I keep this as a separate patch? I'd keep it as a separate patch, yes. It doesn't become necessary until patch 6, so you can add it as a new patch between patches 3 and 6. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, Nov 23, 2014 at 07:28:10PM -0500, Jeff Layton wrote: > On Sun, 23 Nov 2014 15:36:37 -0800 > Josh Triplett wrote: > > > On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: > > > On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: > > > > On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: > > > > > Truly removing sendfile/sendpage means that you can't even compile NFS > > > > > into the tree. > > > > > > > > If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large > > > > stack of "select" and "depends on", both directly and indirectly; adding > > > > a "select SPLICE_SYSCALL" to it seems fine. (That select does need > > > > adding, though. Pieter, you need to test-compile more than just > > > > tinyconfig and defconfig. Try an allyesconfig with *just* splice turned > > > > off, and make sure that compiles.) > > > > > > Did exacly that. Took forever on my hardware, but no problems. > > > > Ah, I see. Looking more closely at nfsd, it looks like it already has a > > code path for filesystems that don't do splice. I think, rather than > > making nfsd select SPLICE_SYSCALL, that it would suffice to change the > > "rqstp->rq_splice_ok = true;" in svc_process_common (net/sunrpc/svc.c) > > to: > > > > rqstp->rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); > > > > Then nfsd should simply *always* fall back to its non-splice support. > > > > I'd probably prefer the above, actually. We have to keep supporting > non-splice enabled fs' for the forseeable future, so we may as well > allow people to run nfsd in such configurations. It could even be > useful for testing the non-splice-enabled codepaths. Good point! - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, 23 Nov 2014 15:36:37 -0800 Josh Triplett wrote: > On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: > > On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: > > > On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: > > > > Truly removing sendfile/sendpage means that you can't even compile NFS > > > > into the tree. > > > > > > If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large > > > stack of "select" and "depends on", both directly and indirectly; adding > > > a "select SPLICE_SYSCALL" to it seems fine. (That select does need > > > adding, though. Pieter, you need to test-compile more than just > > > tinyconfig and defconfig. Try an allyesconfig with *just* splice turned > > > off, and make sure that compiles.) > > > > Did exacly that. Took forever on my hardware, but no problems. > > Ah, I see. Looking more closely at nfsd, it looks like it already has a > code path for filesystems that don't do splice. I think, rather than > making nfsd select SPLICE_SYSCALL, that it would suffice to change the > "rqstp->rq_splice_ok = true;" in svc_process_common (net/sunrpc/svc.c) > to: > > rqstp->rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); > > Then nfsd should simply *always* fall back to its non-splice support. > I'd probably prefer the above, actually. We have to keep supporting non-splice enabled fs' for the forseeable future, so we may as well allow people to run nfsd in such configurations. It could even be useful for testing the non-splice-enabled codepaths. > That said, given that it seems exceedingly unlikely that anyone would > use the in-kernel nfsd on a system trying to minimize kernel size, it > still seems cleaner to just "select SPLICE_SYSCALL" from NFSD in > Kconfig. That avoids making any changes at all to the nfsd source in > this patch series. > -- Jeff Layton -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: > On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: > > On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: > > > Truly removing sendfile/sendpage means that you can't even compile NFS > > > into the tree. > > > > If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large > > stack of "select" and "depends on", both directly and indirectly; adding > > a "select SPLICE_SYSCALL" to it seems fine. (That select does need > > adding, though. Pieter, you need to test-compile more than just > > tinyconfig and defconfig. Try an allyesconfig with *just* splice turned > > off, and make sure that compiles.) > > Did exacly that. Took forever on my hardware, but no problems. Ah, I see. Looking more closely at nfsd, it looks like it already has a code path for filesystems that don't do splice. I think, rather than making nfsd select SPLICE_SYSCALL, that it would suffice to change the "rqstp->rq_splice_ok = true;" in svc_process_common (net/sunrpc/svc.c) to: rqstp->rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); Then nfsd should simply *always* fall back to its non-splice support. That said, given that it seems exceedingly unlikely that anyone would use the in-kernel nfsd on a system trying to minimize kernel size, it still seems cleaner to just "select SPLICE_SYSCALL" from NFSD in Kconfig. That avoids making any changes at all to the nfsd source in this patch series. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: > On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: > > Truly removing sendfile/sendpage means that you can't even compile NFS > > into the tree. > > If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large > stack of "select" and "depends on", both directly and indirectly; adding > a "select SPLICE_SYSCALL" to it seems fine. (That select does need > adding, though. Pieter, you need to test-compile more than just > tinyconfig and defconfig. Try an allyesconfig with *just* splice turned > off, and make sure that compiles.) Did exacly that. Took forever on my hardware, but no problems. > Given the requirements of running a file server in the kernel, I'd > expect CONFIG_NFSD to end up with several more selects of optional > functionality in the future. It seems rather likely that the average > embedded system will be compiling out NFS. :) > > Also, this patch series compiles out splice and sendfile, including > several *users* of sendpage; it doesn't compile out the sendpage > support/infrastructure itself. > > - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: > Truly removing sendfile/sendpage means that you can't even compile NFS > into the tree. If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large stack of "select" and "depends on", both directly and indirectly; adding a "select SPLICE_SYSCALL" to it seems fine. (That select does need adding, though. Pieter, you need to test-compile more than just tinyconfig and defconfig. Try an allyesconfig with *just* splice turned off, and make sure that compiles.) Given the requirements of running a file server in the kernel, I'd expect CONFIG_NFSD to end up with several more selects of optional functionality in the future. It seems rather likely that the average embedded system will be compiling out NFS. :) Also, this patch series compiles out splice and sendfile, including several *users* of sendpage; it doesn't compile out the sendpage support/infrastructure itself. - Josh Triplett -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. I cannot take this patch series seriously, sorry. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
REPO: https://github.com/smipi1/linux-tinification.git BRANCH: tiny/config-syscall-splice BACKGROUND: This patch-set forms part of the Linux Kernel Tinification effort ( https://tiny.wiki.kernel.org/). GOAL: Support compiling out the splice family of syscalls (splice, vmsplice, tee and sendfile) along with all supporting infrastructure if not needed. Many embedded systems will not need the splice-family syscalls. Omitting them saves space. STRATEGY: a. With the goal of eventually compiling out fs/splice.c, several functions that are only used in support of the the splice family of syscalls are moved into fs/splice.c from fs/read_write.c. The kernel_write function that is not used to support the splice syscalls is moved to fs/read_write.c: 0001-fs-move-sendfile-syscall-into-fs-splice.patch 0002-fs-moved-kernel_write-to-fs-read_write.patch b. Introduce an EXPERT kernel configuration option; CONFIG_SYSCALL_SPLICE; to compile out the splice family of syscalls. This removes all userspace uses of the splice infrastructure. 0003-fs-splice-support-compiling-out-splice-family-syscal.patch c. Splice exports an operations struct, nosteal_pipe_buf_ops. Eliminate the use of this struct when CONFIG_SYSCALL_SPLICE is undefined, so that splice can later be compiled out: 0004-fs-fuse-support-compiling-out-splice.patch 0005-net-core-support-compiling-out-splice.patch e. Compile out fs/splice.c. Functions exported by fs/splice are mocked out with failing static inlines. This is done so as to all but eliminate the maintenance burden on file-system drivers. 0006-fs-splice-full-support-for-compiling-out-splice.patch RESULTS: A tinyconfig bloat-o-meter score for the entire patch-set: add/remove: 0/41 grow/shrink: 5/7 up/down: 23/-8422 (-8399) function old new delta sys_pwritev 115 122 +7 sys_preadv 115 122 +7 fdput_pos 29 36 +7 sys_pwrite64 115 116 +1 sys_pread64 115 116 +1 pipe_to_null 4 - -4 generic_pipe_buf_nosteal 6 - -6 spd_release_page 10 - -10 fdput 11 - -11 PageUptodate 22 11 -11 lock_page 36 24 -12 signal_pending39 26 -13 fdget 56 42 -14 page_cache_pipe_buf_release 16 - -16 user_page_pipe_buf_ops20 - -20 splice_write_null 24 4 -20 page_cache_pipe_buf_ops 20 - -20 nosteal_pipe_buf_ops 20 - -20 default_pipe_buf_ops 20 - -20 generic_splice_sendpage 24 - -24 user_page_pipe_buf_steal 25 - -25 splice_shrink_spd 27 - -27 pipe_to_user 43 - -43 direct_splice_actor 47 - -47 default_file_splice_write 49 - -49 wakeup_pipe_writers 54 - -54 wakeup_pipe_readers 54 - -54 write_pipe_buf71 - -71 page_cache_pipe_buf_confirm 80 - -80 splice_grow_spd 87 - -87 do_splice_to 87 - -87 ipipe_prep.part 92 - -92 splice_from_pipe 93 - -93 splice_from_pipe_next107 --107 pipe_to_sendpage 109 --109 page_cache_pipe_buf_steal114 --114 opipe_prep.part 119 --119 sys_sendfile 122 --122 generic_file_splice_read 131 8-123 sys_sendfile64 126 --126 sys_vmsplice 137 --137 do_splice_direct 148 --148 vmsplice_to_user 205 --205 __splice_from_pipe 246 --246 splice_direct_to_actor 348 --348 splice_to_pipe 371 --371 do_sendfile 492 --492 sys_tee 497
[PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
REPO: https://github.com/smipi1/linux-tinification.git BRANCH: tiny/config-syscall-splice BACKGROUND: This patch-set forms part of the Linux Kernel Tinification effort ( https://tiny.wiki.kernel.org/). GOAL: Support compiling out the splice family of syscalls (splice, vmsplice, tee and sendfile) along with all supporting infrastructure if not needed. Many embedded systems will not need the splice-family syscalls. Omitting them saves space. STRATEGY: a. With the goal of eventually compiling out fs/splice.c, several functions that are only used in support of the the splice family of syscalls are moved into fs/splice.c from fs/read_write.c. The kernel_write function that is not used to support the splice syscalls is moved to fs/read_write.c: 0001-fs-move-sendfile-syscall-into-fs-splice.patch 0002-fs-moved-kernel_write-to-fs-read_write.patch b. Introduce an EXPERT kernel configuration option; CONFIG_SYSCALL_SPLICE; to compile out the splice family of syscalls. This removes all userspace uses of the splice infrastructure. 0003-fs-splice-support-compiling-out-splice-family-syscal.patch c. Splice exports an operations struct, nosteal_pipe_buf_ops. Eliminate the use of this struct when CONFIG_SYSCALL_SPLICE is undefined, so that splice can later be compiled out: 0004-fs-fuse-support-compiling-out-splice.patch 0005-net-core-support-compiling-out-splice.patch e. Compile out fs/splice.c. Functions exported by fs/splice are mocked out with failing static inlines. This is done so as to all but eliminate the maintenance burden on file-system drivers. 0006-fs-splice-full-support-for-compiling-out-splice.patch RESULTS: A tinyconfig bloat-o-meter score for the entire patch-set: add/remove: 0/41 grow/shrink: 5/7 up/down: 23/-8422 (-8399) function old new delta sys_pwritev 115 122 +7 sys_preadv 115 122 +7 fdput_pos 29 36 +7 sys_pwrite64 115 116 +1 sys_pread64 115 116 +1 pipe_to_null 4 - -4 generic_pipe_buf_nosteal 6 - -6 spd_release_page 10 - -10 fdput 11 - -11 PageUptodate 22 11 -11 lock_page 36 24 -12 signal_pending39 26 -13 fdget 56 42 -14 page_cache_pipe_buf_release 16 - -16 user_page_pipe_buf_ops20 - -20 splice_write_null 24 4 -20 page_cache_pipe_buf_ops 20 - -20 nosteal_pipe_buf_ops 20 - -20 default_pipe_buf_ops 20 - -20 generic_splice_sendpage 24 - -24 user_page_pipe_buf_steal 25 - -25 splice_shrink_spd 27 - -27 pipe_to_user 43 - -43 direct_splice_actor 47 - -47 default_file_splice_write 49 - -49 wakeup_pipe_writers 54 - -54 wakeup_pipe_readers 54 - -54 write_pipe_buf71 - -71 page_cache_pipe_buf_confirm 80 - -80 splice_grow_spd 87 - -87 do_splice_to 87 - -87 ipipe_prep.part 92 - -92 splice_from_pipe 93 - -93 splice_from_pipe_next107 --107 pipe_to_sendpage 109 --109 page_cache_pipe_buf_steal114 --114 opipe_prep.part 119 --119 sys_sendfile 122 --122 generic_file_splice_read 131 8-123 sys_sendfile64 126 --126 sys_vmsplice 137 --137 do_splice_direct 148 --148 vmsplice_to_user 205 --205 __splice_from_pipe 246 --246 splice_direct_to_actor 348 --348 splice_to_pipe 371 --371 do_sendfile 492 --492 sys_tee 497
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. I cannot take this patch series seriously, sorry. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large stack of select and depends on, both directly and indirectly; adding a select SPLICE_SYSCALL to it seems fine. (That select does need adding, though. Pieter, you need to test-compile more than just tinyconfig and defconfig. Try an allyesconfig with *just* splice turned off, and make sure that compiles.) Given the requirements of running a file server in the kernel, I'd expect CONFIG_NFSD to end up with several more selects of optional functionality in the future. It seems rather likely that the average embedded system will be compiling out NFS. :) Also, this patch series compiles out splice and sendfile, including several *users* of sendpage; it doesn't compile out the sendpage support/infrastructure itself. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large stack of select and depends on, both directly and indirectly; adding a select SPLICE_SYSCALL to it seems fine. (That select does need adding, though. Pieter, you need to test-compile more than just tinyconfig and defconfig. Try an allyesconfig with *just* splice turned off, and make sure that compiles.) Did exacly that. Took forever on my hardware, but no problems. Given the requirements of running a file server in the kernel, I'd expect CONFIG_NFSD to end up with several more selects of optional functionality in the future. It seems rather likely that the average embedded system will be compiling out NFS. :) Also, this patch series compiles out splice and sendfile, including several *users* of sendpage; it doesn't compile out the sendpage support/infrastructure itself. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large stack of select and depends on, both directly and indirectly; adding a select SPLICE_SYSCALL to it seems fine. (That select does need adding, though. Pieter, you need to test-compile more than just tinyconfig and defconfig. Try an allyesconfig with *just* splice turned off, and make sure that compiles.) Did exacly that. Took forever on my hardware, but no problems. Ah, I see. Looking more closely at nfsd, it looks like it already has a code path for filesystems that don't do splice. I think, rather than making nfsd select SPLICE_SYSCALL, that it would suffice to change the rqstp-rq_splice_ok = true; in svc_process_common (net/sunrpc/svc.c) to: rqstp-rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); Then nfsd should simply *always* fall back to its non-splice support. That said, given that it seems exceedingly unlikely that anyone would use the in-kernel nfsd on a system trying to minimize kernel size, it still seems cleaner to just select SPLICE_SYSCALL from NFSD in Kconfig. That avoids making any changes at all to the nfsd source in this patch series. - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, 23 Nov 2014 15:36:37 -0800 Josh Triplett j...@joshtriplett.org wrote: On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large stack of select and depends on, both directly and indirectly; adding a select SPLICE_SYSCALL to it seems fine. (That select does need adding, though. Pieter, you need to test-compile more than just tinyconfig and defconfig. Try an allyesconfig with *just* splice turned off, and make sure that compiles.) Did exacly that. Took forever on my hardware, but no problems. Ah, I see. Looking more closely at nfsd, it looks like it already has a code path for filesystems that don't do splice. I think, rather than making nfsd select SPLICE_SYSCALL, that it would suffice to change the rqstp-rq_splice_ok = true; in svc_process_common (net/sunrpc/svc.c) to: rqstp-rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); Then nfsd should simply *always* fall back to its non-splice support. I'd probably prefer the above, actually. We have to keep supporting non-splice enabled fs' for the forseeable future, so we may as well allow people to run nfsd in such configurations. It could even be useful for testing the non-splice-enabled codepaths. That said, given that it seems exceedingly unlikely that anyone would use the in-kernel nfsd on a system trying to minimize kernel size, it still seems cleaner to just select SPLICE_SYSCALL from NFSD in Kconfig. That avoids making any changes at all to the nfsd source in this patch series. -- Jeff Layton jlay...@poochiereds.net -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/6] kernel tinification: optionally compile out splice family of syscalls (splice, vmsplice, tee and sendfile)
On Sun, Nov 23, 2014 at 07:28:10PM -0500, Jeff Layton wrote: On Sun, 23 Nov 2014 15:36:37 -0800 Josh Triplett j...@joshtriplett.org wrote: On Sun, Nov 23, 2014 at 09:30:40PM +0100, Pieter Smith wrote: On Sun, Nov 23, 2014 at 11:43:26AM -0800, Josh Triplett wrote: On Sun, Nov 23, 2014 at 01:46:23PM -0500, David Miller wrote: Truly removing sendfile/sendpage means that you can't even compile NFS into the tree. If you mean the in-kernel nfsd (CONFIG_NFSD), that already has a large stack of select and depends on, both directly and indirectly; adding a select SPLICE_SYSCALL to it seems fine. (That select does need adding, though. Pieter, you need to test-compile more than just tinyconfig and defconfig. Try an allyesconfig with *just* splice turned off, and make sure that compiles.) Did exacly that. Took forever on my hardware, but no problems. Ah, I see. Looking more closely at nfsd, it looks like it already has a code path for filesystems that don't do splice. I think, rather than making nfsd select SPLICE_SYSCALL, that it would suffice to change the rqstp-rq_splice_ok = true; in svc_process_common (net/sunrpc/svc.c) to: rqstp-rq_splice_ok = IS_ENABLED(CONFIG_SPLICE_SYSCALL); Then nfsd should simply *always* fall back to its non-splice support. I'd probably prefer the above, actually. We have to keep supporting non-splice enabled fs' for the forseeable future, so we may as well allow people to run nfsd in such configurations. It could even be useful for testing the non-splice-enabled codepaths. Good point! - Josh Triplett -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/