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
a489d919
Commit
a489d919
authored
Nov 28, 2017
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup UT_LOW_PRIORITY_CPU/UT_RESUME_PRIORITY_CPU
Server already has HMT_low/HMT_medium.
parent
1c4968f2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
29 deletions
+10
-29
config.h.cmake
config.h.cmake
+0
-1
configure.cmake
configure.cmake
+0
-11
include/my_cpu.h
include/my_cpu.h
+7
-6
storage/innobase/include/ut0ut.h
storage/innobase/include/ut0ut.h
+0
-9
storage/innobase/ut/ut0ut.cc
storage/innobase/ut/ut0ut.cc
+3
-2
No files found.
config.h.cmake
View file @
a489d919
...
@@ -191,7 +191,6 @@
...
@@ -191,7 +191,6 @@
#cmakedefine HAVE_PREAD 1
#cmakedefine HAVE_PREAD 1
#cmakedefine HAVE_PAUSE_INSTRUCTION 1
#cmakedefine HAVE_PAUSE_INSTRUCTION 1
#cmakedefine HAVE_FAKE_PAUSE_INSTRUCTION 1
#cmakedefine HAVE_FAKE_PAUSE_INSTRUCTION 1
#cmakedefine HAVE_HMT_PRIORITY_INSTRUCTION 1
#cmakedefine HAVE_RDTSCLL 1
#cmakedefine HAVE_RDTSCLL 1
#cmakedefine HAVE_READ_REAL_TIME 1
#cmakedefine HAVE_READ_REAL_TIME 1
#cmakedefine HAVE_PTHREAD_ATTR_CREATE 1
#cmakedefine HAVE_PTHREAD_ATTR_CREATE 1
...
...
configure.cmake
View file @
a489d919
...
@@ -792,17 +792,6 @@ IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC)
...
@@ -792,17 +792,6 @@ IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC)
}
}
"
HAVE_FAKE_PAUSE_INSTRUCTION
)
"
HAVE_FAKE_PAUSE_INSTRUCTION
)
ENDIF
()
ENDIF
()
IF
(
NOT HAVE_PAUSE_INSTRUCTION
)
CHECK_C_SOURCE_COMPILES
(
"
#include <sys/platform/ppc.h>
int main()
{
__ppc_set_ppr_low();
__ppc_set_ppr_med();
return 0;
}
"
HAVE_HMT_PRIORITY_INSTRUCTION
)
ENDIF
()
ENDIF
()
ENDIF
()
CHECK_SYMBOL_EXISTS
(
tcgetattr
"termios.h"
HAVE_TCGETATTR 1
)
CHECK_SYMBOL_EXISTS
(
tcgetattr
"termios.h"
HAVE_TCGETATTR 1
)
...
...
include/my_cpu.h
View file @
a489d919
...
@@ -21,17 +21,18 @@
...
@@ -21,17 +21,18 @@
The defines are the same ones used by the linux kernel
The defines are the same ones used by the linux kernel
*/
*/
#if defined(__powerpc__)
#ifdef _ARCH_PWR8
#include <sys/platform/ppc.h>
/* Very low priority */
/* Very low priority */
#define HMT_very_low()
asm volatile("or 31,31,31"
)
#define HMT_very_low()
__ppc_set_ppr_very_low(
)
/* Low priority */
/* Low priority */
#define HMT_low()
asm volatile("or 1,1,1"
)
#define HMT_low()
__ppc_set_ppr_low(
)
/* Medium low priority */
/* Medium low priority */
#define HMT_medium_low()
asm volatile("or 6,6,6"
)
#define HMT_medium_low()
__ppc_set_ppr_med_low(
)
/* Medium priority */
/* Medium priority */
#define HMT_medium()
asm volatile("or 2,2,2"
)
#define HMT_medium()
__ppc_set_ppr_med(
)
/* Medium high priority */
/* Medium high priority */
#define HMT_medium_high()
asm volatile("or 5,5,5"
)
#define HMT_medium_high()
__ppc_set_ppr_med_high(
)
/* High priority */
/* High priority */
#define HMT_high() asm volatile("or 3,3,3")
#define HMT_high() asm volatile("or 3,3,3")
#else
#else
...
...
storage/innobase/include/ut0ut.h
View file @
a489d919
...
@@ -89,15 +89,6 @@ typedef time_t ib_time_t;
...
@@ -89,15 +89,6 @@ typedef time_t ib_time_t;
# define UT_COMPILER_BARRIER()
# define UT_COMPILER_BARRIER()
#endif
#endif
#if defined(HAVE_HMT_PRIORITY_INSTRUCTION)
# include <sys/platform/ppc.h>
# define UT_LOW_PRIORITY_CPU() __ppc_set_ppr_low()
# define UT_RESUME_PRIORITY_CPU() __ppc_set_ppr_med()
#else
# define UT_LOW_PRIORITY_CPU() ((void)0)
# define UT_RESUME_PRIORITY_CPU() ((void)0)
#endif
/*********************************************************************//**
/*********************************************************************//**
Delays execution for at most max_wait_us microseconds or returns earlier
Delays execution for at most max_wait_us microseconds or returns earlier
if cond becomes true.
if cond becomes true.
...
...
storage/innobase/ut/ut0ut.cc
View file @
a489d919
...
@@ -37,6 +37,7 @@ Created 5/11/1994 Heikki Tuuri
...
@@ -37,6 +37,7 @@ Created 5/11/1994 Heikki Tuuri
#include "trx0trx.h"
#include "trx0trx.h"
#include <string>
#include <string>
#include "log.h"
#include "log.h"
#include "my_cpu.h"
#ifdef _WIN32
#ifdef _WIN32
/*****************************************************************//**
/*****************************************************************//**
...
@@ -290,14 +291,14 @@ ut_delay(
...
@@ -290,14 +291,14 @@ ut_delay(
{
{
ulint
i
;
ulint
i
;
UT_LOW_PRIORITY_CPU
();
HMT_low
();
for
(
i
=
0
;
i
<
delay
*
50
;
i
++
)
{
for
(
i
=
0
;
i
<
delay
*
50
;
i
++
)
{
UT_RELAX_CPU
();
UT_RELAX_CPU
();
UT_COMPILER_BARRIER
();
UT_COMPILER_BARRIER
();
}
}
UT_RESUME_PRIORITY_CPU
();
HMT_medium
();
}
}
/*************************************************************//**
/*************************************************************//**
...
...
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