Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rhizome parallelization #68

Open
wants to merge 30 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c4059d8
Multiple fdqueues support
rom1v Aug 11, 2013
8df0508
Interruptible poll()
rom1v Aug 11, 2013
dc24c03
Log fd workaround
rom1v Aug 11, 2013
794c33c
Parallel tools
rom1v Aug 11, 2013
1d6833d
Performance_timing multithreading support
rom1v Aug 11, 2013
673e8f4
Multithread flag
rom1v Aug 11, 2013
6feece1
Enable multithreading for overlay mode
rom1v Aug 11, 2013
33fb316
Alarm for overlay_mdp_dispatch
rom1v Aug 11, 2013
9438858
Alarm for overlay_payload_enqueue
rom1v Aug 11, 2013
35f9946
Alarm for overlay_rhizome_saw_advertisements
rom1v Aug 11, 2013
a0a1bf8
Schedule saw_adv in process_incoming_frame
rom1v Aug 11, 2013
e4add02
Use Rhizome fdqueue for some Rhizome stuff
rom1v Aug 11, 2013
20cb8b7
Schedule mdp_dispatch in mdp_requestblocks
rom1v Aug 11, 2013
d1a05c2
Schedule mdp_dispatch in rhizome_saw_adv
rom1v Aug 11, 2013
32226fc
Schedule payload_enqueue in rhizome_advertise
rom1v Aug 11, 2013
f6c09c8
Schedule mdp_dispatch in rhizome_sync_request
rom1v Aug 11, 2013
8fa954e
Schedule mdp_dispatch in rhizome_sync_send_req
rom1v Aug 11, 2013
ceddfc2
Schedule mdp_dispatch in sync_send_response
rom1v Aug 11, 2013
c6eb967
Alarm for rhizome_received_content
rom1v Aug 11, 2013
bf0b316
Schedule receive_content in service_rhizome_resp
rom1v Aug 11, 2013
f519889
Alarm for rhizome_mdp_send_block
rom1v Aug 11, 2013
175213b
Schedule mdp_send_block in service_rhizomerequest
rom1v Aug 11, 2013
b0e01d2
Schedule mdp_dispatch in mdp_send_block
rom1v Aug 11, 2013
95c09fe
Alarm for rhizome_advertise_manifest
rom1v Aug 11, 2013
dcb27f4
Extract retrieve+advertise manifest function
rom1v Aug 11, 2013
db8e7c6
Alarm for rhizome_retrieve_and_advertise_manifest
rom1v Aug 11, 2013
804d999
Schedule rhizome_retr_adv in service_manifest_resp
rom1v Aug 11, 2013
a18afde
Alarm for rhizome_sync_send_requests
rom1v Aug 11, 2013
285ed16
Schedule sync_send_req in service_rhizome_sync
rom1v Aug 11, 2013
13473de
More thread assertions
rom1v Aug 11, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions commandline.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,17 +220,19 @@ JNIEXPORT jint JNICALL Java_org_servalproject_servald_ServalD_rawCommand(JNIEnv
*/
int parseCommandLine(struct cli_context *context, const char *argv0, int argc, const char *const *args)
{
fd_clearstats();
fd_clearstats(current_fdqueue());
IN();

struct cli_parsed parsed;
int result = cli_parse(argc, args, command_line_options, &parsed);
switch (result) {
case 0:
// Do not run the command if the configuration does not load ok.
if (((parsed.commands[parsed.cmdi].flags & CLIFLAG_PERMISSIVE_CONFIG) ? cf_reload_permissive() : cf_reload()) != -1)
if (((parsed.commands[parsed.cmdi].flags & CLIFLAG_PERMISSIVE_CONFIG) ? cf_reload_permissive() : cf_reload()) != -1) {
fdqueues_init();
result = cli_invoke(&parsed, context);
else {
fdqueues_free();
} else {
strbuf b = strbuf_alloca(160);
strbuf_append_argv(b, argc, args);
result = WHYF("configuration defective, not running command: %s", strbuf_str(b));
Expand All @@ -253,8 +255,12 @@ int parseCommandLine(struct cli_context *context, const char *argv0, int argc, c
rhizome_close_db();
OUT();

if (config.debug.timing)
fd_showstats();
if (config.debug.timing) {
INFO("Main thread stats:");
fd_showstats(&main_fdqueue);
INFO("Rhizome thread stats:");
fd_showstats(&rhizome_fdqueue);
}
return result;
}

Expand Down
Loading