main.c


Log

Author Commit Date CI Message
Con Kolivas 62521f3e 2011-07-30T10:16:03 Send threads message to stop and then send cancel message but don't pthread_join them if they're stuck nor reinit the opencl code to not hang everything.
Con Kolivas b2cbaa1a 2011-07-30T08:21:17 Send a hung device a command. If it returns, try to reinitialise it.
Con Kolivas a702f599 2011-07-30T02:31:29 Disable the reinit_thread option till we know it actually works.
Con Kolivas bb575a55 2011-07-30T02:16:29 Reference correct GPU and only try to restart if it reaches DEAD.
Con Kolivas 947a74bf 2011-07-30T01:23:17 Differentiate thread failure from GPU failure by declaring a GPU sick first and trying to restart the thread without re-initialising the card. If that fails, then try once more at ten minutes and declare it dead. This should prevent an attempted re-initialising of the GPU from taking out other GPUs.
Con Kolivas 20ce1ebf 2011-07-29T20:40:57 Typo.
Con Kolivas 38037606 2011-07-29T11:11:42 Reimplement the per-thread getwork count with proper accounting at get_work().
Con Kolivas 0fe22d8d 2011-07-29T11:02:47 Revert "Only update the thread getwork queue count if it actually results in a getwork request from the server." This reverts commit 2e607d44f2baa8e8f1156e7bd074128e1e0e8eeb. The count looks far too difficult to add up with this change since many are queued generically.
Con Kolivas 2e607d44 2011-07-29T10:39:58 Only update the thread getwork queue count if it actually results in a getwork request from the server.
Con Kolivas 5b9bfedd 2011-07-29T00:40:47 Display the correct current hash as per blockexplorer, truncated to 16 characters, with just the time.
Con Kolivas c94737ce 2011-07-28T12:44:50 Add http:// if it's not explicitly set for URL entries.
Con Kolivas f0fe82ea 2011-07-28T10:49:36 Some Intel HD graphics support the opencl commands but return errors since they don't support opencl. Don't fail with them, just provide a warning and disable GPU mining.
Con Kolivas 10fa821e 2011-07-28T10:46:28 Update utility and efficiency figures when displaying them.
Con Kolivas 0006eb2d 2011-07-28T10:36:48 Make the "quiet" mode still update the status and display errors, and add a new --real-quiet option which disables all output and can be set once while running.
Con Kolivas da06a348 2011-07-28T10:03:31 The work length in the miner thread gets smaller but doesn't get bigger if it's under 1 second. This could end up leading to CPU under-utilisation and lower and lower hash rates. Fix it by increasing work length if it drops under 1 second.
Con Kolivas a0924933 2011-07-28T09:59:18 Restarting a hung GPU can hang the rest of the GPUs so just declare it dead and provide the information in the status.
Con Kolivas 45faff2e 2011-07-27T22:28:41 Add debugging output to all tq_pop calls.
Con Kolivas 2e2b2ba1 2011-07-27T22:20:57 Add debugging output to tq_push calls.
Con Kolivas 70fa8f31 2011-07-27T21:58:08 Make the display options clearer.
Con Kolivas c7978f11 2011-07-27T20:40:06 Dividing work is like the work is never removed at all so treat it as such. However the queued bool needs to be reset to ensure we *can* request more work even if we didn't initially.
Con Kolivas e82e3902 2011-07-27T16:40:52 If work has been cloned it is already at the head of the list and when being reinserted into the queue it should be placed back at the head of the list.
Con Kolivas 9c12d496 2011-07-27T16:29:37 Attribute split work as local work generation.
Con Kolivas 720032da 2011-07-27T15:11:57 Make sure to decrease queued count if we discard the work.
Con Kolivas 967acd39 2011-07-27T15:06:04 Don't put an extra work item in the queue as each new device thread will do so itself.
Con Kolivas 82698fbf 2011-07-27T15:01:08 Do away with queueing work separately at the start and let each thread grab its own work as soon as it's ready.
Con Kolivas 6cc8d22b 2011-07-27T14:53:43 Properly detect stale work based on time from staging and discard instead of handing on, but be more lax about how long work can be divided for up to the scantime.
Con Kolivas 45d54357 2011-07-27T14:29:51 Make cpu mining work submission asynchronous as well.
Con Kolivas 380d145c 2011-07-27T14:03:01 Make threads report out when they're queueing a request and report if they've failed.
Con Kolivas 324dd93b 2011-07-27T10:36:16 Don't take more than one lock at a time.
Con Kolivas 98f609b5 2011-07-27T10:31:44 Sanity check to prove locking.
Con Kolivas c7284028 2011-07-27T10:00:58 Abstract out the decay time function and use it to make hash_div a rolling average so it doesn't change too abruptly and divide work in chunks large enough to guarantee they won't overlap.
Con Kolivas a4889582 2011-07-27T09:41:52 Update both windows separately, but not at the same time to prevent the double refresh crash that old libncurses has. Do the window resize check only when about to redraw the log window to minimise ncurses cpu usage.
Con Kolivas 6f905932 2011-07-27T08:32:25 Only free the thread structures if the thread still exists.
Con Kolivas 40bc82d4 2011-07-27T02:03:59 Don't adjust hash_div only up for GPUs. Disable hash_div adjustment for GPUs.
Con Kolivas 1aadfc58 2011-07-27T01:41:16 Two redraws in a row cause a crash in old libncurses so just do one redraw using the main window.
Con Kolivas 93b284db 2011-07-26T23:17:25 Best to serialise the restarting of threads to avoid device initialisation issues.
Con Kolivas d5d56920 2011-07-26T22:41:42 Off by one limit in device selection.
Con Kolivas f9bc3771 2011-07-26T21:40:11 The first work item is tricky so don't try and divide it up to begin with.
Con Kolivas 1536e085 2011-07-26T20:48:05 Increase efficiency of slow mining threads such as CPU miners dramatically. Do this by detecting which threads cannot complete searching a work item within the scantime and then divide up a work item into multiple smaller work items. Detect the age of the work items and if they've been cloned before to prevent doing the same work over. If the work is too old to be divided, then see if it can be time rolled and do that to generate work. This dramatically decreases the number of queued work items from a pool leading to higher overall efficiency (but the same hashrate and share submission rate).
Con Kolivas 7e7a5f77 2011-07-26T15:16:39 Don't request work too early for CPUs as CPUs will scan for the full opt_scantime anyway.
Con Kolivas 6045c4d1 2011-07-26T13:47:18 Simplify gpu management enable/disable/restart code.
Con Kolivas fa17f034 2011-07-26T11:58:45 Implement much more accurate rolling statistics per thread and per gpu and improve accuracy of rolling displayed values.
Con Kolivas ce6af968 2011-07-26T10:45:52 Make the rolling log-second average more accurate.
Con Kolivas 7707ed4d 2011-07-26T10:26:03 Add a menu to manage GPUs on the fly allowing you to enable/disable GPUs or try restarting them. Keep track of which GPUs are alive versus enabled. Start threads for devices that are even disabled, but don't allow them to start working.
Con Kolivas 7143c25b 2011-07-25T16:44:24 The last pool is when we are low in total_pools, not active_pools.
Con Kolivas a53716dc 2011-07-25T13:59:34 Fix compiler warnings.
Con Kolivas b3d20b57 2011-07-25T13:55:01 Make the thread restart do a pthread_join after disabling the device, only re-enabling it if we succeed in restarting the thread. Do this from a separate thread so as to not block any other code. This will allow cgminer to continue even if one GPU hangs.
Con Kolivas a187fe1e 2011-07-25T13:00:44 Try to do every curses manipulation under the curses lock.
Con Kolivas 508c5c4b 2011-07-24T12:07:44 Detect when the primary pool is lagging and start queueing requests on backup pools if possible before needing to roll work.
Con Kolivas afcff070 2011-07-24T11:25:23 Load balancing puts more into the current pool if there are disabled pools. Fix.
Con Kolivas 27c7d2a4 2011-07-24T10:59:19 Disable a GPU device should the thread fail to init.
Con Kolivas 9a928e34 2011-07-24T08:55:16 Fix possible dereference on blank inputs during input_pool.
Con Kolivas 1a789a40 2011-07-24T08:51:07 Defines missing would segfault on --help when no sse mining is built in.
Con Kolivas fd473afe 2011-07-24T08:44:14 Revert "Free up resources/stale compilers." This reverts commit b4960ec36bca6663ecb0853752d0d777d81f9df1. Didn't help and might have caused other issues.
Con Kolivas f3c5f554 2011-07-24T08:42:07 Only try to print the status of active devices.
Con Kolivas 020cf7d6 2011-07-23T16:19:51 Build support in for all SSE if possible and only set the default according to machine capabilities.
Con Kolivas 039a5ea7 2011-07-23T16:17:28 No need to make leaveok changes win32 only.
Ycros a150140e 2011-07-23T16:00:49 Merge branch 'cgminer' of git://github.com/ckolivas/cgminer into cgminer
Con Kolivas a9e1a255 2011-07-23T15:15:46 Make it possible to select the choice of kernel on the command line.
Con Kolivas 116a9dc0 2011-07-23T14:17:25 Update phatk kernel to one with new parameters for slightly less overhead again. Make the queue kernel parameters call a function pointer to select phatk or poclbm.
Con Kolivas b5358483 2011-07-23T09:37:22 Cannot print the status of threads that don't exist so just queue enough work for the number of mining threads to prevent crash with -Q N.
Ycros e615b61f 2011-07-23T02:26:07 Merge branch 'cgminer' of git://github.com/ckolivas/cgminer into cgminer
Ycros e04aee24 2011-07-23T02:25:54 Win32: Fix for mangled output on the terminal on exit.
Con Kolivas 8d4fbc32 2011-07-23T00:45:03 Clear log window from consistent place. No need for locking since logging is disabled during input.
Con Kolivas ba89a0a4 2011-07-23T00:33:01 Unlocking error on retry. Locking unnecessary anyway so remove it.
Con Kolivas f94ca32d 2011-07-22T23:53:24 Make sure intensity is carried over to thread count and is at least the minimum necessary to work.
Ycros d37c3fe5 2011-07-22T23:43:26 Win32 threading and longpoll keepalive fixes.
Con Kolivas e83a32a4 2011-07-22T23:37:50 Remove the mandatory work requirement at startup by testing for invalid work being passed which allows for work to be queued immediately. This also removes the requirement for resetting the timecodes at the start which caused huge over-estimates of hashing for a short period.
Con Kolivas 61e555e4 2011-07-22T22:22:14 Tell getwork how much of a work item we're likely to complete for future splitting up of work.
Con Kolivas 9e42d63c 2011-07-22T21:57:43 With huge variation in GPU performance, allow intensity to go from -10 to +10.
Con Kolivas 61e5cc10 2011-07-22T20:12:32 Extra refresh not required.
Con Kolivas ae6eb1b0 2011-07-22T20:07:15 Decrease testing log to info level.
Con Kolivas ec86da70 2011-07-22T20:06:06 Limit rolltime work generation to 10 iterations only.
Con Kolivas 6e9b6bf8 2011-07-22T17:46:28 Implement pool removal.
Con Kolivas 532587eb 2011-07-22T17:23:57 Set priority correctly on multipools. Display priority and alive/dead information in display_pools.
Con Kolivas 56defd6e 2011-07-22T17:02:29 Make it possible to enable/disable longpoll.
Con Kolivas 53529a84 2011-07-22T16:51:38 Abstract out the longpoll start and explicitly restart it on pool change.
Con Kolivas 62c8a8c1 2011-07-22T16:32:38 Allow scan settings to be modified at runtime.
Con Kolivas a8c84da4 2011-07-22T16:10:47 Allow log interval to be set in the menu.
Con Kolivas 2f976c74 2011-07-22T15:17:09 Make the input windows update immediately instead of needing a refresh.
Con Kolivas 0909facf 2011-07-22T15:00:57 Clean up the messy way the staging thread communicates with the longpoll thread to determine who found the block first.
Con Kolivas 0106c567 2011-07-22T14:29:48 Add a menu and separate out display options.
Con Kolivas 4bfa2809 2011-07-22T14:07:50 Display pool information on the fly as well.
Con Kolivas 75bf36ff 2011-07-22T13:58:06 Allow the pool strategy to be modified on the fly.
Con Kolivas cca6f49e 2011-07-22T12:39:32 Abstract out active pools count.
Con Kolivas 31a89445 2011-07-22T12:33:54 Tidy.
Con Kolivas ad53696f 2011-07-22T12:17:44 The longpoll blanking of the current_block data may not be happening before the work is converted and appears to be a detected block change. Blank the current block before submitting the work and stop passing the longpoll bool around.
Con Kolivas 44bcc322 2011-07-22T12:14:24 Display current pool management strategy to enable changing it on the fly.
Con Kolivas b534ad0a 2011-07-22T12:02:04 Only internally test for block changes when the work matches the current pool to prevent interleaved block change timing on multipools.
Con Kolivas b0a8f279 2011-07-22T11:46:26 Implement the ability to live add, enable, disable, and switch to pools.
Con Kolivas baddb82a 2011-07-22T07:50:20 Do one last check of the work before submitting it.
Con Kolivas 20336ea1 2011-07-21T15:15:38 Make input pool capable of bringing up pools while running.
Con Kolivas 7841486f 2011-07-21T14:41:12 Add a bool for explicit enabling/disabling of pools.
Con Kolivas 0bc95746 2011-07-21T14:29:33 Add pool option to input and display current pool status, pending code to allow live changes.
Con Kolivas ec06940c 2011-07-21T14:05:08 Add a thread that takes keyboard input and allow for quit, silent, debug, verbose, normal, rpc protocol debugging and clear screen options.
Con Kolivas b4f651f4 2011-07-21T13:26:18 Disable/enable echo & cbreak modes.
Con Kolivas 6fdbe014 2011-07-21T13:11:15 Remove the nil arguments check to allow starting without parameters.
Con Kolivas 9d60b107 2011-07-21T13:08:36 Abstract out a curses input function and separate input pool function to allow for live adding of pools later.
Con Kolivas 365c9009 2011-07-21T12:25:21 Make it possible to enter server credentials with curses input if none are specified on the command line.
Con Kolivas 2b7e5e58 2011-07-21T11:46:01 Enable curses earlier and exit with message in main for messages to not be lost in curses windows.