Skip to contentSkip to conversation

powerpc/config: powernv_defconfig updates

PATCH Superseded Nicholas Piggin 2 participants 5 messages Apr 11, 2018 PowerPC

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Nicholas Piggin

author reviewer
#0 lore raw

PATCH v2 1/1 powerpc/config: powernv_defconfig updates

For consideration:

* Add IPv6 support built in + additional modules - Because it's 2018 maan.
* Add DEFERRED_STRUCT_PAGE_INIT - Let's see what breaks.
* Add PPC_MEMTRACE - Small powernv debugfs driver for getting hardware traces.
* Add MEMORY_FAILURE - Machine check exceptions can now drive memory failure.
* Turn on FANOTIFY - This is the current filesystem notification feature.
* Turn on SCOM_DEBUGFS - Handy for hardware/firmware debugging, security risk?
* Turn on async SCSI scanning - Let's see what breaks.

* Make a bunch of USB hid drivers modules.
* Make SCSI SG, SR, and FC modules - FC is huge.
* Make video drivers (except AST GPU) modules - Also huge.
* Add MLX5 driver as a module - Popular demand.
* Make PCI serial driver a module - Uncommon?

* Get rid of /dev/port - Not used.
* Remove legacy BSD ttys - Long dead.
* Remove IDE - Deprecated and replaced with ATA.
* Remove WIRELESS - Until we get POWER9 laptops.
* Remove RAW - Long deprecated in favour of direct IO.
* Remove floppy, parport, and PS2 input devices - not supported.
* Remove virtio drivers, ballooning - We're host only.
* Remove PPP - Sorry Paulus.
* Make more things modules, NFS FS, RAM disk, netconsole, MS-DOS fs.

This does not disable FTRACE options, that's just an optimisation the defconfig target made. make powernv_defconfig adds those to .config.

This results in a significantly smaller vmlinux:

text data bss dec hex filename
13121779 5284224 1383776 19789779 12df7d3 vmlinux
12126273 4771930 1341464 18239667 11650b3 vmlinux

---
Changes since v1:
- Imagine the "I have no idea what I'm doing" scientist dog meme.

 arch/powerpc/configs/powernv_defconfig | 105 +++++++++++++++----------
 1 file changed, 62 insertions(+), 43 deletions(-)
arch/powerpc/configs/powernv_defconfig +62 -43
index 9e92aa6a52ba..371169362683 100644
@@ -38,7 +38,9 @@ CONFIG_MODULE_UNLOAD=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_PARTITION_ADVANCED=y
+CONFIG_SCOM_DEBUGFS=y
 CONFIG_OPAL_PRD=y
+CONFIG_PPC_MEMTRACE=y
 # CONFIG_PPC_PSERIES is not set
 # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set
 CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
@@ -54,7 +56,10 @@ CONFIG_NUMA=y
 CONFIG_MEMORY_HOTPLUG=y
 CONFIG_MEMORY_HOTREMOVE=y
 CONFIG_KSM=y
+CONFIG_MEMORY_FAILURE=y
+CONFIG_HWPOISON_INJECT=m
 CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_DEFERRED_STRUCT_PAGE_INIT=y
 CONFIG_PPC_64K_PAGES=y
 CONFIG_PPC_SUBPAGE_PROT=y
 CONFIG_SCHED_SMT=y
@@ -72,7 +77,13 @@ CONFIG_SYN_COOKIES=y
 CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
-# CONFIG_IPV6 is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+CONFIG_IPV6_SIT=m
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_ADVANCED is not set
 CONFIG_BRIDGE=m
@@ -81,33 +92,28 @@ CONFIG_NET_SCHED=y
 CONFIG_NET_CLS_BPF=m
 CONFIG_NET_CLS_ACT=y
 CONFIG_NET_ACT_BPF=m
+CONFIG_DNS_RESOLVER=y
 CONFIG_BPF_JIT=y
+# CONFIG_WIRELESS is not set
 CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_MTD=y
 CONFIG_MTD_B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I=y
 CONFIG_PCNET32=m
 CONFIG_TIGON3=y
 CONFIG_BNX2X=m
+# CONFIG_CAVIUM_PTP is not set
 CONFIG_CHELSIO_T1=m
 CONFIG_BE2NET=m
 CONFIG_S2IO=m
@@ -172,46 +177,62 @@ CONFIG_IXGB=m
 CONFIG_IXGBE=m
 CONFIG_I40E=m
 CONFIG_MLX4_EN=m
+CONFIG_MLX5_CORE=m
+CONFIG_MLX5_FPGA=y
+CONFIG_MLX5_CORE_EN=y
+CONFIG_MLX5_CORE_IPOIB=y
 CONFIG_MYRI10GE=m
 CONFIG_QLGE=m
 CONFIG_NETXEN_NIC=m
-CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPPOE=m
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
+CONFIG_USB_NET_DRIVERS=m
+# CONFIG_WLAN is not set
 CONFIG_INPUT_EVDEV=m
-CONFIG_INPUT_MISC=y
-# CONFIG_SERIO_SERPORT is not set
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_SERIO is not set
+# CONFIG_LEGACY_PTYS is not set
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=m
 CONFIG_SERIAL_JSM=m
-CONFIG_VIRTIO_CONSOLE=m
 CONFIG_IPMI_HANDLER=y
 CONFIG_IPMI_DEVICE_INTERFACE=y
 CONFIG_IPMI_POWERNV=y
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=1024
+# CONFIG_DEVPORT is not set
 CONFIG_I2C_CHARDEV=y
+# CONFIG_PTP_1588_CLOCK is not set
 CONFIG_DRM=y
 CONFIG_DRM_AST=y
 CONFIG_FIRMWARE_EDID=y
 CONFIG_FB_OF=y
-CONFIG_FB_MATROX=y
+CONFIG_FB_MATROX=m
 CONFIG_FB_MATROX_MILLENIUM=y
 CONFIG_FB_MATROX_MYSTIQUE=y
 CONFIG_FB_MATROX_G=y
-CONFIG_FB_RADEON=y
-CONFIG_FB_IBM_GXT4500=y
+CONFIG_FB_RADEON=m
+CONFIG_FB_IBM_GXT4500=m
 CONFIG_LCD_PLATFORM=m
+CONFIG_BACKLIGHT_GENERIC=m
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_LOGO=y
-CONFIG_HID_GYRATION=y
-CONFIG_HID_PANTHERLORD=y
-CONFIG_HID_PETALYNX=y
-CONFIG_HID_SAMSUNG=y
-CONFIG_HID_SUNPLUS=y
+CONFIG_HID_A4TECH=m
+CONFIG_HID_APPLE=m
+CONFIG_HID_BELKIN=m
+CONFIG_HID_CHERRY=m
+CONFIG_HID_CHICONY=m
+CONFIG_HID_CYPRESS=m
+CONFIG_HID_EZKEY=m
+CONFIG_HID_GYRATION=m
+CONFIG_HID_ITE=m
+CONFIG_HID_KENSINGTON=m
+CONFIG_HID_LOGITECH=m
+CONFIG_HID_MICROSOFT=m
+CONFIG_HID_MONTEREY=m
+CONFIG_HID_PANTHERLORD=m
+CONFIG_HID_PETALYNX=m
+CONFIG_HID_SAMSUNG=m
+CONFIG_HID_SUNPLUS=m
+CONFIG_USB_HID=m
 CONFIG_USB_HIDDEV=y
 CONFIG_USB=y
 CONFIG_USB_MON=m
@@ -219,6 +240,7 @@ CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_HCD_PPC_OF is not set
 CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PCI=m
 CONFIG_USB_STORAGE=y
 CONFIG_NEW_LEDS=y
 CONFIG_LEDS_CLASS=m
@@ -236,8 +258,7 @@ CONFIG_INFINIBAND_SRP=m
 CONFIG_INFINIBAND_ISER=m
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_GENERIC=y
-CONFIG_VIRTIO_PCI=m
-CONFIG_VIRTIO_BALLOON=m
+# CONFIG_VIRTIO_MENU is not set
 CONFIG_EXT2_FS=y
 CONFIG_EXT2_FS_XATTR=y
 CONFIG_EXT2_FS_POSIX_ACL=y
@@ -253,12 +274,13 @@ CONFIG_XFS_POSIX_ACL=y
 CONFIG_BTRFS_FS=m
 CONFIG_BTRFS_FS_POSIX_ACL=y
 CONFIG_NILFS2_FS=m
+CONFIG_FANOTIFY=y
 CONFIG_AUTOFS4_FS=m
 CONFIG_FUSE_FS=m
 CONFIG_OVERLAY_FS=m
 CONFIG_ISO9660_FS=y
 CONFIG_UDF_FS=m
-CONFIG_MSDOS_FS=y
+CONFIG_MSDOS_FS=m
 CONFIG_VFAT_FS=m
 CONFIG_PROC_KCORE=y
 CONFIG_TMPFS=y
@@ -270,9 +292,9 @@ CONFIG_SQUASHFS_XATTR=y
 CONFIG_SQUASHFS_LZO=y
 CONFIG_SQUASHFS_XZ=y
 CONFIG_PSTORE=y
-CONFIG_NFS_FS=y
+CONFIG_NFS_FS=m
 CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
+CONFIG_NFS_V4=m
 CONFIG_NFSD=m
 CONFIG_NFSD_V3_ACL=y
 CONFIG_NFSD_V4=y
@@ -291,9 +313,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y
 CONFIG_SOFTLOCKUP_DETECTOR=y
 CONFIG_HARDLOCKUP_DETECTOR=y
 CONFIG_LATENCYTOP=y
-CONFIG_FTRACE=y
 CONFIG_FUNCTION_TRACER=y
-CONFIG_FUNCTION_GRAPH_TRACER=y
 CONFIG_SCHED_TRACER=y
 CONFIG_FTRACE_SYSCALLS=y
 CONFIG_BLK_DEV_IO_TRACE=y
@@ -303,7 +323,6 @@ CONFIG_FTR_FIXUP_SELFTEST=y
 CONFIG_MSI_BITMAP_SELFTEST=y
 CONFIG_XMON=y
 CONFIG_CRYPTO_TEST=m
-CONFIG_CRYPTO_CCM=m
 CONFIG_CRYPTO_PCBC=m
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_CRC32C_VPMSUM=m
Signature · 1 line
2.17.0
#1 lore raw
Quoted 4 lines · Nicholas Piggin

For consideration:

* Add IPv6 support built in + additional modules - Because it's 2018 maan.
* Add DEFERRED_STRUCT_PAGE_INIT - Let's see what breaks.

We did not find any benefits with this on a P8 in terms of boot time with large memory. May be worth reinvestigating

Quoted 4 lines

* Add PPC_MEMTRACE - Small powernv debugfs driver for getting hardware traces.
* Add MEMORY_FAILURE - Machine check exceptions can now drive memory failure.
* Turn on FANOTIFY - This is the current filesystem notification feature.
* Turn on SCOM_DEBUGFS - Handy for hardware/firmware debugging, security risk?

Yep, should not be in defconfig, IMHO

Quoted 8 lines

* Turn on async SCSI scanning - Let's see what breaks.

* Make a bunch of USB hid drivers modules.
* Make SCSI SG, SR, and FC modules - FC is huge.
* Make video drivers (except AST GPU) modules - Also huge.
* Add MLX5 driver as a module - Popular demand.
* Make PCI serial driver a module - Uncommon?

Quoted 7 lines

* Get rid of /dev/port - Not used.
* Remove legacy BSD ttys - Long dead.
* Remove IDE - Deprecated and replaced with ATA.
* Remove WIRELESS - Until we get POWER9 laptops.
* Remove RAW - Long deprecated in favour of direct IO.
* Remove floppy, parport, and PS2 input devices - not supported.
* Remove virtio drivers, ballooning - We're host only.

I still think its good to have them, may be as modules? Should I switch to powerpc64le_defconfig for a single config with everything -- same kernel as guest and bare metal?

Quoted 6 lines

* Remove PPP - Sorry Paulus.
* Make more things modules, NFS FS, RAM disk, netconsole, MS-DOS fs.

This does not disable FTRACE options, that's just an optimisation the defconfig target made. make powernv_defconfig adds those to .config.

Quoted 8 lines

This results in a significantly smaller vmlinux:

text data bss dec hex filename

13121779        5284224 1383776 19789779        12df7d3 vmlinux
12126273        4771930 1341464 18239667        11650b3 vmlinux

---

Balbir Singh.

author reviewer
#2 lore raw
Quoted 8 lines · On Wed, 11 Apr 2018 20:04:45 +1000 Balbir Singh <[email protected]> wrote:
Quoted 4 lines · Nicholas Piggin

For consideration:

* Add IPv6 support built in + additional modules - Because it's 2018 maan.
* Add DEFERRED_STRUCT_PAGE_INIT - Let's see what breaks.

We did not find any benefits with this on a P8 in terms of boot time with large memory. May be worth reinvestigating

Worth putting in the defconfig just for testing until then?

Quoted 3 lines
Quoted 3 lines

* Add PPC_MEMTRACE - Small powernv debugfs driver for getting hardware traces.
* Add MEMORY_FAILURE - Machine check exceptions can now drive memory failure.

         ^^^^

Okay for this one?

Quoted 4 lines
Quoted 2 lines

* Turn on FANOTIFY - This is the current filesystem notification feature.
* Turn on SCOM_DEBUGFS - Handy for hardware/firmware debugging, security risk?

Yep, should not be in defconfig, IMHO

Why not? Honest question, I hear some things about secure boot when I ask about this option but I'm not quite sure why, or what we are securing here.

If the firmware does not want us to mess with scoms, it should restrict the call, no?

Quoted 16 lines
Quoted 8 lines

* Turn on async SCSI scanning - Let's see what breaks.

* Make a bunch of USB hid drivers modules.
* Make SCSI SG, SR, and FC modules - FC is huge.
* Make video drivers (except AST GPU) modules - Also huge.
* Add MLX5 driver as a module - Popular demand.
* Make PCI serial driver a module - Uncommon?

Quoted 7 lines

* Get rid of /dev/port - Not used.
* Remove legacy BSD ttys - Long dead.
* Remove IDE - Deprecated and replaced with ATA.
* Remove WIRELESS - Until we get POWER9 laptops.
* Remove RAW - Long deprecated in favour of direct IO.
* Remove floppy, parport, and PS2 input devices - not supported.
* Remove virtio drivers, ballooning - We're host only.

Quoted 3 lines

I still think its good to have them, may be as modules? Should I switch to powerpc64le_defconfig for a single config with everything -- same kernel as guest and bare metal?

Well powernv_defconfig never supports PAPR guest. I think the ppc64 defconfig does both (and pseries has no bare metal).

Is there a reason to use them in host? And if yes, which ones? We could easily make them as modules.

Thanks,
Nick

#3 lore raw
Quoted 6 lines · Nicholas Piggin
Quoted 3 lines · On Wed, 11 Apr 2018 20:04:45 +1000 Balbir Singh <[email protected]> wrote:
Quoted 2 lines · Nicholas Piggin

For consideration:

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

* Add IPv6 support built in + additional modules - Because it's 2018 maan.
* Add DEFERRED_STRUCT_PAGE_INIT - Let's see what breaks.

We did not find any benefits with this on a P8 in terms of boot time with large memory. May be worth reinvestigating

Worth putting in the defconfig just for testing until then?

Absolutely!

Quoted 7 lines
Quoted 4 lines
Quoted 4 lines

* Add PPC_MEMTRACE - Small powernv debugfs driver for getting hardware traces.
* Add MEMORY_FAILURE - Machine check exceptions can now drive memory failure.

         ^^^^

Okay for this one?

Yep definitely!

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines

* Turn on FANOTIFY - This is the current filesystem notification feature.
* Turn on SCOM_DEBUGFS - Handy for hardware/firmware debugging, security risk?

Quoted 9 lines
Quoted 1 line

Yep, should not be in defconfig, IMHO

Why not? Honest question, I hear some things about secure boot when I ask about this option but I'm not quite sure why, or what we are securing here.

If the firmware does not want us to mess with scoms, it should restrict the call, no?

Yes, firmware definitely should. Do we need inband debugging?

Quoted 21 lines
Quoted 17 lines
Quoted 9 lines

* Turn on async SCSI scanning - Let's see what breaks.

* Make a bunch of USB hid drivers modules.
* Make SCSI SG, SR, and FC modules - FC is huge.
* Make video drivers (except AST GPU) modules - Also huge.
* Add MLX5 driver as a module - Popular demand.
* Make PCI serial driver a module - Uncommon?

Quoted 7 lines

* Get rid of /dev/port - Not used.
* Remove legacy BSD ttys - Long dead.
* Remove IDE - Deprecated and replaced with ATA.
* Remove WIRELESS - Until we get POWER9 laptops.
* Remove RAW - Long deprecated in favour of direct IO.
* Remove floppy, parport, and PS2 input devices - not supported.
* Remove virtio drivers, ballooning - We're host only.

Quoted 3 lines

I still think its good to have them, may be as modules? Should I switch to powerpc64le_defconfig for a single config with everything -- same kernel as guest and bare metal?

Quoted 5 lines

Well powernv_defconfig never supports PAPR guest. I think the ppc64 defconfig does both (and pseries has no bare metal).

Is there a reason to use them in host? And if yes, which ones? We could easily make them as modules.

I guess I should use powerpc64le_defconfig then

Balbir

author reviewer
#4 lore raw
Quoted 37 lines · On Wed, 11 Apr 2018 22:24:06 +1000 Balbir Singh <[email protected]> wrote:
Quoted 6 lines · Nicholas Piggin
Quoted 3 lines · On Wed, 11 Apr 2018 20:04:45 +1000 Balbir Singh <[email protected]> wrote:
Quoted 2 lines · Nicholas Piggin

For consideration:

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

* Add IPv6 support built in + additional modules - Because it's 2018 maan.
* Add DEFERRED_STRUCT_PAGE_INIT - Let's see what breaks.

We did not find any benefits with this on a P8 in terms of boot time with large memory. May be worth reinvestigating

Worth putting in the defconfig just for testing until then?

Absolutely!

Quoted 7 lines
Quoted 4 lines
Quoted 4 lines

* Add PPC_MEMTRACE - Small powernv debugfs driver for getting hardware traces.
* Add MEMORY_FAILURE - Machine check exceptions can now drive memory failure.

         ^^^^

Okay for this one?

Yep definitely!

Quoted 10 lines
Quoted 5 lines
Quoted 3 lines

* Turn on FANOTIFY - This is the current filesystem notification feature.
* Turn on SCOM_DEBUGFS - Handy for hardware/firmware debugging, security risk?

Yep, should not be in defconfig, IMHO

Why not? Honest question, I hear some things about secure boot when I ask about this option but I'm not quite sure why, or what we are securing here.

Quoted 5 lines
Quoted 3 lines

If the firmware does not want us to mess with scoms, it should restrict the call, no?

Yes, firmware definitely should. Do we need inband debugging?

I think it's a matter of convenience when testing and debugging things. OTOH I haven't used it a great deal myself. Others do want it if we can just ensure firmware will do the right thing if we're in some secure configuration.

Thanks,
Nick