forked from xapi-project/xen-api
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge epoll feature branch to master (xapi-project#6005)
Pending some final testing by QA, these commits have already been reviewed on the feature branch. This switches `select` calls to `Unixext.select` (which is implemented using `epoll`), and implements the few performance sensitive parts using epoll directly. It also enables some more tests with >1024 fds.
- Loading branch information
Showing
27 changed files
with
183 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,6 @@ | |
(re_export xenstore) | ||
(re_export xenstore_transport) | ||
threads.posix | ||
xapi-stdext-unix | ||
(re_export xenstore.unix)) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
BEGIN { n = 0; } | ||
# A function definition and its address | ||
# Remember its address and update current symbol | ||
# 0000000000850330 <unix_select>: | ||
match($0, /^0*([0-9a-fA-F]+) <([^>]+)>/, symdef) { | ||
SYMBOL = symdef[2]; | ||
ADDR = symdef[1]; | ||
|
||
SYMADDR[ADDR] = SYMBOL; | ||
|
||
if (ADDR in LOADED) { | ||
for (idx in LOADED[ADDR]) { | ||
caller = LOADED[ADDR][idx] | ||
CALLS[symdef[2]][n++] = caller | ||
} | ||
} | ||
} | ||
|
||
# Indirect calls (mostly used for C stubs) | ||
# mov $0x850330,%rax | ||
# call 872834 <caml_c_call> | ||
match($0, /mov.*0x([0-9a-fA-F]*),/, addr) { | ||
# this will have gaps, but the indexes will be unique | ||
LOADED[addr[1]][n++] = SYMBOL | ||
} | ||
|
||
match($0, /call.*<([^>]+)>/, call) { | ||
CALLS[call[1]][n++] = SYMBOL | ||
} | ||
|
||
END { | ||
SYM = "unix_select" | ||
had_calls = 0 | ||
if (SYM in CALLS) { | ||
for (idx in CALLS[SYM]) { | ||
caller = CALLS[SYM][idx]; | ||
print "--" | ||
if (caller ~ /caml(Thread|Unix__fun_).*/) { | ||
# direct calls from these functions to unix_select are expected | ||
print caller "[expected]" | ||
} else { | ||
print caller "[bad]" | ||
had_calls++ | ||
} | ||
if (caller in CALLS) { | ||
for (idx2 in CALLS[caller]) { | ||
caller2 = CALLS[caller][idx2]; | ||
if (caller2 ~ /caml(Thread).*/) { | ||
print caller2 "[expected]" | ||
} else { | ||
print caller2 "[bad]" | ||
had_calls++ | ||
} | ||
if (caller2 in CALLS) { | ||
for (idx3 in CALLS[caller2]) { | ||
caller3 = CALLS[caller2][idx3]; | ||
# but we don't expect anyone calling these functions from OCaml code, | ||
# reject that | ||
had_calls++ | ||
print caller3 "[bad]" | ||
if (caller3 in CALLS) { | ||
for (idx4 in CALLS[caller3]) { | ||
caller4 = CALLS[caller3][idx4]; | ||
print caller4 "[bad]" | ||
for (idx5 in CALLS[caller4]) { | ||
caller5 = CALLS[caller4][idx5]; | ||
print caller5 "[bad]" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
if (had_calls > 0) { | ||
exit 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ | |
xapi-open-uri | ||
xapi-stdext-pervasives | ||
xapi-stdext-threads | ||
xapi-stdext-unix | ||
xapi-inventory | ||
xmlm | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
safe-resources | ||
xapi-consts | ||
xapi-log | ||
xapi-stdext-unix | ||
) | ||
) | ||
|
Oops, something went wrong.