From: Sergey Ostanevich <sergos@tarantool.org>
To: Igor Munkin <imun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v4 1/2] core: introduce various platform metrics
Date: Fri, 9 Oct 2020 17:39:48 +0300 [thread overview]
Message-ID: <20201009143948.GB2885@tarantool.org> (raw)
In-Reply-To: <20201008124453.GT18920@tarantool.org>
Hi!
Thanks for the patch. Although I was puzzled by your conversation over
MIPS registers use, stalled at the first reply 'added scratch register
allocation'. And I see the same first version in the branch.
The hand-scheduled MIPS code is cool also!
LGTM, I didn't manage to catch any inconsistence in inc/dec of stats.
Sergos.
On 08 окт 15:44, Igor Munkin wrote:
> Sergey,
>
> Thanks, this patch also LGTM.
>
> On 08.10.20, Sergey Kaplun wrote:
> > Igor,
> >
>
> <snipped>
>
> > > > > > + emit_setgl(as, RID_RET+2, gc.cdatanum);
> > > > >
> > > > > Well, I glanced a MIPS register-usage convention and AFAICS $4 register
> > > > > (RID_RET + 2) is a general-purpose (i.e. doesn't store 0 or preserved by
> > > > > kernel) caller-safe one. Ergo it should be allocated it in a proper way
> > > > > from scratch set, shouldn't it?
> > > > >
> > > >
> > > > AFAIK, $a0 - $a3 ($4 - $7) registers are arguments to functions - not
> > > > preserved by subprograms.
> > >
> > > Yes, but there is e.g. $8, that is temporary one, isn't it? Anyway, you
> >
> > Yes, for example.
> > Side note: We can omit the call to the register allocator, since these
> > registers can change during the call, but in order not to be tied to ABI
> > we can use a lightweight `ra_scratch`, indeed.
>
> Agree here: you can pick any of caller-safe registers instead of
> scratching it. All values contained in these registers should be
> preserved prior to call, so nothing is broken in your previous version
> (i.e. not a lucky coincidence). However, using explicit scratching here
> looks at least more consistent to me.
>
> >
> > > can't just pick the particular register, since it can be already
> > > allocated by RA. So it *has* to be explicitly allocated to avoid data
> > > clash on the trace. I strongly believe the reason you see no failure on
> > > tests is simply a lucky coincidence (or tiny traces).
> > >
> > > > But anyway explicit allocation is better here. Added.
> > > >
>
> <snipped>
>
> --
> Best regards,
> IM
next prev parent reply other threads:[~2020-10-09 14:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 6:30 [Tarantool-patches] [PATCH v4 0/2] Implement LuaJIT " Sergey Kaplun
2020-10-05 6:30 ` [Tarantool-patches] [PATCH v4 1/2] core: introduce various " Sergey Kaplun
2020-10-07 14:11 ` Igor Munkin
2020-10-07 19:55 ` Sergey Kaplun
2020-10-07 20:16 ` Igor Munkin
2020-10-08 9:28 ` Igor Munkin
2020-10-08 10:11 ` Sergey Kaplun
2020-10-08 12:44 ` Igor Munkin
2020-10-09 14:39 ` Sergey Ostanevich [this message]
2020-10-05 6:30 ` [Tarantool-patches] [PATCH v4 2/2] misc: add C and Lua API for " Sergey Kaplun
2020-10-06 22:17 ` Igor Munkin
2020-10-07 5:57 ` Igor Munkin
2020-10-07 14:35 ` Sergey Kaplun
2020-10-07 18:23 ` Igor Munkin
2020-10-07 20:09 ` Sergey Kaplun
2020-10-09 14:45 ` Sergey Ostanevich
2020-10-13 6:01 ` Sergey Kaplun
2020-10-05 6:30 ` [Tarantool-patches] [RFC v4] rfc: luajit metrics Sergey Kaplun
2020-10-07 14:46 ` Sergey Kaplun
2020-10-08 17:25 ` Igor Munkin
2020-10-08 19:29 ` Sergey Kaplun
2020-10-08 20:26 ` Igor Munkin
2020-10-09 6:06 ` Sergey Kaplun
2020-12-22 9:07 ` Kirill Yukhin
2020-10-08 17:33 ` [Tarantool-patches] [PATCH v4 0/2] Implement LuaJIT platform metrics Igor Munkin
2020-10-13 13:17 ` Kirill Yukhin
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=20201009143948.GB2885@tarantool.org \
--to=sergos@tarantool.org \
--cc=imun@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v4 1/2] core: introduce various platform metrics' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox