Discussion:
[gem5-dev] Change in gem5/gem5[master]: systemc: Don't run the ready event inline when unpausing.
(too old to reply)
Gabe Black (Gerrit)
2018-08-22 02:13:25 UTC
Permalink
Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/12214


Change subject: systemc: Don't run the ready event inline when unpausing.
......................................................................

systemc: Don't run the ready event inline when unpausing.

Now that delta events are handled explicitly by the scheduler, there's
no reason to run the readyEvent inline when returning from a pause. The
delta events will necessarily be run after the evaluate and update
phases.

Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
---
M src/systemc/core/scheduler.cc
1 file changed, 6 insertions(+), 13 deletions(-)



diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc
index bc08d55..ceaa5f4 100644
--- a/src/systemc/core/scheduler.cc
+++ b/src/systemc/core/scheduler.cc
@@ -196,10 +196,8 @@
e->run();
deltas.clear();

- if (runOnce) {
- eq->reschedule(&maxTickEvent, eq->getCurTick());
- runOnce = false;
- }
+ if (runOnce)
+ schedulePause();
}

void
@@ -220,14 +218,6 @@
kernel->status(::sc_core::SC_PAUSED);
runOnce = false;
scMain->run();
-
- // If the ready event is supposed to run now, run it inline so that it
- // preempts any delta notifications which were scheduled while we were
- // paused.
- if (readyEvent.scheduled()) {
- eq->deschedule(&readyEvent);
- runReady();
- }
}

void
@@ -298,13 +288,16 @@

if (!finish_delta) {
// If we're not supposed to finish the delta cycle, flush the list
- // of ready processes and scheduled updates.
+ // of ready processes, scheduled updates, and delta notifications.
Process *p;
while ((p = readyList.getNext()))
p->popListNode();
Channel *c;
while ((c = updateList.getNext()))
c->popListNode();
+ for (auto &e: deltas)
+ e->deschedule();
+ deltas.clear();
}
eq->schedule(&stopEvent, eq->getCurTick());
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12214
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
Gerrit-Change-Number: 12214
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-MessageType: newchange
Gabe Black (Gerrit)
2018-08-22 02:19:37 UTC
Permalink
Hello Jason Lowe-Power, Matthias Jung, Andreas Sandberg,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/12214

to look at the new patch set (#2).

Change subject: systemc: Don't run the ready event inline when unpausing.
......................................................................

systemc: Don't run the ready event inline when unpausing.

Now that delta events are handled explicitly by the scheduler, there's
no reason to run the readyEvent inline when returning from a pause. The
delta events will necessarily be run after the evaluate and update
phases.

Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
---
M src/systemc/core/scheduler.cc
1 file changed, 6 insertions(+), 13 deletions(-)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12214
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
Gerrit-Change-Number: 12214
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-Reviewer: Andreas Sandberg <***@arm.com>
Gerrit-Reviewer: Gabe Black <***@google.com>
Gerrit-Reviewer: Jason Lowe-Power <***@lowepower.com>
Gerrit-Reviewer: Matthias Jung <***@eit.uni-kl.de>
Gerrit-MessageType: newpatchset
Gabe Black (Gerrit)
2018-08-28 21:45:21 UTC
Permalink
Hello Jason Lowe-Power, Matthias Jung, Andreas Sandberg,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/12214

to look at the new patch set (#4).

Change subject: systemc: Don't run the ready event inline when unpausing.
......................................................................

systemc: Don't run the ready event inline when unpausing.

Now that delta events are handled explicitly by the scheduler, there's
no reason to run the readyEvent inline when returning from a pause. The
delta events will necessarily be run after the evaluate and update
phases.

Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
---
M src/systemc/core/scheduler.cc
1 file changed, 6 insertions(+), 13 deletions(-)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12214
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
Gerrit-Change-Number: 12214
Gerrit-PatchSet: 4
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-Reviewer: Andreas Sandberg <***@arm.com>
Gerrit-Reviewer: Gabe Black <***@google.com>
Gerrit-Reviewer: Jason Lowe-Power <***@lowepower.com>
Gerrit-Reviewer: Matthias Jung <***@eit.uni-kl.de>
Gerrit-MessageType: newpatchset
Gabe Black (Gerrit)
2018-09-05 06:14:30 UTC
Permalink
Hello Jason Lowe-Power, Matthias Jung, Andreas Sandberg,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/12214

to look at the new patch set (#6).

Change subject: systemc: Don't run the ready event inline when unpausing.
......................................................................

systemc: Don't run the ready event inline when unpausing.

Now that delta events are handled explicitly by the scheduler, there's
no reason to run the readyEvent inline when returning from a pause. The
delta events will necessarily be run after the evaluate and update
phases.

Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
---
M src/systemc/core/scheduler.cc
1 file changed, 6 insertions(+), 13 deletions(-)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12214
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
Gerrit-Change-Number: 12214
Gerrit-PatchSet: 6
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-Reviewer: Andreas Sandberg <***@arm.com>
Gerrit-Reviewer: Gabe Black <***@google.com>
Gerrit-Reviewer: Jason Lowe-Power <***@lowepower.com>
Gerrit-Reviewer: Matthias Jung <***@eit.uni-kl.de>
Gerrit-MessageType: newpatchset
Gabe Black (Gerrit)
2018-09-20 11:23:24 UTC
Permalink
Hello Jason Lowe-Power, Matthias Jung, Andreas Sandberg,

I'd like you to reexamine a change. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/12214

to look at the new patch set (#9).

Change subject: systemc: Don't run the ready event inline when unpausing.
......................................................................

systemc: Don't run the ready event inline when unpausing.

Now that delta events are handled explicitly by the scheduler, there's
no reason to run the readyEvent inline when returning from a pause. The
delta events will necessarily be run after the evaluate and update
phases.

Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
---
M src/systemc/core/scheduler.cc
1 file changed, 6 insertions(+), 13 deletions(-)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12214
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
Gerrit-Change-Number: 12214
Gerrit-PatchSet: 9
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-Reviewer: Andreas Sandberg <***@arm.com>
Gerrit-Reviewer: Gabe Black <***@google.com>
Gerrit-Reviewer: Jason Lowe-Power <***@lowepower.com>
Gerrit-Reviewer: Matthias Jung <***@eit.uni-kl.de>
Gerrit-MessageType: newpatchset
Gabe Black (Gerrit)
2018-09-25 23:50:06 UTC
Permalink
Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/12214 )

Change subject: systemc: Don't run the ready event inline when unpausing.
......................................................................

systemc: Don't run the ready event inline when unpausing.

Now that delta events are handled explicitly by the scheduler, there's
no reason to run the readyEvent inline when returning from a pause. The
delta events will necessarily be run after the evaluate and update
phases.

Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
Reviewed-on: https://gem5-review.googlesource.com/12214
Reviewed-by: Gabe Black <***@google.com>
Maintainer: Gabe Black <***@google.com>
---
M src/systemc/core/scheduler.cc
1 file changed, 6 insertions(+), 13 deletions(-)

Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved



diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc
index bc08d55..ceaa5f4 100644
--- a/src/systemc/core/scheduler.cc
+++ b/src/systemc/core/scheduler.cc
@@ -196,10 +196,8 @@
e->run();
deltas.clear();

- if (runOnce) {
- eq->reschedule(&maxTickEvent, eq->getCurTick());
- runOnce = false;
- }
+ if (runOnce)
+ schedulePause();
}

void
@@ -220,14 +218,6 @@
kernel->status(::sc_core::SC_PAUSED);
runOnce = false;
scMain->run();
-
- // If the ready event is supposed to run now, run it inline so that it
- // preempts any delta notifications which were scheduled while we were
- // paused.
- if (readyEvent.scheduled()) {
- eq->deschedule(&readyEvent);
- runReady();
- }
}

void
@@ -298,13 +288,16 @@

if (!finish_delta) {
// If we're not supposed to finish the delta cycle, flush the list
- // of ready processes and scheduled updates.
+ // of ready processes, scheduled updates, and delta notifications.
Process *p;
while ((p = readyList.getNext()))
p->popListNode();
Channel *c;
while ((c = updateList.getNext()))
c->popListNode();
+ for (auto &e: deltas)
+ e->deschedule();
+ deltas.clear();
}
eq->schedule(&stopEvent, eq->getCurTick());
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12214
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iad6d431a87742354e3a46a0fb44c309aa785ea60
Gerrit-Change-Number: 12214
Gerrit-PatchSet: 11
Gerrit-Owner: Gabe Black <***@google.com>
Gerrit-Reviewer: Andreas Sandberg <***@arm.com>
Gerrit-Reviewer: Gabe Black <***@google.com>
Gerrit-Reviewer: Jason Lowe-Power <***@lowepower.com>
Gerrit-Reviewer: Matthias Jung <***@eit.uni-kl.de>
Gerrit-MessageType: merged
Continue reading on narkive:
Loading...