summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-10-13 15:17:20 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-10-13 15:17:20 +0300
commit607de9c7ac53c3fbf0e92ca7a2c505014cd4e4de (patch)
treedc693144390fe5cf42f68e9358c5d8aad2278998 /storage
parenta8379e53e8fa2f0c091daaf28b095d652e224952 (diff)
parentf1acd9f14bd054b8d8d576c6fe567226c097132d (diff)
downloadmariadb-git-607de9c7ac53c3fbf0e92ca7a2c505014cd4e4de.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/buf/buf0flu.cc2
-rw-r--r--storage/innobase/handler/ha_innodb.cc14
-rw-r--r--storage/innobase/include/buf0buf.h2
3 files changed, 14 insertions, 4 deletions
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index 2107f0af9ae..db546e287b4 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -126,7 +126,7 @@ static void buf_flush_validate_skip()
#endif /* UNIV_DEBUG */
/** Wake up the page cleaner if needed */
-inline void buf_pool_t::page_cleaner_wakeup()
+void buf_pool_t::page_cleaner_wakeup()
{
if (!page_cleaner_idle())
return;
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index d2185819225..e3e9ed08eb4 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -17148,7 +17148,12 @@ innodb_max_dirty_pages_pct_update(
}
srv_max_buf_pool_modified_pct = in_val;
- pthread_cond_signal(&buf_pool.do_flush_list);
+
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+ mysql_mutex_lock(&buf_pool.flush_list_mutex);
+ buf_pool.page_cleaner_wakeup();
+ mysql_mutex_unlock(&buf_pool.flush_list_mutex);
+ mysql_mutex_lock(&LOCK_global_system_variables);
}
/****************************************************************//**
@@ -17179,7 +17184,12 @@ innodb_max_dirty_pages_pct_lwm_update(
}
srv_max_dirty_pages_pct_lwm = in_val;
- pthread_cond_signal(&buf_pool.do_flush_list);
+
+ mysql_mutex_unlock(&LOCK_global_system_variables);
+ mysql_mutex_lock(&buf_pool.flush_list_mutex);
+ buf_pool.page_cleaner_wakeup();
+ mysql_mutex_unlock(&buf_pool.flush_list_mutex);
+ mysql_mutex_lock(&LOCK_global_system_variables);
}
/*************************************************************//**
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index 59f4c400653..480c41669e0 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -1845,7 +1845,7 @@ public:
return page_cleaner_is_idle;
}
/** Wake up the page cleaner if needed */
- inline void page_cleaner_wakeup();
+ void page_cleaner_wakeup();
/** Register whether an explicit wakeup of the page cleaner is needed */
void page_cleaner_set_idle(bool deep_sleep)