merged RC_1_1 into master

This commit is contained in:
arvidn 2018-06-24 16:52:46 +02:00
commit b67166b29d
4 changed files with 33 additions and 3 deletions

View File

@ -85,6 +85,7 @@
* resume data no longer has timestamps of files
* require C++11 to build libtorrent
* coalesce reads and writes by default on windows
* fixed disk I/O performance of checking hashes and creating torrents
* fix race condition in part_file
* fix part_file open mode compatibility test

View File

@ -296,11 +296,11 @@ namespace {
settings_pack sett;
sett.set_int(settings_pack::cache_size, 0);
sett.set_int(settings_pack::aio_threads, 1);
sett.set_int(settings_pack::aio_threads, 3);
disk_thread.set_settings(&sett);
int const piece_read_ahead = std::max(1, 15 * 1024 * 1024 / t.piece_length());
int const piece_read_ahead = std::max(6, 16 * 1024 * 1024 / t.piece_length());
hash_state st = { t, std::move(storage), disk_thread, piece_index_t(0), piece_index_t(0), f, ec };
for (piece_index_t i(0); i < piece_index_t(piece_read_ahead); ++i)

View File

@ -141,8 +141,17 @@ constexpr int CLOSE_FILE_INTERVAL = 0;
SET(use_read_cache, true, nullptr),
DEPRECATED_SET(use_write_cache, true, nullptr),
DEPRECATED_SET(dont_flush_write_cache, false, nullptr),
#ifdef TORRENT_WINDOWS
// the emulation of preadv/pwritev uses overlapped reads/writes to be able
// to issue them all back to back. However, it appears windows fail to
// merge them. At least for people reporting performance issues in
// qBittorrent
SET(coalesce_reads, true, nullptr),
SET(coalesce_writes, true, nullptr),
#else
SET(coalesce_reads, false, nullptr),
SET(coalesce_writes, false, nullptr),
#endif
SET(auto_manage_prefer_seeds, false, nullptr),
SET(dont_count_slow_torrents, true, &session_impl::update_count_slow),
SET(close_redundant_connections, true, nullptr),
@ -306,7 +315,7 @@ constexpr int CLOSE_FILE_INTERVAL = 0;
SET(alert_queue_size, 1000, &session_impl::update_alert_queue_size),
SET(max_metadata_size, 3 * 1024 * 10240, nullptr),
DEPRECATED_SET(hashing_threads, 1, nullptr),
SET(checking_mem_usage, 256, nullptr),
SET(checking_mem_usage, 1024, nullptr),
SET(predictive_piece_announce, 0, nullptr),
SET(aio_threads, 4, &session_impl::update_disk_threads),
SET(aio_max, 300, nullptr),

View File

@ -494,6 +494,26 @@ TORRENT_TEST(coalesce_writes)
cleanup();
}
TORRENT_TEST(no_coalesce_reads)
{
using namespace libtorrent;
settings_pack p;
p.set_int(settings_pack::read_cache_line_size, 16);
p.set_bool(settings_pack::coalesce_reads, false);
test_transfer(0, p);
cleanup();
}
TORRENT_TEST(no_coalesce_writes)
{
using namespace libtorrent;
settings_pack p;
p.set_bool(settings_pack::coalesce_writes, false);
test_transfer(0, p);
cleanup();
}
TORRENT_TEST(allocate)
{