public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Torvald Riegel <triegel@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: gcc-patches@gcc.gnu.org, rth@redhat.com, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] Add faster HTM fastpath for libitm TSX v2
Date: Wed, 30 Jan 2013 11:28:00 -0000	[thread overview]
Message-ID: <1359545310.3101.14728.camel@triegel.csb> (raw)
In-Reply-To: <20130129191942.GB30577@one.firstfloor.org>

On Tue, 2013-01-29 at 20:19 +0100, Andi Kleen wrote:
> > next time please reply to the points raised in a review if you disagree
> > with them, and don't just ignore them.  That speeds up the review.
> 
> It was all in the previous email on the topic.

This v2 patch did not incorporate all the changes that I requested, nor
did you explicitly object to those you didn't incorporate.  Maybe you
don't care what's in libitm's comments, but I do.

> > >  // See gtm_thread::begin_transaction.
> > > -uint32_t GTM::htm_fastpath = 0;
> > > +uint32_t GTM::htm_fastpath asm("__gtm_htm_fastpath") = 0;
> > > +
> > > +uint32_t *GTM::global_lock asm("__gtm_global_lock");
> > 
> > Rearrange the serial lock's fields (see below).
> 
> To my knowledge C++ classes have no guaranteed layout,
> so that's not safe because there is no guarantee where
> the vtable pointers are. it would be only with plain old structs.

And gtm_rwlock doesn't have any virtual members, right?  So it's like a
plain old struct (ie, it's a POD type).

> +  // pr_tryHTM can be set by an assembler fast path when it already
> tried
> +  // a hardware transaction once. In this case we do one retry less.
> 
> pr_tryHTM is already documented.

And I asked you to simply reference this in a comment.  What's the
problem with that?  I do not want people working on libitm to have to
grep through the code for uses of pr_tryHTM and look for comments that
might be related to it just because you don't want to put a simple
reference into the comment at the declaration of pr_tryHTM.  Can't you
see that adding the reference is just plain useful for everybody else?


Torvald

  reply	other threads:[~2013-01-30 11:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-25  3:31 Andi Kleen
2013-01-29 13:17 ` Torvald Riegel
2013-01-29 19:19   ` Andi Kleen
2013-01-30 11:28     ` Torvald Riegel [this message]
2013-01-25 13:38 Uros Bizjak
2013-01-25 15:54 ` Andi Kleen

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=1359545310.3101.14728.camel@triegel.csb \
    --to=triegel@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rth@redhat.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).