Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
predictable_parallel_patterns
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f9ec6ecf
authored
4 years ago
by
FritzFlorian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Touch all stack memory in scheduler.
parent
616964f6
Pipeline
#1496
failed with stages
in 54 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
lib/pls/CMakeLists.txt
+2
-0
lib/pls/src/internal/scheduling/lock_free/task_manager.cpp
+3
-0
No files found.
lib/pls/CMakeLists.txt
View file @
f9ec6ecf
...
@@ -68,12 +68,14 @@ if (PLS_PROFILER)
...
@@ -68,12 +68,14 @@ if (PLS_PROFILER)
else
()
else
()
set
(
PLS_PROFILING_ENABLED false
)
set
(
PLS_PROFILING_ENABLED false
)
endif
()
endif
()
message
(
"-- PLS Profiler:
${
PLS_PROFILER
}
"
)
option
(
SLEEP_WORKERS
"Enable sleeping workers if queues are empty"
OFF
)
option
(
SLEEP_WORKERS
"Enable sleeping workers if queues are empty"
OFF
)
if
(
SLEEP_WORKERS
)
if
(
SLEEP_WORKERS
)
set
(
PLS_SLEEP_WORKERS_ON_EMPTY true
)
set
(
PLS_SLEEP_WORKERS_ON_EMPTY true
)
else
()
else
()
set
(
PLS_SLEEP_WORKERS_ON_EMPTY false
)
set
(
PLS_SLEEP_WORKERS_ON_EMPTY false
)
endif
()
endif
()
message
(
"-- Sleep Workers:
${
SLEEP_WORKERS
}
"
)
configure_file
(
include/pls/internal/build_flavour.h.in include/pls/internal/build_flavour.h
)
configure_file
(
include/pls/internal/build_flavour.h.in include/pls/internal/build_flavour.h
)
...
...
This diff is collapsed.
Click to expand it.
lib/pls/src/internal/scheduling/lock_free/task_manager.cpp
View file @
f9ec6ecf
...
@@ -16,6 +16,9 @@ task_manager::task_manager(unsigned thread_id,
...
@@ -16,6 +16,9 @@ task_manager::task_manager(unsigned thread_id,
for
(
size_t
i
=
0
;
i
<
num_tasks
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
num_tasks
;
i
++
)
{
char
*
stack_memory
=
stack_allocator
->
allocate_stack
(
stack_size
);
char
*
stack_memory
=
stack_allocator
->
allocate_stack
(
stack_size
);
for
(
size_t
j
=
0
;
j
<
stack_size
;
j
+=
base
::
system_details
::
CACHE_LINE_SIZE
)
{
stack_memory
[
j
]
=
'a'
;
// Touch all stacks, forces the OS to actually allocate them
}
tasks_
.
emplace_back
(
std
::
make_unique
<
task
>
(
stack_memory
,
stack_size
,
i
,
thread_id
));
tasks_
.
emplace_back
(
std
::
make_unique
<
task
>
(
stack_memory
,
stack_size
,
i
,
thread_id
));
if
(
i
>
0
)
{
if
(
i
>
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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