[turboshaft] Use rolling window for random scheduling phase [v8/v8 : main]

0 views
Skip to first unread message

Matthias Liedtke (Gerrit)

unread,
Jun 9, 2026, 1:04:22 PM (2 days ago) Jun 9
to Darius Mercadier, Nico Hartmann, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Nico Hartmann

Matthias Liedtke added 2 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Matthias Liedtke . resolved

PTAL

File src/compiler/turboshaft/random-rescheduling-phase.cc
Line 257, Patchset 2 (Latest): if (op_states_[index] != OpState::kScheduled && !op.Is<PhiOp>() &&
!op.Is<ParameterOp>() && !op.Is<CatchBlockBeginOp>() &&
!op.IsBlockTerminator()) {
Matthias Liedtke . unresolved

Alternatively, we could also unconditionally count until 30 instead of letting the window grow larger if we have any more unschedulable operations? (I think they can still appear as there have been some discussions about it in the past and even "all loop phis are directly at the beginning of the loop block" didn't seem to hold true IIRC.)

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • Nico Hartmann
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I5b6d9f2e75c21f809088176c31cfb6d71f82e767
Gerrit-Change-Number: 7910805
Gerrit-PatchSet: 2
Gerrit-Owner: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Comment-Date: Tue, 09 Jun 2026 17:04:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Nico Hartmann (Gerrit)

unread,
Jun 10, 2026, 3:57:58 AM (yesterday) Jun 10
to Matthias Liedtke, Darius Mercadier, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Matthias Liedtke

Nico Hartmann added 1 comment

Patchset-level comments
Nico Hartmann . unresolved

This solution looks very complex to me. What I had in mind initially is to add a few bailouts in `ComputeReadyOperations`. Those can be when
a.) The set already has X number of ready operations.
b.) The used bits (or a specific subset of those) of `produced_effects` are X% populated and it gets increasingly unlikely that we can schedule anything else anyway.
c.) We have looked at a hard limit of X operations following the first unscheduled operation (this would have to be cached, which is probably a good idea anyway).

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • Matthias Liedtke
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I5b6d9f2e75c21f809088176c31cfb6d71f82e767
Gerrit-Change-Number: 7910805
Gerrit-PatchSet: 2
Gerrit-Owner: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jun 2026 07:57:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Matthias Liedtke (Gerrit)

unread,
Jun 10, 2026, 7:54:19 AM (23 hours ago) Jun 10
to Darius Mercadier, Nico Hartmann, v8-s...@luci-project-accounts.iam.gserviceaccount.com, dmercadi...@chromium.org, v8-re...@googlegroups.com
Attention needed from Darius Mercadier and Nico Hartmann

Matthias Liedtke voted and added 1 comment

Votes added by Matthias Liedtke

Commit-Queue+1

1 comment

Patchset-level comments
Nico Hartmann . unresolved

This solution looks very complex to me. What I had in mind initially is to add a few bailouts in `ComputeReadyOperations`. Those can be when
a.) The set already has X number of ready operations.
b.) The used bits (or a specific subset of those) of `produced_effects` are X% populated and it gets increasingly unlikely that we can schedule anything else anyway.
c.) We have looked at a hard limit of X operations following the first unscheduled operation (this would have to be cached, which is probably a good idea anyway).

Matthias Liedtke

Simplicity is in the eye of the beholder. AI didn't want to integrate it in a nice way into the `ComputeReadyOperations`. I did it manually now but if we want to integrate it into the existing iteration in `ComputeReadyOperations`, then obviously this iteration becomes more complicated (like the switching of the iterator mid-iteration.)

Open in Gerrit

Related details

Attention is currently required from:
  • Darius Mercadier
  • Nico Hartmann
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I5b6d9f2e75c21f809088176c31cfb6d71f82e767
Gerrit-Change-Number: 7910805
Gerrit-PatchSet: 3
Gerrit-Owner: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Reviewer: Matthias Liedtke <mlie...@chromium.org>
Gerrit-Reviewer: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Attention: Darius Mercadier <dmerc...@chromium.org>
Gerrit-Attention: Nico Hartmann <nicoha...@chromium.org>
Gerrit-Comment-Date: Wed, 10 Jun 2026 11:54:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Nico Hartmann <nicoha...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages