MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
THRConfig Class Reference

#include <mt_thr_config.hpp>

Inheritance diagram for THRConfig:
Collaboration diagram for THRConfig:

Classes

struct  Entries
struct  Param
struct  T_Thread

Public Types

enum  T_Type {
  T_MAIN = 0, T_LDM = 1, T_RECV = 2, T_REP = 3,
  T_IO = 4, T_END = 5
}

Public Member Functions

int setLockExecuteThreadToCPU (const char *val)
int setLockIoThreadsToCPU (unsigned val)
int do_parse (const char *ThreadConfig)
int do_parse (unsigned MaxNoOfExecutionThreads, unsigned __ndbmt_lqh_workers, unsigned __ndbmt_classic)
const char * getConfigString ()
const char * getErrorMessage () const
const char * getInfoMessage () const
Uint32 getThreadCount () const
Uint32 getThreadCount (T_Type) const
Uint32 getMtClassic () const

Protected Member Functions

void add (T_Type)
Uint32 find_type (char *&)
int find_spec (char *&, T_Type)
int find_next (char *&)
unsigned createCpuSet (const SparseBitmask &)
int do_bindings ()
int do_validate ()
unsigned count_unbound (const Vector< T_Thread > &vec) const
void bind_unbound (Vector< T_Thread > &vec, unsigned cpu)

Protected Attributes

bool m_classic
SparseBitmask m_LockExecuteThreadToCPU
SparseBitmask m_LockIoThreadsToCPU
Vector< SparseBitmaskm_cpu_sets
Vector< T_Threadm_threads [T_END]
BaseString m_err_msg
BaseString m_info_msg
BaseString m_cfg_string
BaseString m_print_string

Detailed Description

This class contains thread configuration it supports parsing the ThreadConfig parameter and handling LockExecuteThreadToCPU etc...

This is used in ndb_mgmd when verifying configuration and by ndbmtd

TAP-TESTS are provided in mt_thr_config.cpp

Definition at line 36 of file mt_thr_config.hpp.

Member Function Documentation

int THRConfig::do_bindings ( )
protected

Check that no cpu_sets overlap

Check that no cpu_sets overlap

Remove all already bound threads from LockExecuteThreadToCPU-mask

don't count this one...

This is old mt.cpp : setcpuaffinity

let each LQH have it's own CPU and rest share...

Definition at line 178 of file mt_thr_config.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int THRConfig::do_parse ( unsigned  MaxNoOfExecutionThreads,
unsigned  __ndbmt_lqh_workers,
unsigned  __ndbmt_classic 
)

This is old ndbd.cpp : get_multithreaded_config

Definition at line 127 of file mt_thr_config.cpp.

Here is the call graph for this function:

int THRConfig::do_validate ( )
protected

Check that there aren't too many of any thread type

LDM can be 1 2 4

Definition at line 417 of file mt_thr_config.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int THRConfig::find_spec ( char *&  str,
T_Type  type 
)
protected

Find end

Definition at line 718 of file mt_thr_config.cpp.

Here is the call graph for this function:


The documentation for this class was generated from the following files: