Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ramstore
fast-ipc-module
Commits
2cef3d06
Commit
2cef3d06
authored
Mar 09, 2016
by
Charles Jacobsen
Browse files
lcd: empty_msg test builds and runs.
Seeing 424-428 cycle averages for RTTs.
parent
f657a6f5
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/platform/kernel/tests/Makefile.am
View file @
2cef3d06
...
@@ -2,4 +2,4 @@
...
@@ -2,4 +2,4 @@
# D=install dir (something/lib)
# D=install dir (something/lib)
install-tests
:
install-tests
:
cp
$(LIBFIPC_TESTS_KBUILD)
/rpc/libfipc_test_rpc.ko
$(D)
cp
$(LIBFIPC_TESTS_KBUILD)
/rpc/libfipc_test_rpc.ko
$(D)
cp
$(LIBFIPC_TESTS_KBUILD)
/
rpc
/libfipc_test_empty_msg.ko
$(D)
cp
$(LIBFIPC_TESTS_KBUILD)
/
empty_msg
/libfipc_test_empty_msg.ko
$(D)
src/platform/kernel/tests/empty_msg/README.txt
View file @
2cef3d06
...
@@ -15,8 +15,8 @@ This example was ran on an Intel Xeon E5530 2.4 GHz machines. Make sure
...
@@ -15,8 +15,8 @@ This example was ran on an Intel Xeon E5530 2.4 GHz machines. Make sure
you turn off TurboBoost in the BIOS, and make sure you turn up the
you turn off TurboBoost in the BIOS, and make sure you turn up the
processor frequencies to 2.4 GHz.
processor frequencies to 2.4 GHz.
We saw averages of 4
30
cycles for the
null invocation
round trip times
We saw averages of 4
24-428
cycles for the round trip times
between cpu1 and
between cpu1 and
cpu3.
cpu3.
To run this example, after building the .ko, just insmod it. The round trip
To run this example, after building the .ko, just insmod it. The round trip
times will be printed to the kernel logs.
times will be printed to the kernel logs.
src/platform/kernel/tests/empty_msg/callee.c
View file @
2cef3d06
...
@@ -48,7 +48,6 @@ int callee(void *_callee_channel_header)
...
@@ -48,7 +48,6 @@ int callee(void *_callee_channel_header)
{
{
struct
fipc_ring_channel
*
chan
=
_callee_channel_header
;
struct
fipc_ring_channel
*
chan
=
_callee_channel_header
;
unsigned
long
transaction_id
;
unsigned
long
transaction_id
;
unsigned
long
start
,
end
;
int
ret
=
0
;
int
ret
=
0
;
/*
/*
* Turn off interrupts so that we truly take over the core
* Turn off interrupts so that we truly take over the core
...
@@ -57,14 +56,11 @@ int callee(void *_callee_channel_header)
...
@@ -57,14 +56,11 @@ int callee(void *_callee_channel_header)
/*
/*
* Do recv/send
* Do recv/send
*/
*/
pr_err
(
"Roundtrip Times (in cycles):
\n
"
);
for
(
transaction_id
=
0
;
for
(
transaction_id
=
0
;
transaction_id
<
TRANSACTIONS
;
transaction_id
<
TRANSACTIONS
;
transaction_id
++
)
{
transaction_id
++
)
{
start
=
test_fipc_start_stopwatch
();
ret
=
do_one_msg
(
chan
);
ret
=
do_one_msg
(
chan
);
end
=
test_fipc_stop_stopwatch
();
if
(
ret
)
{
if
(
ret
)
{
pr_err
(
"error in send/recv, ret = %d, exiting...
\n
"
,
pr_err
(
"error in send/recv, ret = %d, exiting...
\n
"
,
...
@@ -72,10 +68,7 @@ int callee(void *_callee_channel_header)
...
@@ -72,10 +68,7 @@ int callee(void *_callee_channel_header)
goto
out
;
goto
out
;
}
}
pr_err
(
"
\t
%lu
\n
"
,
end
-
start
);
}
}
pr_err
(
"Complete
\n
"
);
/*
/*
* Re-enable interrupts
* Re-enable interrupts
*/
*/
...
...
src/platform/kernel/tests/empty_msg/empty_msg.h
View file @
2cef3d06
...
@@ -10,6 +10,8 @@
...
@@ -10,6 +10,8 @@
#include
<libfipc.h>
#include
<libfipc.h>
#define TRANSACTIONS 60
/* thread main functions */
/* thread main functions */
int
callee
(
void
*
_callee_channel_header
);
int
callee
(
void
*
_callee_channel_header
);
int
caller
(
void
*
_caller_channel_header
);
int
caller
(
void
*
_caller_channel_header
);
...
...
Write
Preview
Supports
Markdown
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