From: Dario Faggioli <dfaggioli@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Juergen Gross <jgross@suse.com>
Subject: Re: [PATCH] xen/credit2: Drop unnecessary bit test
Date: Fri, 12 Jan 2018 09:45:24 +0100 [thread overview]
Message-ID: <1515746724.30117.75.camel@suse.com> (raw)
In-Reply-To: <acc1cc95-02c4-ab5e-a9ce-5a6056caa9cf@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 964 bytes --]
On Thu, 2018-01-11 at 17:36 +0000, Andrew Cooper wrote:
> It is generally worth doing a read to conditionally avoid a locked
> RMW,
> in the case that you expect the locked RMW to be unnecessary (i.e.
> the
> modification is already present).
>
> The same is not true for plain memory reads and writes. The overhead
> of
> the conditional jump far outweighs the saving of possibly not
> dirtying
> the cache line.
>
Sure.
> The reason I noticed this is because (with my bitops change), the
> compiler optimised the if out entirely.
>
Ah, interesting. :-)
It's not necessary, as George Acked it already, but feel free to add a:
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Software Engineer @ SUSE https://www.suse.com/
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
prev parent reply other threads:[~2018-01-12 8:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 16:48 [PATCH] xen/credit2: Drop unnecessary bit test Andrew Cooper
2018-01-11 16:50 ` George Dunlap
2018-01-11 17:26 ` Dario Faggioli
2018-01-11 17:36 ` Andrew Cooper
2018-01-11 17:37 ` George Dunlap
2018-01-12 8:45 ` Dario Faggioli [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=1515746724.30117.75.camel@suse.com \
--to=dfaggioli@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jgross@suse.com \
--cc=xen-devel@lists.xen.org \
/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).