Commit Graph

23 Commits

Author SHA1 Message Date
David Anderson 17a4ab8db9 David 11 Dec 2012
- Win process control (affects API and wrapper):
		Since Win doesn't have an API for process suspend/resume,
		we were suspending processes by
			1) enumerating all the threads in the system (typically several thousand)
			2) suspending those belonging to the given process
		The problem: for each thread, the code was calling a function
		in diagnostics_win.cpp to see if the thread was exempted from suspension.
		This check (which is unnecessary anyway if we're suspending another process)
		was surrounded by a semaphore acquire/release.
		The result: performance problems.
		It could take a minute to suspend the threads.
		Solution:
			1) do the check for exemption only if we're suspending threads
				in our own process (i.e. from the API)
			2) if we're suspending multiple processes, enumerate the threads
				only once, and see if each one belongs to any of the processes
			3) have the wrapper elevate itself to normal priority.
				Otherwise it can get preempted for long periods,
				sometimes in the middle of scanning the threads.
		Note: post-9x versions of Win have a process group API that includes suspend/resume.
		We'll switch to this soon.
2013-03-04 17:02:40 +01:00
David Anderson 1174b00aba - client/manager: tweaks to Intel GPU code 2013-03-04 15:27:25 +01:00
David Anderson ce47010dbb - client: if <dont_check_file_sizes> is set, don't check file existence at startup
- wrapper: open files in shared mode so you can look at them while wrapper is running
2013-03-04 15:23:37 +01:00
David Anderson 53782b7de4 - lib: switch include order to the way it was (general to specific).
Should fix MinGW compile


svn path=/trunk/boinc/; revision=26008
2012-08-11 05:47:18 +00:00
David Anderson 405f567c81 - code cleanup: in foo.cpp, include foo.h first
svn path=/trunk/boinc/; revision=25933
2012-08-01 20:04:05 +00:00
David Anderson 9a77dcc71f - wrapper: fix bug that reported wildly wrong CPU time
svn path=/trunk/boinc/; revision=25457
2012-03-19 20:42:03 +00:00
David Anderson 64210d0420 - fix last checkin
svn path=/trunk/boinc/; revision=25456
2012-03-19 20:26:48 +00:00
David Anderson 3782dca107 - client: Don't include VBox executive processes as non-BOINC CPU time.
On some systems they use significant CPU time while VMs are running.
    TODO: do this only if we're actually running a VBox app


svn path=/trunk/boinc/; revision=25455
2012-03-19 20:13:28 +00:00
David Anderson 7a84593e23 - client: fixed a bug in procinfo_app() that would cause processes
to be treated as non-BOINC when they actually are,
		thus falsely triggering CPU-busy suspensions

svn path=/trunk/boinc/; revision=25223
2012-02-09 00:54:05 +00:00
David Anderson 4111916c4f - wrapper: measure CPU time of app's process tree,
not just the top-level process
- wrapper: handle fraction-done files correctly


svn path=/trunk/boinc/; revision=24664
2011-11-29 15:06:08 +00:00
David Anderson 53133f126d - client: with VBox on Win, the process graph sometimes has cycles.
Not sure where this comes from.
    But avoid infinite recursion when traversing descendants.


svn path=/trunk/boinc/; revision=24230
2011-09-16 22:22:45 +00:00
David Anderson 11a5372961 - client: escape URLs for curl, otherwise filenames with spaces don't work
svn path=/trunk/boinc/; revision=24204
2011-09-14 05:44:09 +00:00
David Anderson 74c77c865a - client: fixes to the above
- client: prevent infinite recursion (and stack overflow)
        in procinfo.cpp:add_child_totals().
        Not sure how this could happen.

svn path=/trunk/boinc/; revision=24191
2011-09-13 23:57:44 +00:00
David Anderson 4e946854c1 - client/API/vboxwrapper:
add a mechanism so that apps can report sub-processes
    that are not descendants (e.g., virtual machines)
    These processes are then counted as part of the app,
    not as "non-BOINC CPU time".
    This fixes a bug where processing was incorrectly suspended
    because CPU usage by VM apps exceeded the "CPU usage limit" pref.

    Implementation:
    - the PIDs of the processes in question
        are passed from app to client via shared-memory,
        in the app_status channel.
        A new variant of boinc_report_app_status() supports this.
    - the VBox wrapper queries the PID of the VM,
        and reports it in this way.
    - procinfo_app() includes a new argument: a list of PIDs
        that are part of the app, although not ancestrally
        related to the main process.
    - in the client, ACTIVE_TASK now includes a vector "other_pids".
        If this is nonempty, it's passed to procinfo_app().


svn path=/trunk/boinc/; revision=24123
2011-09-02 20:47:05 +00:00
David Anderson 8ad9d7d98b - more code shuffling:
proc_control: controlling processes
    procinfo: enumerating and querying processes
    run_app_windows: launching apps as other users on Win


svn path=/trunk/boinc/; revision=24120
2011-09-02 18:23:13 +00:00
David Anderson b16f603a8a - client (and API and manager): change the data structure
used for system process info
    Old: vector of PROCINFO.
        Descendants of a process were found by recursively
        iterating through the vector.
        Operations are O(n)
    New: map of (id, PROCINFO),
        and each PROCINFO has a vector of its children.
        Operations are O(log(n))
    Also combined Mac/Win/Linux variants of code that
    was essentially the same.


svn path=/trunk/boinc/; revision=24117
2011-09-02 17:45:29 +00:00
David Anderson f3b9286d78 - client: fix bug in get_descendants(),
which prevented the client from cleaning up
    subprocesses of misbehaving multiprocess apps.
- remote job submission system:
    assign physical names to input files (based on their MD5)
    rather than having the user provide physical names
- VM apps: eliminate vbox64 plan class.  Only vbox.


svn path=/trunk/boinc/; revision=23923
2011-08-03 16:45:00 +00:00
David Anderson bddd0d45db Win compile fixes
svn path=/trunk/boinc/; revision=23370
2011-04-14 22:48:04 +00:00
David Anderson 7cb3400459 - API: add support for multi-process apps,
i.e. those that create subprocesses.
    Previously, the client's job control options (suspend/resume/quit)
    would not work for subprocesses.
    Multiprocess apps must initialize with something like:
        BOINC_OPTIONS options;
        boinc_options_defaults(options);
        options.multi_process = true;
        boinc_init_options(&options);
    Note: an application can be both multi-thread and multi-process.
    In this case set options.multi_thread as well.
- wrapper: add support for multi-process apps.
    Previously, suspend/resume operations did not work for subprocesses.
    If a task is multi-process, you must include
        <multi_process>1</multi_process>
    in its descriptor.


svn path=/trunk/boinc/; revision=23369
2011-04-14 22:25:38 +00:00
David Anderson a7828abdda - scheduler: removed unused destructors in COPROC that
caused scheduler to crash (not sure why)


svn path=/trunk/boinc/; revision=23312
2011-04-01 21:21:11 +00:00
Rom Walton 1f8208ad1e - lib: Fix build break for Linux.
lib/
        procinfo.cpp

svn path=/trunk/boinc/; revision=23306
2011-04-01 01:49:54 +00:00
Charlie Fenton 1359af5dc5 Mac: Fix compile error; add new procinfo.cpp to XCode Project
svn path=/trunk/boinc/; revision=23092
2011-02-23 01:08:57 +00:00
David Anderson 1d1bc5d0e8 svn path=/trunk/boinc/; revision=23087 2011-02-23 00:28:52 +00:00