public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: "Václav Haisman" <vhaisman@gmail.com>
To: cygwin-patches@cygwin.com
Subject: Re: Fwd: [PATCH] spinlock spin with pause instruction
Date: Sat, 12 Mar 2016 08:14:00 -0000	[thread overview]
Message-ID: <56E3CFB1.5080906@gmail.com> (raw)
In-Reply-To: <56E3B674.7020702@maxrnd.com>

[-- Attachment #1: Type: text/plain, Size: 777 bytes --]

On 12.3.2016 07:25, Mark Geisert wrote:
> Václav Haisman wrote:
>> Hi.
>>
>> I have noticed that Cygwin's spinlock goes into heavy sleeping code
>> for each spin. It seems it would be a good idea to actually try to
>> spin a bit first. There is this 'pause' instruction which let's the
>> CPU make such busy loops be less busy. Here is a patch to do this.
> 
> I wanted to try out this patch but compilation is failing on the
> "unlikely" call.  Is that a macro that needs defining or something else?
> Thanks,
> 
> ..mark
> 

`unlikely()` is a macro defined in `miscfuncs.h`, right below header
guard:
<https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/miscfuncs.h;h=3a9f0258c6cbb62b8d51e96c0c5542b70659e17b;hb=HEAD>

-- 
VH


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

      reply	other threads:[~2016-03-12  8:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKw7uVgrjqZVznRMoCbsjyz4YXast5YtAAmpWQorOw7YXqbOhw@mail.gmail.com>
2016-03-11 10:28 ` Václav Haisman
2016-03-11 13:04   ` Corinna Vinschen
2016-03-12  6:25   ` Fwd: " Mark Geisert
2016-03-12  8:14     ` Václav Haisman [this message]

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=56E3CFB1.5080906@gmail.com \
    --to=vhaisman@gmail.com \
    --cc=cygwin-patches@cygwin.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).