New release: 1.5.1
Linux x86_64 dynamic binary:http://ck.kolivas.org/apps/cgminer/cgminer-1.5.1-x86_64-built.tar.bz2
This release is almost entirely bugfixes. Some minor, some major. I'm trying now to settle down to a solid stable release because I'll be leaving for a couple of weeks shortly and don't want to leave with code in a state of flux. See my kernel blog for a little more detail:http://ck-hack.blogspot.com
The changes in this one were to improve dramatically the CPU mining splitting of work between threads to minimise the risk of generating stale or repeated work and to get a much work as possible out of it. This is done by using the original work item as a kind of "master DNA" where the extra work is copied from it, and the original work is flagged and pushed back to the top of the list of work to be done (so it doesn't sit around too long before being picked up). Also I've fixed the longstanding bug where it would crash on decreasing the size of the window on older operating systems (this was actually a libncurses bug and I've worked around it). There were some other bugs where it was possible where a hung GPU could take out the whole of cgminer because the thread restart code wouldn't restart properly. Also there was a very slight chance it would simply stop taking work after a longpoll. Also I tried to detect the version of libcurl it is being compiled against to prevent build failure (but as you can see in this forum, some older versions of libcurl still fail??). I improved the display options menu and fixed the invisible menu bug and did lots of other things... short changelog below.
- Two redraws in a row cause a crash in old libncurses so just do one redraw
using the main window.
- Don't adjust hash_div only up for GPUs. Disable hash_div adjustment for GPUs.
- Only free the thread structures if the thread still exists.
- 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.
- 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.
- Sanity check to prove locking.
- Don't take more than one lock at a time.
- Make threads report out when they're queueing a request and report if they've
- Make cpu mining work submission asynchronous as well.
- 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
- Do away with queueing work separately at the start and let each thread grab
its own work as soon as it's ready.
- Don't put an extra work item in the queue as each new device thread will do so
- Make sure to decrease queued count if we discard the work.
- Attribute split work as local work generation.
- 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.
- 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.
- Make the display options clearer.
- Add debugging output to tq_push calls.
- Add debugging output to all tq_pop calls.