* [PATCH v2] x86/vdso: shrink vdso/vdso32-setup.i via IWYU
@ 2024-01-04 20:46 Tanzir Hasan
2024-01-08 23:58 ` Justin Stitt
0 siblings, 1 reply; 2+ messages in thread
From: Tanzir Hasan @ 2024-01-04 20:46 UTC (permalink / raw)
To: Andy Lutomirski, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H. Peter Anvin
Cc: Nick Desaulniers, linux-kernel, Nick Desaulniers, Tanzir Hasan
This diff uses an open source tool include-what-you-use (IWYU) to modify
the include list, changing indirect includes to direct includes. IWYU is
implemented using the IWYUScripts github repository which is a tool that
is currently undergoing development. These changes seek to improve build
times.
This change to vdso/vdso32-setup.c resulted in a preprocessed size of
vdso/vdso32-setup.i from 44009 lines to 18572 lines (-58%) for the x86
defconfig.
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Tanzir Hasan <tanzirh@google.com>
---
Changes in v2:
- Fixed messed up signed-off-by tag
- Link to v1: https://lore.kernel.org/r/20240104-vdso32setup-v1-1-1737147bc6ed@google.com
---
arch/x86/entry/vdso/vdso32-setup.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/arch/x86/entry/vdso/vdso32-setup.c b/arch/x86/entry/vdso/vdso32-setup.c
index 76e4e74f35b5..8dbe022589a6 100644
--- a/arch/x86/entry/vdso/vdso32-setup.c
+++ b/arch/x86/entry/vdso/vdso32-setup.c
@@ -8,13 +8,11 @@
*/
#include <linux/init.h>
-#include <linux/smp.h>
-#include <linux/kernel.h>
-#include <linux/mm_types.h>
-#include <linux/elf.h>
+#include <linux/kstrtox.h>
+#include <linux/printk.h>
+#include <linux/stddef.h>
-#include <asm/processor.h>
-#include <asm/vdso.h>
+#include <asm/cache.h>
#ifdef CONFIG_COMPAT_VDSO
#define VDSO_DEFAULT 0
---
base-commit: f5837722ffecbbedf1b1dbab072a063565f0dad1
change-id: 20231228-vdso32setup-8e336d60ac3e
Best regards,
--
Tanzir Hasan <tanzirh@google.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] x86/vdso: shrink vdso/vdso32-setup.i via IWYU
2024-01-04 20:46 [PATCH v2] x86/vdso: shrink vdso/vdso32-setup.i via IWYU Tanzir Hasan
@ 2024-01-08 23:58 ` Justin Stitt
0 siblings, 0 replies; 2+ messages in thread
From: Justin Stitt @ 2024-01-08 23:58 UTC (permalink / raw)
To: Tanzir Hasan
Cc: Andy Lutomirski, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, x86, H. Peter Anvin, Nick Desaulniers, linux-kernel,
Nick Desaulniers
Hi,
On Thu, Jan 04, 2024 at 08:46:25PM +0000, Tanzir Hasan wrote:
> This diff uses an open source tool include-what-you-use (IWYU) to modify
> the include list, changing indirect includes to direct includes. IWYU is
> implemented using the IWYUScripts github repository which is a tool that
> is currently undergoing development. These changes seek to improve build
> times.
>
> This change to vdso/vdso32-setup.c resulted in a preprocessed size of
> vdso/vdso32-setup.i from 44009 lines to 18572 lines (-58%) for the x86
> defconfig.
>
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> Tested-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Tanzir Hasan <tanzirh@google.com>
> ---
> Changes in v2:
> - Fixed messed up signed-off-by tag
> - Link to v1: https://lore.kernel.org/r/20240104-vdso32setup-v1-1-1737147bc6ed@google.com
> ---
I built 10 x86_64 randconfigs with KCONFIG_SEEDs:
1: 0xF411D996
2: 0x47DADF74
3: 0x431DBDD9
4: 0xC411E812
5: 0x308B62A0
6: 0xD91AA814
7: 0x11DF23E8
8: 0x629EBA88
9: 0x4B88CEC8
10: 0xED145212
They all built just fine.
Tested-by: Justin Stitt <justinstitt@google.com>
As for the semantics of this patch, dropping a giant header like
kernel.h seems great and the rest of the includes are reasonable. For
that,
Reviewed-by: Justin Stitt <justinstitt@google.com>
> arch/x86/entry/vdso/vdso32-setup.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/entry/vdso/vdso32-setup.c b/arch/x86/entry/vdso/vdso32-setup.c
> index 76e4e74f35b5..8dbe022589a6 100644
> --- a/arch/x86/entry/vdso/vdso32-setup.c
> +++ b/arch/x86/entry/vdso/vdso32-setup.c
> @@ -8,13 +8,11 @@
> */
>
> #include <linux/init.h>
> -#include <linux/smp.h>
> -#include <linux/kernel.h>
> -#include <linux/mm_types.h>
> -#include <linux/elf.h>
> +#include <linux/kstrtox.h>
> +#include <linux/printk.h>
> +#include <linux/stddef.h>
>
> -#include <asm/processor.h>
> -#include <asm/vdso.h>
> +#include <asm/cache.h>
>
> #ifdef CONFIG_COMPAT_VDSO
> #define VDSO_DEFAULT 0
>
> ---
> base-commit: f5837722ffecbbedf1b1dbab072a063565f0dad1
> change-id: 20231228-vdso32setup-8e336d60ac3e
>
> Best regards,
> --
> Tanzir Hasan <tanzirh@google.com>
>
Thanks
Justin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-08 23:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-04 20:46 [PATCH v2] x86/vdso: shrink vdso/vdso32-setup.i via IWYU Tanzir Hasan
2024-01-08 23:58 ` Justin Stitt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®