summaryrefslogtreecommitdiff
path: root/open_issues/smp.mdwn
diff options
context:
space:
mode:
Diffstat (limited to 'open_issues/smp.mdwn')
-rw-r--r--open_issues/smp.mdwn101
1 files changed, 83 insertions, 18 deletions
diff --git a/open_issues/smp.mdwn b/open_issues/smp.mdwn
index 89474d25..ce2c2ce2 100644
--- a/open_issues/smp.mdwn
+++ b/open_issues/smp.mdwn
@@ -12,36 +12,101 @@ License|/fdl]]."]]"""]]
[[!tag open_issue_glibc open_issue_gnumach open_issue_hurd]]
-See also the [[FAQ entry|faq/smp]].
+<!-- This paragraph is parapharisg the wikipedia page
+https://en.wikipedia.org/wiki/Symmetric_multiprocessing#Advantages/Disadvantages
+-->
+
+SMP stands for Symmetric multiprocessing, which is a computer that has numerous
+identical processors connected to a single shared main memory. All processors
+are controlled by one single operating system, and each processor can access all
+devices. Operating systems with SMP can provide more performance, but it is not
+trivial to do so. It is a little like having a packed board meeting. More
+people in the room potentially means more can get done, but only one person can
+speak at a time. Scheduling everyone to speak can be quite an involved task.
+
+
+
+ NOTE: Many of the veteran Hurd developers consider this task too large for a Google summer of code project.
+
+<!--
+This svg is cc attribute
+https://en.wikipedia.org/wiki/File:SMP_-_Symmetric_Multiprocessor_System.svg -->
+
+[[!img images/smp.svg size="700x"]]
+<!-- most of this page is taken from https://gitlab.com/snippets/1756024#solution -->
-# IRC, freenode, #hurd, 2012-09-30
+# Current Status
- <braunr> i expect smp to be our next gsoc project
+As of September 2024, the SMP support is implemented for i386 with
+working internet, because it boots with only one cpu in the default
+processor set. The slave processors are temporarily disabled until
+they can be safely used per task. We are unable to turn on the full
+set at boot time due to race bugs. Debian Hurd provides SMP enabled
+GNU Mach kernels.
+# How to test the current SMP support
-## IRC, freenode, #hurd, 2013-01-02
+The easiest way to test the SMP support, is via the [[qemu
+guide|https://www.gnu.org/software/hurd/hurd/running/qemu.html]].
+Once you have the Hurd running you can build an SMP enabled GNU Mach.
- <braunr> i'd like to mentor someone for adding smp to gnumach
+ $ git clone git://git.savannah.gnu.org/hurd/gnumach.git
+ $ cd gnumach
+ $ autoreconf -i
+ $ mkdir build
+ $ cd build
+ $ ../configure --enable-ncpus=4 --enable-kdb
+ $ make gnumach.gz
+ $ su
+ # mv /boot/gnumach-1.8-486.gz /boot/gnumach-1.8-486.gz.bak
+ # cp gnumach.gz /boot/gnumach-1.8-486.gz
+You may optionally update `/boot/grub/grub.cfg` change `hd0` to `wd0`
+and add `console=com0`
-## IRC, freenode, #hurd, 2013-03-14
+ /boot/gnumach-1.8-486.gz root=part:2:device:wd0 console=com0
- <braunr> but i'm afraid we'll have to fight obscur smp-safety issues
- <braunr> for one, drivers are much probably not smp safe and would require
- a big kernel lock
- <braunr> userspace (such as signal delivery in libc) might be affected too
- <braunr> smp isn't that easy
+update `/etc/fstab` and update `wd0` instead of `hd0`.
+ /dev/wd0s2 / ext2 defaults 0 1
+ /dev/wd0s1 none swap sw 0 0
-## Richard, 2013-03-20
+You can shutdown via `/sbin/poweroff`.
-This task actually looks too big for a GSoC project.
+start qemu with `-smp 4` and add `-nographic` if you want to use `com0`.
+ $ qemu-system-i386 -M q35,accel=kvm -smp 4 -m 2G -net \
+ user,hostfwd=tcp::2223-:22 -net nic -hda debian-hurd-VERSION.img \
+ -nographic
-## IRC, freenode, #hurd, 2013-09-30
+To test smp:
+
+ $ sudo /path/to/smp /bin/bash
+ $ stress -c 7
+
+smp.c source can be found
+[[here|https://lists.gnu.org/archive/html/bug-hurd/2024-02/msg00088.html]].
+
+## References
+- [Comments about the project bug-hurd
+maillist](https://lists.gnu.org/archive/html/bug-hurd/2018-08/msg00048.html)
+- [Initial thread in bug-hurd
+maillist](https://lists.gnu.org/archive/html/bug-hurd/2018-06/msg00048.html)
+- [SMP in GNU/Hurd FAQ](https://www.gnu.org/software/hurd/faq/smp.html)
+- [GNU Mach git repository](https://git.savannah.gnu.org/cgit/hurd/gnumach.git)
+- [GNU Mach reference manual](https://www.gnu.org/software/hurd/gnumach-doc/)
+- [**MultiProcessor Specification**](https://pdos.csail.mit.edu/6.828/2011/readings/ia32/MPspec.pdf)
+- [**ACPI Specification**](http://www.uefi.org/sites/default/files/resources/ACPI%206_2_A_Sept29.pdf)
+- [Mach boot trace](https://www.gnu.org/software/hurd/microkernel/mach/gnumach/boot_trace.html)
+- [SPL man page](https://man.openbsd.org/spl)
+- [Book: The Mach System](http://codex.cs.yale.edu/avi/os-book/OS9/appendices-dir/b.pdf)
+- [Book: Mach3 Mysteries](http://www.nv50.0fees.net/Doc/Mach3Mysteries.pdf)
+- [X15 operating system](https://www.sceen.net/x15)
+- [Symmetric Multiprocessing - OSDev Wiki](https://wiki.osdev.org/Symmetric_Multiprocessing)
+- [**Intel® 64 and IA-32 Architectures Software Developer’s Manuals**](https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm-vol-1-2abcd-3abcd.pdf)
+- [**Intel Developer Guide, Volume 3: System Programming Guide**](https://software.intel.com/sites/default/files/managed/a4/60/325384-sdm-vol-3abcd.pdf)
+
+
+See also the [[FAQ entry|faq/smp]].
- <braunr> also, while the problem with hurd is about I/O, it's actually a
- lot more about caching, and even with more data cached in, the true
- problem is contention, in which case having several processors would
- actually slow things down even more