Merge lp:~laurynas-biveinis/percona-server/xtradb-thread-priority-flag into lp:percona-server/5.6
Status: | Superseded |
---|---|
Proposed branch: | lp:~laurynas-biveinis/percona-server/xtradb-thread-priority-flag |
Merge into: | lp:percona-server/5.6 |
Diff against target: |
468 lines (+336/-0) 14 files modified
Percona-Server/mysql-test/suite/sys_vars/r/innodb_priority_cleaner_basic.result (+31/-0) Percona-Server/mysql-test/suite/sys_vars/r/innodb_priority_io_basic.result (+31/-0) Percona-Server/mysql-test/suite/sys_vars/r/innodb_priority_master_basic.result (+31/-0) Percona-Server/mysql-test/suite/sys_vars/r/innodb_priority_purge_basic.result (+31/-0) Percona-Server/mysql-test/suite/sys_vars/t/innodb_priority_cleaner_basic.test (+35/-0) Percona-Server/mysql-test/suite/sys_vars/t/innodb_priority_io_basic.test (+35/-0) Percona-Server/mysql-test/suite/sys_vars/t/innodb_priority_master_basic.test (+35/-0) Percona-Server/mysql-test/suite/sys_vars/t/innodb_priority_purge_basic.test (+35/-0) Percona-Server/storage/innobase/buf/buf0flu.cc (+2/-0) Percona-Server/storage/innobase/handler/ha_innodb.cc (+25/-0) Percona-Server/storage/innobase/include/srv0srv.h (+16/-0) Percona-Server/storage/innobase/include/univ.i (+6/-0) Percona-Server/storage/innobase/srv/srv0srv.cc (+22/-0) Percona-Server/storage/innobase/srv/srv0start.cc (+1/-0) |
To merge this branch: | bzr merge lp:~laurynas-biveinis/percona-server/xtradb-thread-priority-flag |
Related bugs: | |
Related blueprints: |
XtraDB Thread Priority Flag
(High)
XtraDB Priority Mutex
(High)
XtraDB Priority RW Lock
(High)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexey Kopytov (community) | Needs Resubmitting | ||
Review via email: mp+186766@code.launchpad.net |
This proposal has been superseded by a proposal from 2013-09-26.
Description of the change
Implement thread priority flag
(https:/
that would be available for InnoDB threads to check whether they
should acquire some shared resource with priority or no. The actual
uses of this flag will be in follow-up.
This flag srv_current_
thread-local storage. There were two other alternatives considered
for its implementation.
1. Passing the flag value from the DECLARE_THREAD functions to its use
sites through the callstacks. But such callstacks would be very
deep and would require patching dozens of InnoDB functions to
include this new arg.
2. pthread_
advantage of being slightly more portable than TLS, but it's more
complicated to use: 1) the flag would have to be allocated in
heap. 2) pthread_
be necessary, moreover they'd have to be placed in mysys instead of
InnoDB and any affected non-mysys-
would have to be converted to initialize mysys. 3)
pthread_
paths, such as mutex locking/unlocking code.
Thus TLS appears to be the best option.
Means to change the flag value for individual InnoDB utility threads
are provided for UNIV_PERF_DEBUG or UNIV_DEBUG builds through the new
global dynamic variables innodb_
innodb_
for them.
http://
Just make it Linux-specific for now, i.e. so that the system variables only appear in UNIV_LINUX builds, and srv_current_ thread_ priority is #define'd to 0 otherwise.
Making it truly portable is more complex than just #ifdef __GNUC__, and I will address it later.
But I also don't like reviewing this change in isolation. Please resubmit with the code that actually makes use of srv_current_ thread_ priority.