From: Richard Henderson <rth@twiddle.net>
To: Patrick Williams III <iawillia@us.ibm.com>,
Xin Tong <trent.tong@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Intel X86 hardware transactional memory
Date: Thu, 05 Feb 2015 17:52:13 -0800 [thread overview]
Message-ID: <54D41E4D.6030603@twiddle.net> (raw)
In-Reply-To: <OF2A0E202C.CE11A6AD-ON87257DE3.001C5036-87257DE3.001C5039@us.ibm.com>
On 02/04/2015 09:09 PM, Patrick Williams III wrote:
>>I think one possible way is to clear the software tlb on entry to the
>>transaction and disable (not install any translations) the software
>>TLB till the end of the transaction.
>>In the softmmu helper functions, the memory addresses as well as
>>value can then be tracked in a hashtable and committed to system
>>memory once the transaction is ready to be committed.
>
> I believe the transaction conflicts are handled post-translation by the cache
> coherency protocol. Trying to store the pre-translation address isn't
> sufficient for conflict resolution.
>
> Consider two virtual addresses that point to the same physical address. One
> thread uses the first virtual address in a transaction; another thread writes
> to the second virtual address while the transaction is going on. This should
> cause the transaction to fail because the same physical address was involved.
That's not really relevant. The important part is that no TLB hits are made
within TCG, so that we always use the softmmu helpers.
Incidentally, that's also accomplished by bits such as TLB_NOTDIRTY. We could
add another bit so that pages referenced by TM don't need to be fetched out of
the page tables every time.
r~
next prev parent reply other threads:[~2015-02-06 1:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-05 2:21 [Qemu-devel] Intel X86 hardware transactional memory Xin Tong
2015-02-05 5:09 ` Patrick Williams III
2015-02-06 1:52 ` Richard Henderson [this message]
2015-02-06 3:36 ` Xin Tong
2015-02-06 6:01 ` Richard Henderson
2015-02-06 8:28 ` Peter Maydell
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=54D41E4D.6030603@twiddle.net \
--to=rth@twiddle.net \
--cc=iawillia@us.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=trent.tong@gmail.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 NNTP newsgroup(s).