From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gorka Guardiola Muzquiz Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Message-Id: <0A651ACE-ADD2-4C9F-9491-0802B20923B9@gmail.com> Date: Thu, 19 Dec 2013 10:01:00 +0100 References: <9d4d16071350d120a79044a6c0c1604f@felloff.net> In-Reply-To: <9d4d16071350d120a79044a6c0c1604f@felloff.net> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] 9front pegs CPU on VMware Topicbox-Message-UUID: a0a8c79a-ead8-11e9-9d60-3106f5b1d025 > On 17 Dec 2013, at 12:00, cinap_lenrek@felloff.net wrote: >=20 > thats a surprising result. by dog pile lock you mean the runq spinlock no?= >=20 I guess it depends on the HW, but I don=C2=B4t find that so surprising. You a= re looping sending messages to the coherency fabric, which gets congested as a result. I have seen that happen. You should back off, but sleeping for a fixed time is not a good solution ei= ther. Mwait is a perfect solution in this case, there is some latency, but you are= in a bad place anyway and with mwait, performance does not degrade too much. Even for user space where the spinlocks backoff sleeping, if you get to that point, your latency goes off the roof. Latency is worse than using mwait because you are sleeping unconditionally.=20= Mwait does not prevent you from getting the interrupt to schedule. In most cases mwait is better for performance to back off in spinlocks in ge= neral. It is also good for power which may prevent cooling slowdowns of the clock t= oo. G.