summaryrefslogtreecommitdiff
path: root/faq/smp.mdwn
blob: ee0bf53ff50e5363c513011bdea7d4791abdcb52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
[[!meta copyright="Copyright © 2009, 2011, 2013 Free Software Foundation,
Inc."]]

[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled [[GNU Free Documentation
License|/fdl]]."]]"""]]

[[!tag faq/support]]

[[!meta title="Does GNU/Hurd support SMP/Multicore?"]]

The Hurd servers themselves are multithreaded, so they should be able to
benefit of the parallelism brought by SMP/Multicore boxes.
This needs testing as SMP support has recently been added to Mach.

[[microkernel/Mach]] used to be running on SMP boxes like the [[!wikipedia
Intel_iPSC/860]], so principally has the required infrastructure.  It has
recently been enhanced to support nowadays' SMP standards like ACPI.

However, [[GNU Mach|microkernel/mach/gnumach]]'s Linux device driver glue
code isn't SMP-safe so build with --disable-linux-groups to test SMP and use
rumpdisk to provide disk access.

To build an SMP supported gnumach with kdb:
../configure --enable-ncpus=8 --enable-kdb --enable-apic --disable-linux-groups

This will by default allow you to boot with one core isolated to the default
processor set, and all the other detected cpus will be in the slave processor set.
The slave processors need to be enabled per-task using RPCs to manipulate processor sets.

See https://lists.gnu.org/archive/html/bug-hurd/2024-02/msg00088.html for a test program
that can enable a task to use the slave processors by calling ./smp /bin/bash for example.

Unfortunately, there are race conditions causing hangs or crashes in Mach when attempting
to boot a full SMP system, (if you revert the slave processor pinning commit).
This is what needs to be debugged one-by-one by running each translator using ./smp until
we can squash these race condition bugs.

There are follow-up issues about
[[open_issues/multiprocessing]] and [[open_issues/multithreading]].

[[Project idea|open_issues/smp]].