diff options
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/catalog/collection_compact.cpp | 1 | ||||
-rw-r--r-- | src/mongo/db/commands/touch.cpp | 1 | ||||
-rw-r--r-- | src/mongo/db/storage/mmap_v1/SConscript | 3 | ||||
-rw-r--r-- | src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp | 5 | ||||
-rw-r--r-- | src/mongo/db/storage/mmap_v1/record_store_v1_simple.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/storage/mmap_v1/touch_pages.cpp (renamed from src/mongo/util/touch_pages.cpp) | 3 | ||||
-rw-r--r-- | src/mongo/db/storage/mmap_v1/touch_pages.h (renamed from src/mongo/util/touch_pages.h) | 7 | ||||
-rw-r--r-- | src/mongo/util/SConscript | 1 |
8 files changed, 12 insertions, 11 deletions
diff --git a/src/mongo/db/catalog/collection_compact.cpp b/src/mongo/db/catalog/collection_compact.cpp index adce9262c28..4c64eb8f239 100644 --- a/src/mongo/db/catalog/collection_compact.cpp +++ b/src/mongo/db/catalog/collection_compact.cpp @@ -45,7 +45,6 @@ #include "mongo/db/index/index_descriptor.h" #include "mongo/db/operation_context.h" #include "mongo/util/log.h" -#include "mongo/util/touch_pages.h" namespace mongo { diff --git a/src/mongo/db/commands/touch.cpp b/src/mongo/db/commands/touch.cpp index 80ead76acc9..a1fe53e84d8 100644 --- a/src/mongo/db/commands/touch.cpp +++ b/src/mongo/db/commands/touch.cpp @@ -47,7 +47,6 @@ #include "mongo/db/db_raii.h" #include "mongo/db/jsobj.h" #include "mongo/util/timer.h" -#include "mongo/util/touch_pages.h" namespace mongo { diff --git a/src/mongo/db/storage/mmap_v1/SConscript b/src/mongo/db/storage/mmap_v1/SConscript index a738e193e3f..e8d9893017f 100644 --- a/src/mongo/db/storage/mmap_v1/SConscript +++ b/src/mongo/db/storage/mmap_v1/SConscript @@ -1,3 +1,5 @@ +# -*- mode: python -*- + Import("env") Import("mmapv1") @@ -125,6 +127,7 @@ env.Library( 'record_store_v1_repair_iterator.cpp', 'record_store_v1_simple.cpp', 'record_store_v1_simple_iterator.cpp', + 'touch_pages.cpp', ], LIBDEPS= [ '$BUILD_DIR/mongo/db/commands/server_status_core', diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp index 6d9e263f7d6..d67fa341cb4 100644 --- a/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp +++ b/src/mongo/db/storage/mmap_v1/record_store_v1_base.cpp @@ -30,8 +30,9 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kStorage -#include "mongo/db/storage/mmap_v1/record_store_v1_base.h" +#include "mongo/platform/basic.h" +#include "mongo/db/storage/mmap_v1/record_store_v1_base.h" #include "mongo/base/static_assert.h" #include "mongo/db/catalog/collection.h" @@ -41,11 +42,11 @@ #include "mongo/db/storage/mmap_v1/extent_manager.h" #include "mongo/db/storage/mmap_v1/record.h" #include "mongo/db/storage/mmap_v1/record_store_v1_repair_iterator.h" +#include "mongo/db/storage/mmap_v1/touch_pages.h" #include "mongo/stdx/memory.h" #include "mongo/util/log.h" #include "mongo/util/progress_meter.h" #include "mongo/util/timer.h" -#include "mongo/util/touch_pages.h" namespace mongo { diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_simple.cpp b/src/mongo/db/storage/mmap_v1/record_store_v1_simple.cpp index 51baec1cd29..dfe5860ce33 100644 --- a/src/mongo/db/storage/mmap_v1/record_store_v1_simple.cpp +++ b/src/mongo/db/storage/mmap_v1/record_store_v1_simple.cpp @@ -44,12 +44,12 @@ #include "mongo/db/storage/mmap_v1/extent_manager.h" #include "mongo/db/storage/mmap_v1/record.h" #include "mongo/db/storage/mmap_v1/record_store_v1_simple_iterator.h" +#include "mongo/db/storage/mmap_v1/touch_pages.h" #include "mongo/stdx/memory.h" #include "mongo/util/log.h" #include "mongo/util/mongoutils/str.h" #include "mongo/util/progress_meter.h" #include "mongo/util/timer.h" -#include "mongo/util/touch_pages.h" namespace mongo { diff --git a/src/mongo/util/touch_pages.cpp b/src/mongo/db/storage/mmap_v1/touch_pages.cpp index 6c4afb42f15..7aedffe2fe3 100644 --- a/src/mongo/util/touch_pages.cpp +++ b/src/mongo/db/storage/mmap_v1/touch_pages.cpp @@ -25,8 +25,9 @@ * then also delete it in the license file. */ +#include "mongo/platform/basic.h" -#include "mongo/util/touch_pages.h" +#include "mongo/db/storage/mmap_v1/touch_pages.h" namespace mongo { diff --git a/src/mongo/util/touch_pages.h b/src/mongo/db/storage/mmap_v1/touch_pages.h index 922c9d008e7..c98b0e9a427 100644 --- a/src/mongo/util/touch_pages.h +++ b/src/mongo/db/storage/mmap_v1/touch_pages.h @@ -28,12 +28,11 @@ #pragma once #include <cstdlib> -#include <fcntl.h> namespace mongo { -// Touch a range of pages using an OS-specific method. -// Takes a file descriptor, offset, and length, for Linux use. -// Additionally takes an Extent pointer for use on other platforms. +/** + * Touches a range of pages, to encourage the OS to get them into the buffer pool. + */ void touch_pages(const char* buf, size_t length, size_t pageSize = 4096); } diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript index 1af5606d59f..9266810c1c2 100644 --- a/src/mongo/util/SConscript +++ b/src/mongo/util/SConscript @@ -145,7 +145,6 @@ env.Library( target='foundation', source=[ "startup_test.cpp", - "touch_pages.cpp", 'file.cpp', 'platform_init.cpp', 'thread_safe_string.cpp', |