Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zhaocheng Che
libfibre
Commits
d981074a
Commit
d981074a
authored
Jan 26, 2022
by
Martin Karsten
Browse files
- reset idle manager stats after fork
parent
e5917993
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
d981074a
...
...
@@ -27,7 +27,9 @@ In addition, the following students (in alphabetical order) have helped with var
-
Qin An (FreeBSD/kqueue)
-
Bilal Akhtar (gdb extension)
-
Peter Cai (bug fixes)
-
Peng Chen (split stack)
-
Bryant Curto (bug fixes)
-
Peiran Hong (API/Apache)
-
Matthew May (MCS queue with timeout)
-
Wen Shi (gdb extension)
...
...
src/libfibre/Cluster.cc
View file @
d981074a
...
...
@@ -104,6 +104,7 @@ void Cluster::preFork(_friend<EventScope>) {
void
Cluster
::
postFork
(
cptr_t
parent
,
_friend
<
EventScope
>
fes
)
{
new
(
stats
)
FredStats
::
ClusterStats
(
this
,
parent
);
idleManager
.
reset
(
this
,
fes
);
for
(
size_t
p
=
0
;
p
<
iPollCount
;
p
+=
1
)
{
iPollVec
[
p
].
~
PollerType
();
new
(
&
iPollVec
[
p
])
PollerType
(
scope
,
stagingProc
,
this
,
"I-Poller "
,
_friend
<
Cluster
>
());
...
...
src/runtime/Scheduler.h
View file @
d981074a
...
...
@@ -64,6 +64,10 @@ class IdleManager {
public:
IdleManager
(
cptr_t
parent
)
:
fredCounter
(
0
)
{
stats
=
new
FredStats
::
IdleManagerStats
(
this
,
parent
);
}
void
reset
(
cptr_t
parent
,
_friend
<
EventScope
>
)
{
new
(
stats
)
FredStats
::
IdleManagerStats
(
this
,
parent
);
}
bool
tryGetReadyFred
()
{
ssize_t
c
=
fredCounter
;
return
(
c
>
0
)
&&
__atomic_compare_exchange_n
(
&
fredCounter
,
&
c
,
c
-
1
,
false
,
__ATOMIC_RELAXED
,
__ATOMIC_RELAXED
);
...
...
@@ -92,6 +96,7 @@ public:
class
IdleManager
{
public:
IdleManager
(
cptr_t
)
{}
void
reset
(
cptr_t
,
_friend
<
EventScope
>
)
{}
};
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment