blob: d2678e76e44d521e871b8e3ea80704a4a1cf02cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
From 3a6d9302ff14aec82291c7e2212ce37b7453ce9f Mon Sep 17 00:00:00 2001
From: rmcilroy <rmcilroy@chromium.org>
Date: Thu, 20 Jun 2013 22:50:12 +0000
Subject: [PATCH 03/16] Use seperate page-cache pools for each sqlite
connection.
Due to multiple different subsystems using sqlite, the shared global page
cache policy does not suite our use-cases on Chrome very well. This CL
enables a compile time flag to be set to disable shared cache pools.
BUG=243769
Original review URL: https://chromiumcodereview.appspot.com/17413004
---
third_party/sqlite/src/src/pcache1.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/third_party/sqlite/src/src/pcache1.c b/third_party/sqlite/src/src/pcache1.c
index a8c3217..3fcee4b 100644
--- a/third_party/sqlite/src/src/pcache1.c
+++ b/third_party/sqlite/src/src/pcache1.c
@@ -567,6 +567,8 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
** PGroup. In other words, separateCache is true for mode (1) where no
** mutexing is required.
**
+ ** * Always use separate caches (mode-1) if SQLITE_SEPARATE_CACHE_POOLS
+ **
** * Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
**
** * Always use a unified cache in single-threaded applications
@@ -574,7 +576,9 @@ static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
** * Otherwise (if multi-threaded and ENABLE_MEMORY_MANAGEMENT is off)
** use separate caches (mode-1)
*/
-#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
+#ifdef SQLITE_SEPARATE_CACHE_POOLS
+ const int separateCache = 1;
+#elif defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
const int separateCache = 0;
#else
int separateCache = sqlite3GlobalConfig.bCoreMutex>0;
--
2.2.1
|