[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Use SMP kernel for Alpha (udeb) builds



On 12/8/18 15:05, Bob Tracy wrote:
On Sat, Dec 08, 2018 at 11:15:21AM +0100, Frank Scheiner wrote:
Is this Gentoo generic installer kernel SMP capable? I believe these Gentoo
kernels have the config included in the kernel image, so available as
`/proc/config.gz` during runtime, I think.

From the "image.squashfs" file on the Gentoo "install-alpha-minimal"
image, attached is "etc/kernels/kernel-config-alpha-4.14.65-gentoo"
which appears to correspond to the "nolsa" kernel variant.  To your
question about whether SMP is configured, most definitely "yes" with
CONFIG_NR_CPUS=32.

Thanks for checking. This seems to be definitely a SMP capable kernel, as `CONFIG_SMP=y` is also set.

About the `CONFIG_ALPHA_LEGACY_START_ADDRESS`, [1] mentions this is actually needed for older boot loaders only which hardcoded the kernel start address. And the Gentoo config shows it as inactive: `# CONFIG_ALPHA_LEGACY_START_ADDRESS is not set`

[1]: https://cateee.net/lkddb/web-lkddb/ALPHA_LEGACY_START_ADDRESS.html

But interesting, [1] also says, that this option depends on CONFIG_ALPHA_GENERIC, which is actually set (`CONFIG_ALPHA_GENERIC=y`) in the Gentoo config.

So can we assume `CONFIG_ALPHA_GENERIC=y` also activates `CONFIG_ALPHA_LEGACY_START_ADDRESS`?

If yes this could correspond to the behaviour of the generic Debian kernel on my DS25. I just tested a `netabootwrap`ped `4.18.0-2-alpha-generic` and after aboot emits the "starting kernel [...]" message nothing happens:

```
>>>boot
(boot ega0.0.0.5.2 -flags root=/dev/nfs ip=:::::enP2p2s5:dhcp console=ttyS0,9600n8)

Trying BOOTP boot.

Broadcasting BOOTP Request...
Received BOOTP Packet File Name is: /AC100259
local inet address: 172.16.2.89
remote inet address: 172.16.0.2
TFTP Read File Name: /AC100259
netmask = 255.255.0.0
Server is on same subnet as client.
block number= 0 port_number= 35092
................................................................
................................................................
.................
bootstrap code read in
base = 39c000, image_start = 0, image_bytes = 90b86c(9484396)
initializing HWRPB at 2000
initializing page table at ffff0000
initializing machine state
setting affinity to the primary CPU
jumping to bootstrap code
aboot: Linux/Alpha SRM bootloader version 1.0_pre20040408
aboot: switching to OSF/1 PALcode version 1.92
aboot: loading initrd (4874860 bytes/9522 blocks) at 0xfffffc00ffb46000
aboot: starting kernel network with arguments root=/dev/nfs ip=:::::enP2p2s5:dhcp console=ttyS0,9600n8
```

And as [1] says, the SRM firmware of Titan machines is bigger than on older Alpha machines, so the kernel start address for the generic kernel might have ended somewhere inside the SRM. I'll check that with my ES45, too.

The same kernel leads to:
```
CPU 0 booting

(boot ewa0.0.0.3.0 -flags root=/dev/nfs ip=dhcp console=tty1 console=ttyS0,9600n8)

Trying BOOTP boot.

Broadcasting BOOTP Request...
.Received BOOTP Packet File Name is: /AC10020F
local inet address: 172.16.2.15
remote inet address: 172.16.0.2
TFTP Read File Name: /AC10020F
netmask = 255.255.0.0
Server is on same subnet as client.
.................................................................................................................................................
bootstrap code read in
base = 1e6000, image_start = 0, image_bytes = 90b86c
initializing HWRPB at 2000
initializing page table at 1d8000
initializing machine state
setting affinity to the primary CPU
jumping to bootstrap code
aboot: Linux/Alpha SRM bootloader version 1.0_pre20040408
aboot: switching to OSF/1 PALcode version 1.22
aboot: loading initrd (4874860 bytes/9522 blocks) at 0xfffffc0023b56000
aboot: starting kernel network with arguments root=/dev/nfs ip=dhcp console=tty1 console=ttyS0,9600n8

halted CPU 0

halt code = 6
double error halt
PC = fffffc000107f868
boot failure
```
...on my PWS 500au. I hence assume, the SRM is small enough on this machine, so the kernel start address doesn't end up in the SRM.

The SMP kernel boots without an issue on both machines.

But strange, the kernel configuration files for both `4.18.0-2-alpha-generic` and `4.18.0-2-alpha-smp` contain:

```
# grep -n CONFIG_ALPHA_GENERIC config-4.18.0-2-alpha-generic config-4.18.0-2-alpha-smp
config-4.18.0-2-alpha-generic:288:CONFIG_ALPHA_GENERIC=y
config-4.18.0-2-alpha-smp:296:CONFIG_ALPHA_GENERIC=y
```

So shouldn't this setting then not also imply `CONFIG_ALPHA_LEGACY_START_ADDRESS` active for both kernels (so also for the SMP kernel)?

But maybe some other active/inactive option in the SMP kernel remedies the dependent `CONFIG_ALPHA_LEGACY_START_ADDRESS`. A unified diff between both configurations is attached.

Oh btw, the generic config also has "CONFIG_BROKEN_ON_SMP=y" but I am not sure what this means. [2] mentions this is sort of attached to drivers unsafe on SMPs. But then I'd actually expect that setting to be active for the SMP config.

[2]: https://lists.kernelnewbies.org/pipermail/kernelnewbies/2014-January/009660.html

Cheers,
Frank

P.S.
Unfortunately my patches aren't merged yet and I already had to rebase one of them two times today (making a total of four rebases for this one patch already).
root@ds25:/boot# diff -u config-4.18.0-2-alpha-generic config-4.18.0-2-alpha-smp
--- config-4.18.0-2-alpha-generic	2018-10-07 22:57:06.000000000 +0200
+++ config-4.18.0-2-alpha-smp	2018-10-07 22:57:06.000000000 +0200
@@ -22,12 +22,11 @@
 #
 # General setup
 #
-CONFIG_BROKEN_ON_SMP=y
 CONFIG_INIT_ENV_ARG_LIMIT=32
 # CONFIG_COMPILE_TEST is not set
 CONFIG_LOCALVERSION=""
 # CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_BUILD_SALT="4.18.0-2-alpha-generic"
+CONFIG_BUILD_SALT="4.18.0-2-alpha-smp"
 CONFIG_DEFAULT_HOSTNAME="(none)"
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
@@ -47,6 +46,7 @@
 #
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_AUTO_IRQ_AFFINITY=y
 CONFIG_IRQ_DOMAIN=y3.16.0-4-alpha-smp
 CONFIG_GENERIC_MSI_IRQ=y
 # CONFIG_GENERIC_IRQ_DEBUGFS is not set
@@ -72,17 +72,21 @@
 CONFIG_TASK_DELAY_ACCT=y
 CONFIG_TASK_XACCT=y
 CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_CPU_ISOLATION=y
 
 #
 # RCU Subsystem
 #
-CONFIG_TINY_RCU=y
+CONFIG_TREE_RCU=y
 # CONFIG_RCU_EXPERT is not set
 CONFIG_SRCU=y
-CONFIG_TINY_SRCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_RCU_STALL_COMMON=y
+CONFIG_RCU_NEED_SEGCBLIST=y
 CONFIG_BUILD_BIN2C=y
 # CONFIG_IKCONFIG is not set
 CONFIG_LOG_BUF_SHIFT=17
+CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
 CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=13
 CONFIG_CGROUPS=y
 CONFIG_PAGE_COUNTER=y
@@ -99,6 +103,8 @@
 CONFIG_CGROUP_PIDS=y
 # CONFIG_CGROUP_RDMA is not set
 CONFIG_CGROUP_FREEZER=y
+CONFIG_CPUSETS=y
+CONFIG_PROC_PID_CPUSET=y
 CONFIG_CGROUP_DEVICE=y
 CONFIG_CGROUP_CPUACCT=y
 CONFIG_CGROUP_PERF=y
@@ -175,6 +181,7 @@
 CONFIG_SLAB_MERGE_DEFAULT=y
 CONFIG_SLAB_FREELIST_RANDOM=y
 CONFIG_SLAB_FREELIST_HARDENED=y
+CONFIG_SLUB_CPU_PARTIAL=y
 CONFIG_SYSTEM_DATA_VERIFICATION=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=m
@@ -273,6 +280,7 @@
 CONFIG_MQ_IOSCHED_KYBER=m
 CONFIG_IOSCHED_BFQ=m
 CONFIG_BFQ_GROUP_IOSCHED=y
+CONFIG_PADATA=y
 CONFIG_ASN1=y
 CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
 CONFIG_INLINE_READ_UNLOCK=y
@@ -326,7 +334,8 @@
 CONFIG_VGA_HOSE=y
 CONFIG_EISA=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-# CONFIG_SMP is not set
+CONFIG_SMP=y
+CONFIG_NR_CPUS=32
 # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
@@ -340,7 +349,6 @@
 CONFIG_VIRT_TO_BUS=y
 CONFIG_KSM=y
 CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
-CONFIG_NEED_PER_CPU_KM=y
 # CONFIG_CLEANCACHE is not set
 CONFIG_FRONTSWAP=y
 CONFIG_ZSWAP=y
@@ -354,7 +362,7 @@
 CONFIG_FRAME_VECTOR=y
 # CONFIG_PERCPU_STATS is not set
 # CONFIG_GUP_BENCHMARK is not set
-# CONFIG_ALPHA_WTINT is not set
+CONFIG_ALPHA_WTINT=y
 # CONFIG_VERBOSE_MCHECK is not set
 # CONFIG_HZ_32 is not set
 # CONFIG_HZ_64 is not set
@@ -1117,11 +1125,15 @@
 # CONFIG_NET_SWITCHDEV is not set
 CONFIG_NET_L3_MASTER_DEV=y
 # CONFIG_NET_NCSI is not set
+CONFIG_RPS=y
+CONFIG_RFS_ACCEL=y
+CONFIG_XPS=y
 CONFIG_CGROUP_NET_PRIO=y
 CONFIG_CGROUP_NET_CLASSID=y
 CONFIG_NET_RX_BUSY_POLL=y
 CONFIG_BQL=y
 # CONFIG_BPF_STREAM_PARSER is not set
+CONFIG_NET_FLOW_LIMIT=y
 
 #
 # Network testing
@@ -1143,7 +1155,6 @@
 CONFIG_MKISS=m
 CONFIG_6PACK=m
 CONFIG_BPQETHER=m
-CONFIG_DMASCC=m
 CONFIG_SCC=m
 # CONFIG_SCC_DELAY is not set
 # CONFIG_SCC_TRXECHO is not set
@@ -1658,9 +1669,9 @@
 #
 # SCSI device support
 #
-CONFIG_SCSI_MOD=m
+CONFIG_SCSI_MOD=y
 CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
+CONFIG_SCSI=y
 CONFIG_SCSI_DMA=y
 CONFIG_SCSI_NETLINK=y
 CONFIG_SCSI_MQ_DEFAULT=y
@@ -3122,7 +3133,6 @@
 CONFIG_I2C_HELPER_AUTO=y
 CONFIG_I2C_SMBUS=m
 CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
 CONFIG_I2C_ALGOPCA=m
 
 #
@@ -3171,7 +3181,6 @@
 #
 # Other I2C/SMBus bus drivers
 #
-CONFIG_I2C_ELEKTOR=m
 CONFIG_I2C_PCA_ISA=m
 CONFIG_I2C_STUB=m
 # CONFIG_I2C_SLAVE is not set
@@ -6165,6 +6174,7 @@
 # CONFIG_DEBUG_STACK_USAGE is not set
 # CONFIG_DEBUG_VM is not set
 CONFIG_DEBUG_MEMORY_INIT=y
+# CONFIG_DEBUG_PER_CPU_MAPS is not set
 CONFIG_CC_HAS_SANCOV_TRACE_PC=y
 # CONFIG_DEBUG_SHIRQ is not set
 
@@ -6212,6 +6222,7 @@
 #
 # CONFIG_RCU_PERF_TEST is not set
 # CONFIG_RCU_TORTURE_TEST is not set
+CONFIG_RCU_CPU_STALL_TIMEOUT=21
 # CONFIG_RCU_TRACE is not set
 # CONFIG_RCU_EQS_DEBUG is not set
 # CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set
@@ -6349,6 +6360,7 @@
 CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_NULL=m
 CONFIG_CRYPTO_NULL2=y
+CONFIG_CRYPTO_PCRYPT=m
 CONFIG_CRYPTO_WORKQUEUE=y
 # CONFIG_CRYPTO_CRYPTD is not set
 # CONFIG_CRYPTO_MCRYPTD is not set
@@ -6555,6 +6567,7 @@
 CONFIG_ARCH_DMA_ADDR_T_64BIT=y
 CONFIG_SGL_ALLOC=y
 CONFIG_CHECK_SIGNATURE=y
+CONFIG_CPU_RMAP=y
 CONFIG_DQL=y
 CONFIG_GLOB=y
 # CONFIG_GLOB_SELFTEST is not set

Reply to: