Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
4da72c2e
Commit
4da72c2e
authored
Apr 01, 2004
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge marko@build.mysql.com:/home/bk/mysql-4.0
into hundin.mysql.fi:/home/marko/j/mysql-4.0
parents
e00bf403
a169bfa6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
25 deletions
+49
-25
innobase/fil/fil0fil.c
innobase/fil/fil0fil.c
+5
-6
innobase/include/srv0srv.h
innobase/include/srv0srv.h
+11
-2
innobase/os/os0file.c
innobase/os/os0file.c
+17
-15
innobase/srv/srv0srv.c
innobase/srv/srv0srv.c
+16
-2
No files found.
innobase/fil/fil0fil.c
View file @
4da72c2e
...
...
@@ -1321,7 +1321,7 @@ fil_aio_wait(
ut_ad
(
fil_validate
());
if
(
os_aio_use_native_aio
)
{
srv_
io_thread_op_info
[
segment
]
=
(
char
*
)
"native aio handle"
;
srv_
set_io_thread_op_info
(
segment
,
"native aio handle"
)
;
#ifdef WIN_ASYNC_IO
ret
=
os_aio_windows_handle
(
segment
,
0
,
&
fil_node
,
&
message
,
&
type
);
...
...
@@ -1332,7 +1332,7 @@ fil_aio_wait(
ut_error
;
#endif
}
else
{
srv_
io_thread_op_info
[
segment
]
=
(
char
*
)
"simulated aio handle"
;
srv_
set_io_thread_op_info
(
segment
,
"simulated aio handle"
)
;
ret
=
os_aio_simulated_handle
(
segment
,
(
void
**
)
&
fil_node
,
&
message
,
&
type
);
...
...
@@ -1340,7 +1340,7 @@ fil_aio_wait(
ut_a
(
ret
);
srv_
io_thread_op_info
[
segment
]
=
(
char
*
)
"complete io for fil node"
;
srv_
set_io_thread_op_info
(
segment
,
"complete io for fil node"
)
;
mutex_enter
(
&
(
system
->
mutex
));
...
...
@@ -1353,11 +1353,10 @@ fil_aio_wait(
/* Do the i/o handling */
if
(
buf_pool_is_block
(
message
))
{
srv_io_thread_op_info
[
segment
]
=
(
char
*
)
"complete io for buf page"
;
srv_set_io_thread_op_info
(
segment
,
"complete io for buf page"
);
buf_page_io_complete
(
message
);
}
else
{
srv_
io_thread_op_info
[
segment
]
=
(
char
*
)
"complete io for log"
;
srv_
set_io_thread_op_info
(
segment
,
"complete io for log"
)
;
log_io_complete
(
message
);
}
}
...
...
innobase/include/srv0srv.h
View file @
4da72c2e
...
...
@@ -155,8 +155,8 @@ extern mutex_t* kernel_mutex_temp;/* mutex protecting the server, trx structs,
/* Array of English strings describing the current state of an
i/o handler thread */
extern
char
*
srv_io_thread_op_info
[];
extern
char
*
srv_io_thread_function
[];
extern
c
onst
c
har
*
srv_io_thread_op_info
[];
extern
c
onst
c
har
*
srv_io_thread_function
[];
typedef
struct
srv_sys_struct
srv_sys_t
;
...
...
@@ -234,6 +234,15 @@ srv_get_thread_type(void);
/*=====================*/
/* out: SRV_COM, ... */
/*************************************************************************
Sets the info describing an i/o thread current state. */
void
srv_set_io_thread_op_info
(
/*======================*/
ulint
i
,
/* in: the 'segment' of the i/o thread */
const
char
*
str
);
/* in: constant char string describing the
state */
/*************************************************************************
Releases threads of the type given from suspension in the thread table.
NOTE! The server mutex has to be reserved by the caller! */
...
...
innobase/os/os0file.c
View file @
4da72c2e
...
...
@@ -1586,7 +1586,7 @@ os_aio_init(
os_io_init_simple
();
for
(
i
=
0
;
i
<
n_segments
;
i
++
)
{
srv_
io_thread_op_info
[
i
]
=
(
char
*
)
"not started yet"
;
srv_
set_io_thread_op_info
(
i
,
"not started yet"
)
;
}
n_per_seg
=
n
/
n_segments
;
...
...
@@ -1597,22 +1597,24 @@ os_aio_init(
os_aio_ibuf_array
=
os_aio_array_create
(
n_per_seg
,
1
);
srv_io_thread_function
[
0
]
=
(
char
*
)
"insert buffer thread"
;
srv_io_thread_function
[
0
]
=
"insert buffer thread"
;
os_aio_log_array
=
os_aio_array_create
(
n_per_seg
,
1
);
srv_io_thread_function
[
1
]
=
(
char
*
)
"log thread"
;
srv_io_thread_function
[
1
]
=
"log thread"
;
os_aio_read_array
=
os_aio_array_create
(
n_read_segs
*
n_per_seg
,
n_read_segs
);
for
(
i
=
2
;
i
<
2
+
n_read_segs
;
i
++
)
{
srv_io_thread_function
[
i
]
=
(
char
*
)
"read thread"
;
ut_a
(
i
<
SRV_MAX_N_IO_THREADS
);
srv_io_thread_function
[
i
]
=
"read thread"
;
}
os_aio_write_array
=
os_aio_array_create
(
n_write_segs
*
n_per_seg
,
n_write_segs
);
for
(
i
=
2
+
n_read_segs
;
i
<
n_segments
;
i
++
)
{
srv_io_thread_function
[
i
]
=
(
char
*
)
"write thread"
;
ut_a
(
i
<
SRV_MAX_N_IO_THREADS
);
srv_io_thread_function
[
i
]
=
"write thread"
;
}
os_aio_sync_array
=
os_aio_array_create
(
n_slots_sync
,
1
);
...
...
@@ -2324,13 +2326,10 @@ os_aio_windows_handle(
n
=
array
->
n_slots
/
array
->
n_segments
;
if
(
array
==
os_aio_sync_array
)
{
srv_io_thread_op_info
[
orig_seg
]
=
"wait Windows aio for 1 page"
;
os_event_wait
(
os_aio_array_get_nth_slot
(
array
,
pos
)
->
event
);
i
=
pos
;
}
else
{
srv_io_thread_op_info
[
orig_seg
]
=
"wait Windows aio"
;
srv_set_io_thread_op_info
(
orig_seg
,
"wait Windows aio"
);
i
=
os_event_wait_multiple
(
n
,
(
array
->
native_events
)
+
segment
*
n
);
}
...
...
@@ -2341,7 +2340,11 @@ os_aio_windows_handle(
ut_a
(
slot
->
reserved
);
srv_io_thread_op_info
[
orig_seg
]
=
"get windows aio return value"
;
if
(
orig_seg
!=
ULINT_UNDEFINED
)
{
srv_set_io_thread_op_info
(
orig_seg
,
"get windows aio return value"
);
}
ret
=
GetOverlappedResult
(
slot
->
file
,
&
(
slot
->
control
),
&
len
,
TRUE
);
*
message1
=
slot
->
message1
;
...
...
@@ -2663,8 +2666,8 @@ consecutive_loop:
offs
+=
consecutive_ios
[
i
]
->
len
;
}
}
srv_
io_thread_op_info
[
global_segment
]
=
(
char
*
)
"doing file i/o"
;
srv_
set_io_thread_op_info
(
global_segment
,
"doing file i/o"
)
;
if
(
os_aio_print_debug
)
{
fprintf
(
stderr
,
...
...
@@ -2714,7 +2717,7 @@ consecutive_loop:
}
ut_a
(
ret
);
srv_
io_thread_op_info
[
global_segment
]
=
(
char
*
)
"file i/o done"
;
srv_
set_io_thread_op_info
(
global_segment
,
"file i/o done"
)
;
/* printf("aio: %lu consecutive %lu:th segment, first offs %lu blocks\n",
n_consecutive, global_segment, slot->offset
...
...
@@ -2772,8 +2775,7 @@ wait_for_io:
os_mutex_exit
(
array
->
mutex
);
recommended_sleep:
srv_io_thread_op_info
[
global_segment
]
=
(
char
*
)
"waiting for i/o request"
;
srv_set_io_thread_op_info
(
global_segment
,
"waiting for i/o request"
);
os_event_wait
(
os_aio_segment_wait_events
[
global_segment
]);
...
...
innobase/srv/srv0srv.c
View file @
4da72c2e
...
...
@@ -285,8 +285,8 @@ ulint srv_test_n_mutexes = ULINT_MAX;
/* Array of English strings describing the current state of an
i/o handler thread */
char
*
srv_io_thread_op_info
[
SRV_MAX_N_IO_THREADS
];
char
*
srv_io_thread_function
[
SRV_MAX_N_IO_THREADS
];
c
onst
c
har
*
srv_io_thread_op_info
[
SRV_MAX_N_IO_THREADS
];
c
onst
c
har
*
srv_io_thread_function
[
SRV_MAX_N_IO_THREADS
];
time_t
srv_last_monitor_time
;
...
...
@@ -514,6 +514,20 @@ are indexed by the type of the thread. */
ulint
srv_n_threads_active
[
SRV_MASTER
+
1
];
ulint
srv_n_threads
[
SRV_MASTER
+
1
];
/*************************************************************************
Sets the info describing an i/o thread current state. */
void
srv_set_io_thread_op_info
(
/*======================*/
ulint
i
,
/* in: the 'segment' of the i/o thread */
const
char
*
str
)
/* in: constant char string describing the
state */
{
ut_a
(
i
<
SRV_MAX_N_IO_THREADS
);
srv_io_thread_op_info
[
i
]
=
str
;
}
/*************************************************************************
Accessor function to get pointer to n'th slot in the server thread
...
...
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