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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
0b8375d0
Commit
0b8375d0
authored
Dec 15, 2008
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Plain Diff
Merged latest performance version
parents
edeae6f9
7769ce30
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
storage/innobase/include/ut0ut.h
storage/innobase/include/ut0ut.h
+4
-3
storage/innobase/srv/srv0srv.c
storage/innobase/srv/srv0srv.c
+7
-2
storage/innobase/ut/ut0ut.c
storage/innobase/ut/ut0ut.c
+1
-2
No files found.
storage/innobase/include/ut0ut.h
View file @
0b8375d0
...
...
@@ -18,15 +18,16 @@ Created 1/20/1994 Heikki Tuuri
typedef
time_t
ib_time_t
;
#ifdef HAVE_PAUSE_INSTRUCTION
#define PAUSE_INSTRUCTION(
volatile_var
) {__asm__ __volatile__ ("pause");}
#define PAUSE_INSTRUCTION() {__asm__ __volatile__ ("pause");}
#else
#ifdef UNIV_SYNC_ATOMIC
#define PAUSE_INSTRUCTION(
volatile_var
) \
#define PAUSE_INSTRUCTION() \
{ \
volatile lint volatile_var;
os_compare_and_swap
(
volatile_var
,
0
,
1
);
\
}
#else
#define PAUSE_INSTRUCTION(
volatile_var
)
#define PAUSE_INSTRUCTION()
#endif
#endif
...
...
storage/innobase/srv/srv0srv.c
View file @
0b8375d0
...
...
@@ -1063,6 +1063,7 @@ ulong srv_max_purge_lag = 0;
Puts an OS thread to wait if there are too many concurrent threads
(>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. */
#ifdef UNIV_SYNC_ATOMIC
static
void
inc_srv_conc_n_threads
(
lint
*
n_threads
)
{
...
...
@@ -1074,6 +1075,7 @@ dec_srv_conc_n_threads()
{
os_atomic_increment
(
&
srv_conc_n_threads
,
-
1
);
}
#endif
static
void
print_already_in_error
(
trx_t
*
trx
)
...
...
@@ -1087,6 +1089,7 @@ print_already_in_error(trx_t* trx)
return
;
}
#ifdef UNIV_SYNC_ATOMIC
static
void
enter_innodb_with_tickets
(
trx_t
*
trx
)
{
...
...
@@ -1108,7 +1111,7 @@ srv_conc_enter_innodb_timer_based(trx_t* trx)
retry:
if
(
srv_conc_n_threads
<
(
lint
)
srv_thread_concurrency
)
{
inc_srv_conc_n_threads
(
&
conc_n_threads
);
if
(
conc_n_threads
<=
srv_thread_concurrency
)
{
if
(
conc_n_threads
<=
(
lint
)
srv_thread_concurrency
)
{
enter_innodb_with_tickets
(
trx
);
return
;
}
...
...
@@ -1147,6 +1150,7 @@ srv_conc_exit_innodb_timer_based(trx_t* trx)
trx
->
n_tickets_to_enter_innodb
=
0
;
return
;
}
#endif
void
srv_conc_enter_innodb
(
...
...
@@ -1315,7 +1319,6 @@ srv_conc_force_enter_innodb(
trx_t
*
trx
)
/* in: transaction object associated with the
thread */
{
lint
conc_n_threads
;
if
(
UNIV_LIKELY
(
!
srv_thread_concurrency
))
{
...
...
@@ -1324,6 +1327,8 @@ srv_conc_force_enter_innodb(
#ifdef UNIV_SYNC_ATOMIC
if
(
srv_thread_concurrency_timer_based
)
{
lint
conc_n_threads
;
inc_srv_conc_n_threads
(
&
conc_n_threads
);
trx
->
declared_to_be_inside_innodb
=
TRUE
;
trx
->
n_tickets_to_enter_innodb
=
1
;
...
...
storage/innobase/ut/ut0ut.c
View file @
0b8375d0
...
...
@@ -336,13 +336,12 @@ ut_delay(
ulint
delay
)
/* in: delay in microseconds on 100 MHz Pentium */
{
ulint
i
,
j
;
volatile
lint
volatile_var
;
j
=
0
;
for
(
i
=
0
;
i
<
delay
*
50
;
i
++
)
{
PAUSE_INSTRUCTION
();
j
+=
i
;
PAUSE_INSTRUCTION
(
&
volatile_var
);
}
if
(
ut_always_false
)
{
...
...
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