9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Gorka Guardiola Muzquiz <paurea@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] 9front pegs CPU on VMware
Date: Thu, 19 Dec 2013 10:01:00 +0100	[thread overview]
Message-ID: <0A651ACE-ADD2-4C9F-9491-0802B20923B9@gmail.com> (raw)
In-Reply-To: <9d4d16071350d120a79044a6c0c1604f@felloff.net>



> On 17 Dec 2013, at 12:00, cinap_lenrek@felloff.net wrote:
> 
> thats a surprising result. by dog pile lock you mean the runq spinlock no?
> 

I guess it depends on the HW, but I don´t find that so surprising. You are 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 either.
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. 
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 general.
It is also good for power which may prevent cooling slowdowns of the clock too.

G.




  parent reply	other threads:[~2013-12-19  9:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16  1:49 Blake McBride
2013-12-16  1:52 ` erik quanstrom
2013-12-16  2:35   ` Blake McBride
2013-12-16  2:58     ` andrey mirtchovski
2013-12-16  3:05       ` Blake McBride
2013-12-16 10:17     ` cinap_lenrek
2013-12-16 14:57       ` Blake McBride
2013-12-16 15:34         ` erik quanstrom
2013-12-16 16:25           ` Matthew Veety
2013-12-16 16:59             ` erik quanstrom
2013-12-17 11:00           ` cinap_lenrek
2013-12-17 13:38             ` erik quanstrom
2013-12-17 14:14               ` erik quanstrom
2013-12-19  9:01             ` Gorka Guardiola Muzquiz [this message]
2013-12-19 14:16               ` Gorka Guardiola
2013-12-19 15:19               ` erik quanstrom
2013-12-19 15:57                 ` Gorka Guardiola
2013-12-19 16:15                   ` erik quanstrom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0A651ACE-ADD2-4C9F-9491-0802B20923B9@gmail.com \
    --to=paurea@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).