* Miklos Szeredi <miklos@szeredi.hu> wrote:great! hm, this is really interesting, and indeed a smoking gun. The T60 has a Core2Duo and i've _never_ seen MESI starvation happen on dual-core single-socket CPUs! (The only known serious MESI starvation i know about is on multi-socket Opterons: there the trylock loop of spinlock debugging is known to starve some CPUs out of those locks that are being polled, so we had to turn off that aspect of spinlock debugging.) wait_task_inactive(), although it busy-loops, is pretty robust: it does a proper spin-lock/spin-unlock sequence and has a cpu_relax() inbetween. Furthermore, the rep_nop() that cpu_relax() is based on is unconditional, so it's not like we could somehow end up not having the REP; NOP sequence there (which should make the lock polling even more fair) could you try the quick hack below, ontop of cfs-v17? It adds two things to wait_task_inactive(): - a cond_resched() [in case you are running !PREEMPT] - use MONITOR+MWAIT to monitor memory transactions to the rq->curr cacheline. This should make the polling loop definitely fair. If this solves the problem on your box then i'll do a proper fix and introduce a cpu_relax_memory_change(*addr) type of API to around monitor/mwait. This patch boots fine on my T60 - but i never saw your problem. [ btw., utrace IIRC fixes ptrace to get rid of wait_task_interactive(). ] Ingo Index: linux/kernel/sched.c =================================================================== --- linux.orig/kernel/sched.c +++ linux/kernel/sched.c @@ -834,6 +834,16 @@ repeat: cpu_relax(); if (preempted) yield(); + else + cond_resched(); + /* + * Wait for "curr" to change: + */ + __monitor((void *)&rq->curr, 0, 0); + smp_mb(); + if (rq->curr != p) + __mwait(0, 0); + goto repeat; } task_rq_unlock(rq, &flags); -
| Linus Torvalds | Linux 2.6.27-rc8 |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Mark Lord | Re: Linux 2.6.24-rc7 |
| Andi Kleen | Re: [PATCH] Version 3 (2.6.23-rc8) Smack: Simplified Mandatory Access Control Kernel |
git: | |
| Alex Riesen | Re: First cut at git port to Cygwin |
| Sverre Rabbelier | Git vs Monotone |
| Stephen R. van den Berg | [RFC] origin link for cherry-pick and revert |
| Len Brown | fatal: unable to create '.git/index': File exists |
| Richard Stallman | Real men don't attack straw men |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Chris | Prolific USB-Serial Controller |
| Karl Sjödahl - dunceor | Re: Routerboard 532 Bounty |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Linus Torvalds | Re: [GIT]: Networking |
| Denys Fedoryshchenko | packetloss, on e1000e worse than r8169? |
| Ilpo Järvinen | Re: [bug] stuck localhost TCP connections, v2.6.26-rc3+ |
