MINI MINI MANI MO

Path : /lib/python2.7/site-packages/tuned/plugins/
File Upload :
Current File : //lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyo

ó
©=[c@sddlmZddlTddlZddlZddlZddlZddlm	Z	ej
jƒZe	ƒZ
dejfd„ƒYZdS(i(tbase(t*iÿÿÿÿN(tcommandstVMPlugincBs’eZdZed„ƒZd„Zd„Zed„ƒZedƒd„ƒZ	edƒd„ƒZ
edƒd	„ƒZedƒd
„ƒZ
RS(s(
	Plugin for tuning memory management.
	cCsidd6dd6S(Nttransparent_hugepagesttransparent_hugepage(tNone(tself((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_get_config_optionsscCst|_t|_dS(N(tTruet_has_static_tuningtFalset_has_dynamic_tuning(Rtinstance((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_instance_inits	cCsdS(N((RR
((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_instance_cleanupscCs%d}tjj|ƒs!d}n|S(Ns+/sys/kernel/mm/transparent_hugepage/enableds2/sys/kernel/mm/redhat_transparent_hugepage/enabled(tostpathtexists(RR((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt	_thp_file s	RcCsÍ|dkr0|s,tjdt|ƒƒndStjddtƒ}|jdƒdkrt|sptjd	ƒndS|j	ƒ}t
jj|ƒr¯|s«tj
||ƒn|S|sÅtjd
ƒndSdS(Ntalwaystnevertmadvises-Incorrect 'transparent_hugepages' value '%s'.s
/proc/cmdlinetno_errorstransparent_hugepage=isWtransparent_hugepage is already set in kernel boot cmdline, ingoring value from profilesDOption 'transparent_hugepages' is not supported on current hardware.(salwaysRR(tlogtwarntstrRtcmdt	read_fileR	tfindtinfoRRRRt
write_to_file(Rtvaluetsimtcmdlinetsys_file((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_set_transparent_hugepages's"RcCs|j||ƒdS(N(R$(RR R!((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_set_transparent_hugepage?scCs<|jƒ}tjj|ƒr4tjtj|ƒƒSdSdS(N(RRRRRtget_active_optionRR(RR#((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_get_transparent_hugepagesCscCs
|jƒS(N(R'(R((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt_get_transparent_hugepageLs(t__name__t
__module__t__doc__tclassmethodRRRRtcommand_setR$R%tcommand_getR'R((((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyR
s			(tRt
decoratorst
tuned.logsttunedRtstructtglobttuned.utils.commandsRtlogstgetRRtPluginR(((s;/usr/lib/python2.7/site-packages/tuned/plugins/plugin_vm.pyt<module>s
	

OHA YOOOO