Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit] Fix TDUP load forwarding after table rehash.
Date: Mon, 21 Aug 2023 11:58:10 +0300	[thread overview]
Message-ID: <ZOMnIhRwAeNv-SIR@root> (raw)
In-Reply-To: <tsydavuy3fi45y3xvu24ig6boyyx6la22cugxait6ihtrjlnb3@vdwx7tbtciey>

Hi, Maxim!
Thanks for your review!
I fixed your comments and force-pushed the branch.

On 20.08.23, Maxim Kokryashkin wrote:
> Hi, Sergey!
> Thanks for the patch!
> LGTM, except for a few comments below.
> On Thu, Aug 17, 2023 at 05:46:41PM +0300, Sergey Kaplun wrote:
> > From: Mike Pall <mike>
> > 
> > Reported by Sergey Kaplun.
> > 
> > (cherry-picked from commit c7db8255e1eb59f933fac7bc9322f0e4f8ddc6e6)
> > 
> > After table rehashing number keys loaded via ALOAD may be placed in the
> > hash part of the table. So, load forwarding analysis missed the
> > corresponding stores like they are never existed. In such case, either
> Typo: s/they are/they/
> Typo: s/In such/In that/

Fixed.

> > we faced an assertion failure in `fwd_ahload()` due to values types
> Typo: s/values/value/

Fixed.

> > mismatch, either we faced an assertion failure in `rec_check_slots()`
> Typo: s/either/or/

Fixed.

> > since forwarded value by the JIT compiler isn't the same as it is in the
> Typo: s/since/since the/

Fixed.

> > interpreter.
> > 
> > This patch adds a check that there is no any `IR_NEWREF` after table
> Typo: s/no any/no/

Fixes.

> > creation, so it can't be rehashed.
> > 
> > Sergey Kaplun:
> > * added the description and the test for the problem
> > 
> > Part of tarantool/tarantool#8825
> > ---
> > 
> > Branch: https://github.com/tarantool/luajit/tree/skaplun/lj-980-load-fwd-after-table-rehash
> > PR: https://github.com/tarantool/tarantool/pull/8998
> > Related issues:
> > * https://github.com/LuaJIT/LuaJIT/issues/980
> > * https://github.com/tarantool/tarantool/issues/8825
> > 

<snipped>

> > +-- The test for TNEW load forwarding. It doesn't trigger an assert
> > +-- since the commit "Fix TNEW load forwarding with instable
> > +-- types.". But still add it to avoid regressions in future.
> Typo: s/But still add it/But is still added/
> Typo: s/in future/in the future/

Fixed.

> > +for i = 6, 9 do

<snipped>

> > +
> > +-- TNEW load forwarding, aliased table.
> The same label about this test being added only for the sake of
> regressional testing should be added here too.

Fixed, see iterative patch below. Branch is force-pushed.

===================================================================
diff --git a/test/tarantool-tests/lj-980-load-fwd-after-table-rehash.test.lua b/test/tarantool-tests/lj-980-load-fwd-after-table-rehash.test.lua
index a27932df..643b7823 100644
--- a/test/tarantool-tests/lj-980-load-fwd-after-table-rehash.test.lua
+++ b/test/tarantool-tests/lj-980-load-fwd-after-table-rehash.test.lua
@@ -15,7 +15,8 @@ jit.opt.start('hotloop=1')
 local result
 -- The test for TNEW load forwarding. It doesn't trigger an assert
 -- since the commit "Fix TNEW load forwarding with instable
--- types.". But still add it to avoid regressions in future.
+-- types.". But is still added it to avoid regressions in the
+-- future.
 for i = 6, 9 do
   -- Need big enough table to see rehashing.
   -- Also, to simplify logic with AREF, HREF don't use default
@@ -36,7 +37,10 @@ end
 
 test:is(result, 9, 'TNEW load forwarding')
 
--- TNEW load forwarding, aliased table.
+-- TNEW load forwarding, aliased table. It doesn't trigger an
+-- assert since the commit "Fix TNEW load forwarding with instable
+-- types.". But is still added it to avoid regressions in the
+-- future.
 local alias_store = {{}, {}, {}, {}, {}}
 for i = 6, 9 do
   local t = {i, i, i, i, i, i, i}
===================================================================

> > +local alias_store = {{}, {}, {}, {}, {}}

<snipped>

> > 2.41.0
> > 

-- 
Best regards,
Sergey Kaplun

  reply	other threads:[~2023-08-21  9:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-17 14:46 Sergey Kaplun via Tarantool-patches
2023-08-20 12:13 ` Maxim Kokryashkin via Tarantool-patches
2023-08-21  8:58   ` Sergey Kaplun via Tarantool-patches [this message]
2023-08-28 14:25 ` Sergey Bronnikov via Tarantool-patches
2023-08-28 14:26   ` Sergey Kaplun via Tarantool-patches
2023-08-28 14:33     ` Sergey Bronnikov via Tarantool-patches
2023-08-31 15:19 ` Igor Munkin via Tarantool-patches

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=ZOMnIhRwAeNv-SIR@root \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=m.kokryashkin@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit] Fix TDUP load forwarding after table rehash.' \
    /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