Daniel Hazelton wrote:Ok, perhaps we can settle this properly. Like historicans. We study the original sources. The primary resource is the original commit adding the 4k stack code. You cannot find this in latest git because it predates 2.6.12, but it is available in one of the historic trees imported from BitKeeper like git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git Here's the log: commit 95f238eac82907c4ccbc301cd5788e67db0715ce Author: Andrew Morton <akpm@osdl.org> Date: Sun Apr 11 23:18:43 2004 -0700 [PATCH] ia32: 4Kb stacks (and irqstacks) patch From: Arjan van de Ven <arjanv@redhat.com> Below is a patch to enable 4Kb stacks for x86. The goal of this is to 1) Reduce footprint per thread so that systems can run many more threads (for the java people) 2) Reduce the pressure on the VM for order > 0 allocations. We see real life workloads (granted with 2.4 but the fundamental fragmentation issue isn't solved in 2.6 and isn't solvable in theory) where this can be a problem. In addition order > 0 allocations can make the VM "stutter" and give more latency due to having to do much much more work trying to defragment ... << This gives us two reasons as you can see, one of them many threads and another mostly only relevant to 2.4 Now I was also assuming that nobody took (1) really serious and attacked (2) in earlier thread; in particular in http://article.gmane.org/gmane.linux.kernel/665584 Actually the real reason the 4K stacks were introduced IIRC was that the VM is not very good at allocation of order > 0 pages and that only using order 0 and not order 1 in normal operation prevented some stalls. This rationale also goes back to 2.4 (especially some of the early 2.4 VMs were not very good) and the 2.6 VM is generally better and on x86-64 I don't see much evidence that these stalls are a big problem (but then x86-64 also has more lowmem). << This was corrected by Ingo who was one of the primary authors of the patch: http://thread.gmane.org/gmane.linux.kernel/665420: no, the primary motivation Arjan and me started working on 4K stacks and implemented it was what Denys mentioned: i had a testcase that ran 50,000 threads before it ran out of memory - i wanted it to run 100,000 threads. The improved order-0 behavior was just icing on the cake. Ingo << and then from Arjan: http://thread.gmane.org/gmane.linux.kernel/665420 well that and the fact that RH had customers who had major issues at fewer threads with 8Kb versus fragmentation. << So both the primary authors of the patch state that 50k threads was the main reason. I didn't believe it at first either, but after these forceful corrections I do now. You're totally wrong when you call it a straw man. -Andi --
| David Miller | [GIT]: Networking |
| Linus Torvalds | Linux 2.6.26-rc4 |
| Fred . | Please add ZFS support (from GPL sources) |
| Greg KH | Linux 2.6.25.10 |
git: | |
| Alexander Gladysh | [Q] Encrypted GIT? |
| Kevin Leung | Edit log message after commit |
| Pietro Mascagni | GIT vs Other: Need argument |
| Michael Hendricks | removing content from git history |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Edwin Eyan Moragas | poll(2) vs kqueue(2) performance |
| Didier Wiroth | win32-codecs, avi and amd64 question |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| Daniel Brewer | Re: fsync performance hit on 1.6.1 |
| Hubert Feyrer | Compressed vnd handling tested successfully |
| Elad Efrat | Integrating securelevel and kauth(9) |
| YAMAMOTO Takashi | yamt-km branch |
