* [-next] rename of VM_NR_PDFLUSH_THREADS breaks strace compilation
@ 2018-12-07 7:58 Heiko Carstens
2018-12-07 10:53 ` Rafael Aquini
0 siblings, 1 reply; 8+ messages in thread
From: Heiko Carstens @ 2018-12-07 7:58 UTC (permalink / raw)
To: Rafael Aquini
Cc: Greg Kroah-Hartman, Dmitry V. Levin,
linux-next-u79uwXL29TY76Z2rM5mHXA,
strace-devel-3+4lAyCyj6AWlMsSdNXQLw, William Kucharski
Hi Rafael,
your patch 77cab92a2cb1 ("sysctl: clean up nr_pdflush_threads
leftover") in linux-next breaks strace compilation if used with kernel
headers from linux-next.
This:
--- a/include/uapi/linux/sysctl.h
+++ b/include/uapi/linux/sysctl.h
[...]
- VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */
+ VM_UNUSED15=15, /* was: int: nr_pdflush_threads */
causes this when trying to build strace:
+ ./bootstrap
configure.ac:54: installing './compile'
configure.ac:47: installing './config.guess'
configure.ac:47: installing './config.sub'
configure.ac:45: installing './install-sh'
configure.ac:45: installing './missing'
Makefile.am: installing './depcomp'
Makefile.am:975: warning: variable 'ioctlsort_LDFLAGS' is defined but no program or
Makefile.am:975: library has 'ioctlsort' as canonical name (possible typo)
parallel-tests: installing './test-driver'
+ ./configure
++ nproc
+ make -j 10
In file included from defs.h:308,
from sysctl.c:31:
xlat/sysctl_vm.h:23:7: error: ‘VM_NR_PDFLUSH_THREADS’ undeclared here (not in a function)
XLAT(VM_NR_PDFLUSH_THREADS),
^~~~~~~~~~~~~~~~~~~~~
xlat.h:49:35: note: in definition of macro ‘XLAT’
# define XLAT(val) { (unsigned)(val), #val }
^~~
--
Strace-devel mailing list
Strace-devel@lists.strace.io
https://lists.strace.io/mailman/listinfo/strace-devel
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [-next] rename of VM_NR_PDFLUSH_THREADS breaks strace compilation 2018-12-07 7:58 [-next] rename of VM_NR_PDFLUSH_THREADS breaks strace compilation Heiko Carstens @ 2018-12-07 10:53 ` Rafael Aquini 2018-12-07 11:01 ` Heiko Carstens 0 siblings, 1 reply; 8+ messages in thread From: Rafael Aquini @ 2018-12-07 10:53 UTC (permalink / raw) To: Heiko Carstens Cc: Greg Kroah-Hartman, Dmitry V. Levin, linux-next-u79uwXL29TY76Z2rM5mHXA, strace-devel-3+4lAyCyj6AWlMsSdNXQLw, William Kucharski On Fri, Dec 07, 2018 at 08:58:07AM +0100, Heiko Carstens wrote: > Hi Rafael, > > your patch 77cab92a2cb1 ("sysctl: clean up nr_pdflush_threads > leftover") in linux-next breaks strace compilation if used with kernel > headers from linux-next. > > This: > > --- a/include/uapi/linux/sysctl.h > +++ b/include/uapi/linux/sysctl.h > [...] > - VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */ > + VM_UNUSED15=15, /* was: int: nr_pdflush_threads */ > > causes this when trying to build strace: > > + ./bootstrap > configure.ac:54: installing './compile' > configure.ac:47: installing './config.guess' > configure.ac:47: installing './config.sub' > configure.ac:45: installing './install-sh' > configure.ac:45: installing './missing' > Makefile.am: installing './depcomp' > Makefile.am:975: warning: variable 'ioctlsort_LDFLAGS' is defined but no program or > Makefile.am:975: library has 'ioctlsort' as canonical name (possible typo) > parallel-tests: installing './test-driver' > + ./configure > ++ nproc > + make -j 10 > In file included from defs.h:308, > from sysctl.c:31: > xlat/sysctl_vm.h:23:7: error: ‘VM_NR_PDFLUSH_THREADS’ undeclared here (not in a function) > XLAT(VM_NR_PDFLUSH_THREADS), > ^~~~~~~~~~~~~~~~~~~~~ > xlat.h:49:35: note: in definition of macro ‘XLAT’ > # define XLAT(val) { (unsigned)(val), #val } > ^~~ > The nr_pdflush_threads (VM_NR_PDFLUSH_THREADS) tunable has been obsolete since 2.6.32 and it was, excepting by the bit in the referred patch, completely removed on 4.15. I think you just need to patch strace source with the following hunk, in order to reflect the removal. Would you mind checking it? diff --git a/xlat/sysctl_vm.in b/xlat/sysctl_vm.in index 3c2b4739..30784c2a 100644 --- a/xlat/sysctl_vm.in +++ b/xlat/sysctl_vm.in @@ -5,7 +5,6 @@ VM_DIRTY_BACKGROUND VM_DIRTY_RATIO VM_DIRTY_WB_CS VM_DIRTY_EXPIRE_CS -VM_NR_PDFLUSH_THREADS VM_OVERCOMMIT_RATIO VM_PAGEBUF VM_HUGETLB_PAGES -- Strace-devel mailing list Strace-devel@lists.strace.io https://lists.strace.io/mailman/listinfo/strace-devel ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [-next] rename of VM_NR_PDFLUSH_THREADS breaks strace compilation 2018-12-07 10:53 ` Rafael Aquini @ 2018-12-07 11:01 ` Heiko Carstens 2018-12-07 11:16 ` Rafael Aquini 0 siblings, 1 reply; 8+ messages in thread From: Heiko Carstens @ 2018-12-07 11:01 UTC (permalink / raw) To: Rafael Aquini Cc: Greg Kroah-Hartman, Dmitry V. Levin, linux-next-u79uwXL29TY76Z2rM5mHXA, strace-devel-3+4lAyCyj6AWlMsSdNXQLw, William Kucharski On Fri, Dec 07, 2018 at 05:53:13AM -0500, Rafael Aquini wrote: > On Fri, Dec 07, 2018 at 08:58:07AM +0100, Heiko Carstens wrote: > > Hi Rafael, > > > > your patch 77cab92a2cb1 ("sysctl: clean up nr_pdflush_threads > > leftover") in linux-next breaks strace compilation if used with kernel > > headers from linux-next. > > - VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */ > > + VM_UNUSED15=15, /* was: int: nr_pdflush_threads */ > The nr_pdflush_threads (VM_NR_PDFLUSH_THREADS) tunable has been obsolete since 2.6.32 > and it was, excepting by the bit in the referred patch, completely removed on 4.15. > > I think you just need to patch strace source with the following hunk, in > order to reflect the removal. Would you mind checking it? > > diff --git a/xlat/sysctl_vm.in b/xlat/sysctl_vm.in > index 3c2b4739..30784c2a 100644 > --- a/xlat/sysctl_vm.in > +++ b/xlat/sysctl_vm.in > @@ -5,7 +5,6 @@ VM_DIRTY_BACKGROUND > VM_DIRTY_RATIO > VM_DIRTY_WB_CS > VM_DIRTY_EXPIRE_CS > -VM_NR_PDFLUSH_THREADS > VM_OVERCOMMIT_RATIO > VM_PAGEBUF > VM_HUGETLB_PAGES I'll leave that up to Dmitry to decide what to do here. At least it won't be possible to compile old strace versions with new kernel headers if the kernel change gets merged upstream. -- Strace-devel mailing list Strace-devel-3+4lAyCyj6AWlMsSdNXQLw@public.gmane.org https://lists.strace.io/mailman/listinfo/strace-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [-next] rename of VM_NR_PDFLUSH_THREADS breaks strace compilation 2018-12-07 11:01 ` Heiko Carstens @ 2018-12-07 11:16 ` Rafael Aquini 2018-12-07 11:54 ` Greg Kroah-Hartman 0 siblings, 1 reply; 8+ messages in thread From: Rafael Aquini @ 2018-12-07 11:16 UTC (permalink / raw) To: Heiko Carstens Cc: Greg Kroah-Hartman, Dmitry V. Levin, linux-next-u79uwXL29TY76Z2rM5mHXA, strace-devel-3+4lAyCyj6AWlMsSdNXQLw, William Kucharski On Fri, Dec 07, 2018 at 12:01:46PM +0100, Heiko Carstens wrote: > On Fri, Dec 07, 2018 at 05:53:13AM -0500, Rafael Aquini wrote: > > On Fri, Dec 07, 2018 at 08:58:07AM +0100, Heiko Carstens wrote: > > > Hi Rafael, > > > > > > your patch 77cab92a2cb1 ("sysctl: clean up nr_pdflush_threads > > > leftover") in linux-next breaks strace compilation if used with kernel > > > headers from linux-next. > > > - VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */ > > > + VM_UNUSED15=15, /* was: int: nr_pdflush_threads */ > > The nr_pdflush_threads (VM_NR_PDFLUSH_THREADS) tunable has been obsolete since 2.6.32 > > and it was, excepting by the bit in the referred patch, completely removed on 4.15. > > > > I think you just need to patch strace source with the following hunk, in > > order to reflect the removal. Would you mind checking it? > > > > diff --git a/xlat/sysctl_vm.in b/xlat/sysctl_vm.in > > index 3c2b4739..30784c2a 100644 > > --- a/xlat/sysctl_vm.in > > +++ b/xlat/sysctl_vm.in > > @@ -5,7 +5,6 @@ VM_DIRTY_BACKGROUND > > VM_DIRTY_RATIO > > VM_DIRTY_WB_CS > > VM_DIRTY_EXPIRE_CS > > -VM_NR_PDFLUSH_THREADS > > VM_OVERCOMMIT_RATIO > > VM_PAGEBUF > > VM_HUGETLB_PAGES > > I'll leave that up to Dmitry to decide what to do here. At least it > won't be possible to compile old strace versions with new kernel > headers if the kernel change gets merged upstream. > It escapes me why strace bootstrap needs to tabulate these sysctl_vm, as no one of these defs are referenced in the rest of the code, let alone /proc/sys/vm/nr_pdflush_threads that means nothing since per-BDI flusher threads were introduced almost 10 years ago. Cheers, -- Rafael -- Strace-devel mailing list Strace-devel-3+4lAyCyj6AWlMsSdNXQLw@public.gmane.org https://lists.strace.io/mailman/listinfo/strace-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [-next] rename of VM_NR_PDFLUSH_THREADS breaks strace compilation 2018-12-07 11:16 ` Rafael Aquini @ 2018-12-07 11:54 ` Greg Kroah-Hartman [not found] ` <20181207115412.GA15336-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Greg Kroah-Hartman @ 2018-12-07 11:54 UTC (permalink / raw) To: Rafael Aquini Cc: William Kucharski, linux-next-u79uwXL29TY76Z2rM5mHXA, Heiko Carstens, strace-devel-3+4lAyCyj6AWlMsSdNXQLw, Dmitry V. Levin On Fri, Dec 07, 2018 at 06:16:01AM -0500, Rafael Aquini wrote: > On Fri, Dec 07, 2018 at 12:01:46PM +0100, Heiko Carstens wrote: > > On Fri, Dec 07, 2018 at 05:53:13AM -0500, Rafael Aquini wrote: > > > On Fri, Dec 07, 2018 at 08:58:07AM +0100, Heiko Carstens wrote: > > > > Hi Rafael, > > > > > > > > your patch 77cab92a2cb1 ("sysctl: clean up nr_pdflush_threads > > > > leftover") in linux-next breaks strace compilation if used with kernel > > > > headers from linux-next. > > > > - VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */ > > > > + VM_UNUSED15=15, /* was: int: nr_pdflush_threads */ > > > The nr_pdflush_threads (VM_NR_PDFLUSH_THREADS) tunable has been obsolete since 2.6.32 > > > and it was, excepting by the bit in the referred patch, completely removed on 4.15. > > > > > > I think you just need to patch strace source with the following hunk, in > > > order to reflect the removal. Would you mind checking it? > > > > > > diff --git a/xlat/sysctl_vm.in b/xlat/sysctl_vm.in > > > index 3c2b4739..30784c2a 100644 > > > --- a/xlat/sysctl_vm.in > > > +++ b/xlat/sysctl_vm.in > > > @@ -5,7 +5,6 @@ VM_DIRTY_BACKGROUND > > > VM_DIRTY_RATIO > > > VM_DIRTY_WB_CS > > > VM_DIRTY_EXPIRE_CS > > > -VM_NR_PDFLUSH_THREADS > > > VM_OVERCOMMIT_RATIO > > > VM_PAGEBUF > > > VM_HUGETLB_PAGES > > > > I'll leave that up to Dmitry to decide what to do here. At least it > > won't be possible to compile old strace versions with new kernel > > headers if the kernel change gets merged upstream. > > > > It escapes me why strace bootstrap needs to tabulate these sysctl_vm, as no one > of these defs are referenced in the rest of the code, let alone > /proc/sys/vm/nr_pdflush_threads that means nothing since per-BDI flusher threads > were introduced almost 10 years ago. This isn't ok, we shouldn't break userspace, I'll go revert this patch. Rafael, feel free to resend but just add a comment that says it is obsolete or something. thanks, greg k-h -- Strace-devel mailing list Strace-devel-3+4lAyCyj6AWlMsSdNXQLw@public.gmane.org https://lists.strace.io/mailman/listinfo/strace-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20181207115412.GA15336-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>]
* Re: [-next] rename of VM_NR_PDFLUSH_THREADS breaks strace compilation [not found] ` <20181207115412.GA15336-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> @ 2018-12-07 12:17 ` Rafael Aquini 2018-12-07 12:51 ` Rafael Aquini 0 siblings, 1 reply; 8+ messages in thread From: Rafael Aquini @ 2018-12-07 12:17 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: William Kucharski, linux-next-u79uwXL29TY76Z2rM5mHXA, Heiko Carstens, strace-devel-3+4lAyCyj6AWlMsSdNXQLw, Dmitry V. Levin On Fri, Dec 07, 2018 at 12:54:12PM +0100, Greg Kroah-Hartman wrote: > On Fri, Dec 07, 2018 at 06:16:01AM -0500, Rafael Aquini wrote: > > On Fri, Dec 07, 2018 at 12:01:46PM +0100, Heiko Carstens wrote: > > > On Fri, Dec 07, 2018 at 05:53:13AM -0500, Rafael Aquini wrote: > > > > On Fri, Dec 07, 2018 at 08:58:07AM +0100, Heiko Carstens wrote: > > > > > Hi Rafael, > > > > > > > > > > your patch 77cab92a2cb1 ("sysctl: clean up nr_pdflush_threads > > > > > leftover") in linux-next breaks strace compilation if used with kernel > > > > > headers from linux-next. > > > > > - VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */ > > > > > + VM_UNUSED15=15, /* was: int: nr_pdflush_threads */ > > > > The nr_pdflush_threads (VM_NR_PDFLUSH_THREADS) tunable has been obsolete since 2.6.32 > > > > and it was, excepting by the bit in the referred patch, completely removed on 4.15. > > > > > > > > I think you just need to patch strace source with the following hunk, in > > > > order to reflect the removal. Would you mind checking it? > > > > > > > > diff --git a/xlat/sysctl_vm.in b/xlat/sysctl_vm.in > > > > index 3c2b4739..30784c2a 100644 > > > > --- a/xlat/sysctl_vm.in > > > > +++ b/xlat/sysctl_vm.in > > > > @@ -5,7 +5,6 @@ VM_DIRTY_BACKGROUND > > > > VM_DIRTY_RATIO > > > > VM_DIRTY_WB_CS > > > > VM_DIRTY_EXPIRE_CS > > > > -VM_NR_PDFLUSH_THREADS > > > > VM_OVERCOMMIT_RATIO > > > > VM_PAGEBUF > > > > VM_HUGETLB_PAGES > > > > > > I'll leave that up to Dmitry to decide what to do here. At least it > > > won't be possible to compile old strace versions with new kernel > > > headers if the kernel change gets merged upstream. > > > > > > > It escapes me why strace bootstrap needs to tabulate these sysctl_vm, as no one > > of these defs are referenced in the rest of the code, let alone > > /proc/sys/vm/nr_pdflush_threads that means nothing since per-BDI flusher threads > > were introduced almost 10 years ago. > > This isn't ok, we shouldn't break userspace, I'll go revert this patch. > > Rafael, feel free to resend but just add a comment that says it is > obsolete or something. > This is more like autotools insanity on the app buildscripts part than proper userspace breakage. Linux sysctl man page brings a nice note on why one should not rely on the syscall: NOTES Glibc does not provide a wrapper for this system call; call it using syscall(2). Or rather... don't call it: use of this system call has long been discouraged, and it is so unloved that it is likely to disappear in a future kernel version. Since Linux 2.6.24, uses of this system call result in warnings in the kernel log. Remove it from your programs now; use the /proc/sys interface instead. This system call is available only if the kernel was configured with the CONFIG_SYSCTL_SYSCALL option. also worth to note that CONFIG_SYSCTL_SYSCALL defaults to N Cheers, -- Rafael -- Strace-devel mailing list Strace-devel-3+4lAyCyj6AWlMsSdNXQLw@public.gmane.org https://lists.strace.io/mailman/listinfo/strace-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [-next] rename of VM_NR_PDFLUSH_THREADS breaks strace compilation 2018-12-07 12:17 ` Rafael Aquini @ 2018-12-07 12:51 ` Rafael Aquini 2018-12-07 14:51 ` Greg Kroah-Hartman 0 siblings, 1 reply; 8+ messages in thread From: Rafael Aquini @ 2018-12-07 12:51 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: William Kucharski, linux-next-u79uwXL29TY76Z2rM5mHXA, Heiko Carstens, strace-devel-3+4lAyCyj6AWlMsSdNXQLw, Dmitry V. Levin On Fri, Dec 07, 2018 at 07:17:17AM -0500, Rafael Aquini wrote: > On Fri, Dec 07, 2018 at 12:54:12PM +0100, Greg Kroah-Hartman wrote: > > On Fri, Dec 07, 2018 at 06:16:01AM -0500, Rafael Aquini wrote: > > > On Fri, Dec 07, 2018 at 12:01:46PM +0100, Heiko Carstens wrote: > > > > On Fri, Dec 07, 2018 at 05:53:13AM -0500, Rafael Aquini wrote: > > > > > On Fri, Dec 07, 2018 at 08:58:07AM +0100, Heiko Carstens wrote: > > > > > > Hi Rafael, > > > > > > > > > > > > your patch 77cab92a2cb1 ("sysctl: clean up nr_pdflush_threads > > > > > > leftover") in linux-next breaks strace compilation if used with kernel > > > > > > headers from linux-next. > > > > > > - VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */ > > > > > > + VM_UNUSED15=15, /* was: int: nr_pdflush_threads */ > > > > > The nr_pdflush_threads (VM_NR_PDFLUSH_THREADS) tunable has been obsolete since 2.6.32 > > > > > and it was, excepting by the bit in the referred patch, completely removed on 4.15. > > > > > > > > > > I think you just need to patch strace source with the following hunk, in > > > > > order to reflect the removal. Would you mind checking it? > > > > > > > > > > diff --git a/xlat/sysctl_vm.in b/xlat/sysctl_vm.in > > > > > index 3c2b4739..30784c2a 100644 > > > > > --- a/xlat/sysctl_vm.in > > > > > +++ b/xlat/sysctl_vm.in > > > > > @@ -5,7 +5,6 @@ VM_DIRTY_BACKGROUND > > > > > VM_DIRTY_RATIO > > > > > VM_DIRTY_WB_CS > > > > > VM_DIRTY_EXPIRE_CS > > > > > -VM_NR_PDFLUSH_THREADS > > > > > VM_OVERCOMMIT_RATIO > > > > > VM_PAGEBUF > > > > > VM_HUGETLB_PAGES > > > > > > > > I'll leave that up to Dmitry to decide what to do here. At least it > > > > won't be possible to compile old strace versions with new kernel > > > > headers if the kernel change gets merged upstream. > > > > > > > > > > It escapes me why strace bootstrap needs to tabulate these sysctl_vm, as no one > > > of these defs are referenced in the rest of the code, let alone > > > /proc/sys/vm/nr_pdflush_threads that means nothing since per-BDI flusher threads > > > were introduced almost 10 years ago. > > > > This isn't ok, we shouldn't break userspace, I'll go revert this patch. > > > > Rafael, feel free to resend but just add a comment that says it is > > obsolete or something. > > > > This is more like autotools insanity on the app buildscripts part than proper > userspace breakage. Linux sysctl man page brings a nice note on why one > should not rely on the syscall: > > NOTES > Glibc does not provide a wrapper for this system call; call it using syscall(2). > Or rather... don't call it: use of this system call has long been > discouraged, and it is so unloved that it is likely to disappear in a > future kernel version. Since Linux 2.6.24, uses of this system call result in > warnings in the kernel log. Remove it from your programs now; use the /proc/sys interface instead. > > This system call is available only if the kernel was configured with the CONFIG_SYSCTL_SYSCALL option. > > > also worth to note that CONFIG_SYSCTL_SYSCALL defaults to N > Here's a little bit of history to add to the rationale on why the revert, in this case, does not seem to be the correct path: Initially, upstream commit: commit 3965c9ae47d64aadf6f13b6fcd37767b83c0689a Author: Wanpeng Li <liwp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> Date: Tue Jul 31 16:41:52 2012 -0700 mm: prepare for removal of obsolete /proc/sys/vm/nr_pdflush_threads effectively removed nr_pdflush_threads storage space, ceased exporting VM_NR_PDFLUSH_THREADS to struct bin_table bin_vm_table[] and replaced the procname handler with a deprecation note to dmesg. then, the following upstream commit completely removed the entry from procfs: commit b35bd0d9f8a8ea17aae40893e18274d191a2d2c5 Author: Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org> Date: Sat Sep 30 23:39:05 2017 -0600 sysctl: remove /proc/sys/vm/nr_pdflush_threads Only bit missing is the cleanup proposed with this patch. If we cannot clean up something rigthfully deprecated and removed from so long, then we're certainly dead in the water. This will be my last email on the matter, I promise! Cheers, -- Rafael -- Strace-devel mailing list Strace-devel-3+4lAyCyj6AWlMsSdNXQLw@public.gmane.org https://lists.strace.io/mailman/listinfo/strace-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [-next] rename of VM_NR_PDFLUSH_THREADS breaks strace compilation 2018-12-07 12:51 ` Rafael Aquini @ 2018-12-07 14:51 ` Greg Kroah-Hartman 0 siblings, 0 replies; 8+ messages in thread From: Greg Kroah-Hartman @ 2018-12-07 14:51 UTC (permalink / raw) To: Rafael Aquini Cc: William Kucharski, linux-next-u79uwXL29TY76Z2rM5mHXA, Heiko Carstens, strace-devel-3+4lAyCyj6AWlMsSdNXQLw, Dmitry V. Levin On Fri, Dec 07, 2018 at 07:51:29AM -0500, Rafael Aquini wrote: > On Fri, Dec 07, 2018 at 07:17:17AM -0500, Rafael Aquini wrote: > > On Fri, Dec 07, 2018 at 12:54:12PM +0100, Greg Kroah-Hartman wrote: > > > On Fri, Dec 07, 2018 at 06:16:01AM -0500, Rafael Aquini wrote: > > > > On Fri, Dec 07, 2018 at 12:01:46PM +0100, Heiko Carstens wrote: > > > > > On Fri, Dec 07, 2018 at 05:53:13AM -0500, Rafael Aquini wrote: > > > > > > On Fri, Dec 07, 2018 at 08:58:07AM +0100, Heiko Carstens wrote: > > > > > > > Hi Rafael, > > > > > > > > > > > > > > your patch 77cab92a2cb1 ("sysctl: clean up nr_pdflush_threads > > > > > > > leftover") in linux-next breaks strace compilation if used with kernel > > > > > > > headers from linux-next. > > > > > > > - VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */ > > > > > > > + VM_UNUSED15=15, /* was: int: nr_pdflush_threads */ > > > > > > The nr_pdflush_threads (VM_NR_PDFLUSH_THREADS) tunable has been obsolete since 2.6.32 > > > > > > and it was, excepting by the bit in the referred patch, completely removed on 4.15. > > > > > > > > > > > > I think you just need to patch strace source with the following hunk, in > > > > > > order to reflect the removal. Would you mind checking it? > > > > > > > > > > > > diff --git a/xlat/sysctl_vm.in b/xlat/sysctl_vm.in > > > > > > index 3c2b4739..30784c2a 100644 > > > > > > --- a/xlat/sysctl_vm.in > > > > > > +++ b/xlat/sysctl_vm.in > > > > > > @@ -5,7 +5,6 @@ VM_DIRTY_BACKGROUND > > > > > > VM_DIRTY_RATIO > > > > > > VM_DIRTY_WB_CS > > > > > > VM_DIRTY_EXPIRE_CS > > > > > > -VM_NR_PDFLUSH_THREADS > > > > > > VM_OVERCOMMIT_RATIO > > > > > > VM_PAGEBUF > > > > > > VM_HUGETLB_PAGES > > > > > > > > > > I'll leave that up to Dmitry to decide what to do here. At least it > > > > > won't be possible to compile old strace versions with new kernel > > > > > headers if the kernel change gets merged upstream. > > > > > > > > > > > > > It escapes me why strace bootstrap needs to tabulate these sysctl_vm, as no one > > > > of these defs are referenced in the rest of the code, let alone > > > > /proc/sys/vm/nr_pdflush_threads that means nothing since per-BDI flusher threads > > > > were introduced almost 10 years ago. > > > > > > This isn't ok, we shouldn't break userspace, I'll go revert this patch. > > > > > > Rafael, feel free to resend but just add a comment that says it is > > > obsolete or something. > > > > > > > This is more like autotools insanity on the app buildscripts part than proper > > userspace breakage. Linux sysctl man page brings a nice note on why one > > should not rely on the syscall: > > > > NOTES > > Glibc does not provide a wrapper for this system call; call it using syscall(2). > > Or rather... don't call it: use of this system call has long been > > discouraged, and it is so unloved that it is likely to disappear in a > > future kernel version. Since Linux 2.6.24, uses of this system call result in > > warnings in the kernel log. Remove it from your programs now; use the /proc/sys interface instead. > > > > This system call is available only if the kernel was configured with the CONFIG_SYSCTL_SYSCALL option. > > > > > > also worth to note that CONFIG_SYSCTL_SYSCALL defaults to N > > > > Here's a little bit of history to add to the rationale on why the > revert, in this case, does not seem to be the correct path: > > Initially, upstream commit: > > commit 3965c9ae47d64aadf6f13b6fcd37767b83c0689a > Author: Wanpeng Li <liwp-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> > Date: Tue Jul 31 16:41:52 2012 -0700 > > mm: prepare for removal of obsolete /proc/sys/vm/nr_pdflush_threads > > > effectively removed nr_pdflush_threads storage space, ceased exporting > VM_NR_PDFLUSH_THREADS to struct bin_table bin_vm_table[] and replaced > the procname handler with a deprecation note to dmesg. > > > > then, the following upstream commit completely removed the entry from procfs: > > commit b35bd0d9f8a8ea17aae40893e18274d191a2d2c5 > Author: Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org> > Date: Sat Sep 30 23:39:05 2017 -0600 > > sysctl: remove /proc/sys/vm/nr_pdflush_threads > > > Only bit missing is the cleanup proposed with this patch. If we cannot > clean up something rigthfully deprecated and removed from so long, then > we're certainly dead in the water. The code can be removed from the kernel, but you can not break working stuff. If userspace wants to use that #define and then not do anything with it, that's fine. But we can't delete it if it would break something. So the revert stays for now. Again, feel free to send a patch updating the comments as to what is going on here. thanks, greg k-h -- Strace-devel mailing list Strace-devel-3+4lAyCyj6AWlMsSdNXQLw@public.gmane.org https://lists.strace.io/mailman/listinfo/strace-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-12-07 14:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-07 7:58 [-next] rename of VM_NR_PDFLUSH_THREADS breaks strace compilation Heiko Carstens
2018-12-07 10:53 ` Rafael Aquini
2018-12-07 11:01 ` Heiko Carstens
2018-12-07 11:16 ` Rafael Aquini
2018-12-07 11:54 ` Greg Kroah-Hartman
[not found] ` <20181207115412.GA15336-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2018-12-07 12:17 ` Rafael Aquini
2018-12-07 12:51 ` Rafael Aquini
2018-12-07 14:51 ` Greg Kroah-Hartman
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).