Commit Graph

237 Commits

Author SHA1 Message Date
arvidn 3ff89f29d7 remove explicit ticking of storage from the torrent. instead make the disk_io_thread do it automatically 2016-11-06 10:26:10 -05:00
arvidn c72053a75c remove unused clear_read_cache function 2016-11-05 21:39:45 -04:00
Arvid Norberg 09cbd0a51d remove deprecated disk_io_thread operations (#1284) 2016-11-02 01:01:27 -04:00
Arvid Norberg b61ebca14a moved async-load-torrent feature out of disk-io-thread (#1282)
moved async-load-torrent feature out of disk-io-thread into a generic worker thread
2016-11-02 01:01:04 -04:00
Arvid Norberg 1c2a8fb96e move coalescing of reclaim block from disk_io_thread to session_impl (#1281) 2016-10-31 23:48:30 -04:00
Arvid Norberg 8daa200d11 simplify interaction with disk_io_thread by removing the uncork interface (#1271)
simplify the interaction with the disk_io_thread by removing the uncork interface. This should be turned into a transparent part of peer_connection instead and remove cork logic from peer_connection
2016-10-30 18:21:07 -04:00
Steven Siloti f5366bd816 use span for scatter/gather lists (#1260)
use span for gather/scatter buffers. remove explicit size parameter from file_op
2016-10-26 20:40:56 -04:00
Alden Torres 8bdbaec872 minor cleanup refactor (#1252) 2016-10-24 20:19:01 -04:00
Arvid Norberg 6148984426 remove whitespace at end of line (#1245) 2016-10-22 11:47:24 -04:00
Arvid Norberg 524f7b1c27 fix error handling by exercising code paths where memory allocations fail (#1221)
fix error handling by exercising code paths where memory allocations fail
2016-10-19 01:18:05 -04:00
Arvid Norberg cebd976cc2 fix error_code vs. error_condition traits (#1169)
fix error_code vs. error_condition traits. deprecate get_*_category(), instead use *_category()
2016-10-02 12:27:50 -07:00
Alden Torres 585a760588 headers cleanup (#1054)
headers cleanup
2016-09-01 15:04:58 -04:00
Alden Torres bf0008933a refactor to use std::shared_ptr with peer_connection, core and tests (#1050) 2016-08-31 21:42:18 -04:00
arvidn 8c8c3d5587 replace boost::function with std::function 2016-08-13 07:07:26 -04:00
Arvid Norberg 31b2a03005 some optimizations (#858)
allow disk I/O callback objects to be moved into disk io jobs
2016-06-27 01:02:00 -04:00
Steven Siloti f1585d8317 Fix abort_jobs being called multiple times (#831)
disk_io_thread::abort_jobs must only be called once, but it was possible for
concurrent calls to be made from abort() and thread_fun() if the max threads
had been set to zero but there were still disk I/O threads running.
m_num_running_threads doesn't need to be atomic anymore
2016-06-18 16:53:23 -04:00
Arvid Norberg ed077c8358 use cstdint intead of boost/cstdint.hpp (#833)
use cstdint intead of boost/cstdint.hpp
2016-06-18 14:01:38 -04:00
Arvid Norberg 4d927f4029 modernize disk_buffer_holder to be move-only (#824)
modernize disk_buffer_holder to be move-only
2016-06-16 08:24:41 -04:00
Steven Siloti 2fed4103f8 scalable thread pool (#770) 2016-06-15 20:49:28 -04:00
Arvid Norberg 770afadcda use std::atomic instead of boost::atomic (#678)
use std::atomic instead of boost::atomic
2016-05-01 03:38:35 -04:00
Arvid Norberg 20b41ad0b9 Threads (#671)
use std::thread, std::mutex, std::condition_variable instead of pulling them in from boost.asio internals.
2016-04-30 18:54:23 -04:00
Arvid Norberg 4e97bf556c use override and final keywords (unconditionally) (#668)
use override and final keywords instead of macros.
2016-04-30 11:05:54 -04:00
arvidn 867b83ccda merged RC_1_1 into master 2016-04-08 02:20:24 -04:00
arvidn 31805ecec0 fix some clang build warnings 2016-04-02 12:27:42 -04:00
arvidn 96e2693d13 merge RC_1_1 into master 2016-03-19 16:02:46 -04:00
arvidn f7c9062019 deprecate more parts of explicit cache as well as fixing typos of TORRENT_NO_DEPRECATE preprocessor tests 2016-03-19 07:54:29 -04:00
arvidn 77ce318a84 merged RC_1_1 into master 2016-03-17 00:46:05 -04:00
arvidn 317eb2fe2a remove unused disk allocation code 2016-03-16 20:13:28 -04:00
arvidn f79a9c7adf merged RC_1_1 into master 2016-03-16 19:59:53 -04:00
arvidn 08bac479be allow each peer have at least 2 allocated disk blocks at any given time, to avoid stalling when cache_size setting is small. also deprecate use_write_cache 2016-03-16 00:28:11 -04:00
Steven Siloti 4331f57021 restrict check_cache_level to only runing on one thread at a time
If another thread trys to call check_cache_level then m_cache_check_state is set
to indicate that the thread currently in check_cache_level needs to call it again.
2016-03-14 19:03:12 -07:00
arvidn 921cbeebed add option to delete just the partfile when removing a torrent 2016-03-14 08:26:39 -04:00
arvidn 8135ea326f rename async_check_fastresume to async_check_files, and make it take an add_torrent_params object instead of bencoded resume data 2016-02-20 02:00:07 -05:00
arvidn ae7058e119 remove the timestamps and file sizes from the resume data. This makes saving resume data alot cheaper, since it doesn't have to go via the disk thread. It also removes an old-standing API usage issue where there was easily a race condition introduced between saving resume data and pausing a torrent. 2016-02-06 15:50:55 -05:00
arvidn 1f9f588e75 merge copyright year update and changelog from RC_1_0 2016-01-17 18:57:46 -05:00
arvidn ffa870d280 fixed some GCC warnings 2015-08-20 01:33:20 +02:00
arvidn bd177a857f make tailequeue a template, introduce type safety, remove old-style casts 2015-08-19 15:22:05 +02:00
arvidn 2739def57f minor cleanups. use libtorrent typedefs for asio. failing to bind IPv6 UDP socket is no longer fatal. removed some redundant listen_failed_alerts 2015-07-11 23:01:27 -04:00
arvidn 5cb095f6d2 support using 0 disk threads (to perform disk I/O in network thread) 2015-06-14 16:00:04 -04:00
Arvid Norberg d43f7b56a2 update copyright year 2015-06-03 05:18:48 +00:00
Arvid Norberg 9b0313bd8e hold settings_pack by shared_ptr when passing it across thread boundaries. don't allocate it on the heap redundantly 2015-05-29 05:27:53 +00:00
Arvid Norberg 051ca6b22c fix warnings 2015-05-18 05:32:18 +00:00
Arvid Norberg c19c6b2cc1 fix some warnings 2015-04-24 05:37:17 +00:00
Arvid Norberg 3951377d95 fix include paths for warning push and pop headers 2015-04-21 01:16:28 +00:00
Arvid Norberg 21751347bc more warnings fixes and cleanup 2015-04-19 06:28:21 +00:00
Arvid Norberg 51e86ca2d5 more warning fixes and cleanup 2015-04-18 22:00:27 +00:00
Arvid Norberg 013ed36f09 landed alert_queue feature branch into trunk 2015-04-03 20:15:48 +00:00
Arvid Norberg ccc7e45406 landed mutable torrents branch in trunk 2015-03-21 00:12:40 +00:00
Arvid Norberg 6c1df7eb55 landed the bdecode branch in master. lazy_bdecode/lazy_entry is now being replaced by bdecode/bdecode_node 2015-03-12 05:20:12 +00:00
Arvid Norberg c1dc982f4f deprecate the ptime type and related time types. just use boost::chrono / std::chrono 2015-03-12 04:34:54 +00:00
Arvid Norberg 1ed1963f29 remove size_type typedef in favor of boost::int64_t 2014-12-03 04:32:50 +00:00
Arvid Norberg 935eea9d0b some more fixes to cache_status 2014-10-25 21:28:57 +00:00
Arvid Norberg 83394f54f9 transition fenced job histogram to session stats gauges. deprecate it from cache_status 2014-10-25 20:59:54 +00:00
Arvid Norberg 0bcbe433ed deprecate most of cache_status type (use session stats instead) 2014-10-25 20:07:50 +00:00
Arvid Norberg c60ceacb71 switch over to use boost.atomic instead of home-built one 2014-08-01 07:32:54 +00:00
Arvid Norberg f32f5e96aa deprecate parts of cache_status and move those counters to session_stats counters. make the performance counters thread safe. fix some issues recently introduced to performance counters and the usage of them in client_test 2014-08-01 06:07:48 +00:00
Arvid Norberg 30713a4a79 remove buffer stats debugging feature 2014-07-19 08:20:20 +00:00
Arvid Norberg 7351389ce8 land libtorrent_aio branch in trunk 2014-07-06 19:18:00 +00:00
Arvid Norberg a0a41b6c5e merged file priority fix from RC_0_16 and keep the disk thread's file priorities up to date 2014-02-28 10:19:29 +00:00
Arvid Norberg a943fec777 update copyright 2014-02-23 19:12:25 +00:00
Arvid Norberg e780f5240f fix typo 2014-02-13 07:28:48 +00:00
Arvid Norberg 6597eaf09a there doesn't seem to be any point in exporting piece_block_progress, so don't do that. Introduce magic number check in disk_io_thread (mysterious crash/corruption happens in storage unit test on mac, but not very often and hard to reproduce). 2014-02-03 01:55:26 +00:00
Arvid Norberg e0644ce8f5 invariant check macro fixes 2014-01-21 19:26:09 +00:00
Arvid Norberg 4e6b1cfbfb update copyright 2013-12-25 17:07:16 +00:00
Arvid Norberg e67312e683 don't use bitfield for disk_io_job::action 2013-12-05 23:06:09 +00:00
Arvid Norberg 629baa3622 reorder some structs to reduce padding 2013-11-26 02:00:02 +00:00
Arvid Norberg c45027d9ed moved plugin documentation into the source code and removed libtorrent_plugins.rst 2013-11-20 18:02:48 +00:00
Arvid Norberg d120dc1bc4 documentation 2013-11-19 17:57:16 +00:00
Arvid Norberg a3d56671fe fix reference documentation generation 2013-08-04 09:02:19 +00:00
Arvid Norberg eb6a964463 moved more documentation into header files 2013-07-21 05:05:21 +00:00
Arvid Norberg 982a14c2e9 extend move_storage functionality to have more flexible behavior 2013-05-09 02:50:16 +00:00
Arvid Norberg a0caa0f4b2 disable invariant_check functions when invariant checks are disabled 2013-02-25 04:13:46 +00:00
Arvid Norberg e45c71dd30 merged sparse file fix from RC_0_16 2013-02-16 08:26:55 +00:00
Arvid Norberg bff648a89e update copyright dates and add tool to do so 2012-10-02 03:16:33 +00:00
Arvid Norberg a5a9006014 merged fixes from RC_0_16 into trunk 2012-04-07 00:35:25 +00:00
Arvid Norberg 9024209d51 merged set_settings race condition fix into trunk 2012-04-06 03:02:50 +00:00
Arvid Norberg a2521bd23c fix a bunch of issues to properly support dynamic linking of libtorrent with visibility=hidden. Still requires a small patch to boost 2012-03-18 23:31:04 +00:00
Arvid Norberg 85ef2528c6 serve cache hits without a round-trip to the disk thread for improved seeding performance 2011-11-16 07:09:12 +00:00
Arvid Norberg b430152174 post disk job completions in batches to save CPU in the network thread 2011-10-19 05:46:49 +00:00
Arvid Norberg f6b6b57c0e fix avoid-readback cache algorithm 2011-09-27 04:05:05 +00:00
Arvid Norberg bc2f0c8c5e move disk_buffer_pool out to its own file 2011-07-31 02:24:36 +00:00
Arvid Norberg 209b9e4186 make disk timing be average over the last second. fixed some other bugs in previous changes 2011-06-26 19:45:33 +00:00
Arvid Norberg a73960aa5a support release asserts 2011-05-08 09:04:59 +00:00
Arvid Norberg 74ccff22be use a deque instead of list for disk io jobs queue 2011-03-28 06:01:24 +00:00
Arvid Norberg 3d63cb98b7 log read job queue size 2011-03-20 09:04:03 +00:00
Arvid Norberg e4df633157 added another disk cache flush algorithm to minimize readback when hashing pieces 2011-03-20 05:47:27 +00:00
Arvid Norberg 1b6227ad31 report disk read-back when verifying piece hashes 2011-03-20 01:19:14 +00:00
Arvid Norberg c015e28792 more disk thread timing 2011-03-19 22:23:58 +00:00
Arvid Norberg 782bc974a1 log average disk job time instead of cache time 2011-03-18 03:07:10 +00:00
Arvid Norberg 6db11079c8 add performance warning when disk write queue exceeds half of the write cache size 2011-03-16 07:45:51 +00:00
Arvid Norberg 7e3f69ecbf optimized disk cache flushing a bit 2011-03-16 07:21:58 +00:00
Arvid Norberg d6fbff13df measure disk sort time (phys_offset) 2011-03-15 02:21:28 +00:00
Arvid Norberg 7dde47b98a measure disk cache flush times 2011-03-15 01:44:32 +00:00
Arvid Norberg a08bcf7459 change semantics of disk read time and add disk hash time 2011-03-14 05:21:46 +00:00
Arvid Norberg c0253d9977 increase averaging window for disk I/O timing measurements 2011-03-13 10:09:20 +00:00
Arvid Norberg 03a7442532 add disk cache stats to session stats 2011-03-11 07:37:12 +00:00
Arvid Norberg 97a40a45cd fully support unbuffered I/O 2011-02-22 02:53:26 +00:00
Arvid Norberg 141ada013f fixed a whole bunch of build warnings on gcc and msvc, along with some fixes discovered along the way 2011-02-21 05:24:41 +00:00
Arvid Norberg 8bb71da401 disk write queue watermark fix 2011-02-13 22:27:02 +00:00
Arvid Norberg 4ed6b1a067 introduce a low watermark for disk io blocking connections 2011-02-04 03:02:23 +00:00