Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
8cd06e6a
Commit
8cd06e6a
authored
7 years ago
by
Vladimir Davydov
Committed by
Konstantin Osipov
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
vinyl: don't start event loop for worker threads
This is pointless as worker threads don't use coio.
parent
2b7efc1e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/box/vy_scheduler.c
+6
-8
6 additions, 8 deletions
src/box/vy_scheduler.c
with
6 additions
and
8 deletions
src/box/vy_scheduler.c
+
6
−
8
View file @
8cd06e6a
...
...
@@ -41,7 +41,6 @@
#include
<tarantool_ev.h>
#include
"checkpoint.h"
#include
"coio_task.h"
#include
"diag.h"
#include
"errcode.h"
#include
"errinj.h"
...
...
@@ -72,7 +71,7 @@ enum { VY_YIELD_LOOPS = 2 };
#define VY_SCHEDULER_TIMEOUT_MIN 1
#define VY_SCHEDULER_TIMEOUT_MAX 60
static
int
vy_worker_f
(
v
a_list
);
static
void
*
vy_worker_f
(
v
oid
*
);
static
int
vy_scheduler_f
(
va_list
);
struct
vy_task
;
...
...
@@ -267,7 +266,7 @@ vy_scheduler_start_workers(struct vy_scheduler *scheduler)
for
(
int
i
=
0
;
i
<
scheduler
->
worker_pool_size
;
i
++
)
{
char
name
[
FIBER_NAME_MAX
];
snprintf
(
name
,
sizeof
(
name
),
"vinyl.writer.%d"
,
i
);
if
(
cord_
co
start
(
&
scheduler
->
worker_pool
[
i
],
name
,
if
(
cord_start
(
&
scheduler
->
worker_pool
[
i
],
name
,
vy_worker_f
,
scheduler
)
!=
0
)
panic
(
"failed to start vinyl worker thread"
);
}
...
...
@@ -1595,11 +1594,10 @@ vy_scheduler_f(va_list va)
return
0
;
}
static
int
vy_worker_f
(
v
a_list
va
)
static
void
*
vy_worker_f
(
v
oid
*
arg
)
{
struct
vy_scheduler
*
scheduler
=
va_arg
(
va
,
struct
vy_scheduler
*
);
coio_enable
();
struct
vy_scheduler
*
scheduler
=
arg
;
struct
vy_task
*
task
=
NULL
;
tt_pthread_mutex_lock
(
&
scheduler
->
mutex
);
...
...
@@ -1631,5 +1629,5 @@ vy_worker_f(va_list va)
stailq_add_tail_entry
(
&
scheduler
->
output_queue
,
task
,
link
);
}
tt_pthread_mutex_unlock
(
&
scheduler
->
mutex
);
return
0
;
return
NULL
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment