lisa.wlgen.rta.PolicyProperty#

class lisa.wlgen.rta.PolicyProperty(policy)[source]#

Bases: SimpleConcreteProperty

Scheduler policy property.

Parameters:

policy (str) – Scheduling policy: * SCHED_OTHER for CFS task * SCHED_FIFO for FIFO realtime task * SCHED_RR for round-robin realtime task * SCHED_DEADLINE for deadline task * SCHED_BATCH for batch task * SCHED_IDLE for idle task

Classes

__class__ inherited

Metaclass for properties.

Attributes

DEFAULT_JSON

JSON value to use as a default.

JSON_KEY

Name of the JSON key the property will set.

KEY

Subclasses can override this attribute so that PropertyBase.from_key() knows that it can call their _from_key() method for that key.

OPTIMIZE_JSON_KEYS

Configuration driving the JSON optimization, as a dict(str, set(str)).

FILTER_NONE inherited

If True, no JSON content will be generated when the property value is None.

REQUIRED_KCONFIG_KEYS inherited

List of KCONFIG keys that need to be =Y on the target kernel for this property to be usable.

Properties

json_key inherited

Name of the JSON key that will be set.

key inherited

Key of the instance.

logger inherited

Convenience short-hand for self.get_logger().

val inherited

Value “payload” of the property.

Methods

HASH_COERCE() inherited

Used to coerce the values of self.__dict__ to hashable values.

__and__() inherited

Combine two instances of the same property together.

check_kconfig() inherited

Check whether plat_info contains the kernel KCONFIG keys contained in REQUIRED_KCONFIG_KEYS.

find_cls() inherited

Find which subclass can handle key.

from_key() inherited

Alternative constructor that is available with the same signature for all properties.

get_logger() inherited

Provides a logging.Logger named after cls.

log_locals() inherited

Debugging aid: log the local variables of the calling function.

to_default_json() inherited

Similar to to_json() but returns the default values for the keys set in to_json().

to_json() inherited

Snippet of JSON content for that property as Python objects.

Classes#

PolicyProperty.__class__#

alias of PropertyMeta

Attributes#

PolicyProperty.DEFAULT_JSON = 'SCHED_OTHER'#

JSON value to use as a default.

If None, nothing will be output.

Note

If the default value is context-dependent, it should override to_default_json() instead.

PolicyProperty.JSON_KEY = 'policy'#

Name of the JSON key the property will set.

Note

If it needs to be dynamically chose, see json_key.

PolicyProperty.KEY = 'policy'#

Subclasses can override this attribute so that PropertyBase.from_key() knows that it can call their _from_key() method for that key.

Note

This class attribute will not be inherited automatically so that each class can be uniquely identified by its key. Subclass that do not override the value explicitly will get None.

PolicyProperty.OPTIMIZE_JSON_KEYS = {'policy': {}}#

Configuration driving the JSON optimization, as a dict(str, set(str)).

This is a dictionary mapping JSON key names to set of “barrier” JSON keys. When successive phases of a given task share the same value for the keys of that dictionary, they will be removed in the later phases since rt-app settings are persistent across phases. When any of the barrier key listed in the set has a change in its value, it will be considered as an optimization barrier and the value will be set again, even if it means repeating the same value as earlier.

PolicyProperty.FILTER_NONE = True#

Inherited attribute, see lisa.wlgen.rta.SimpleConcreteProperty.FILTER_NONE

If True, no JSON content will be generated when the property value is None.

PolicyProperty.REQUIRED_KCONFIG_KEYS = []#

Inherited attribute, see lisa.wlgen.rta.ConcretePropertyBase.REQUIRED_KCONFIG_KEYS

List of KCONFIG keys that need to be =Y on the target kernel for this property to be usable.

Properties#

property PolicyProperty.json_key#

Inherited property, see lisa.wlgen.rta.SimpleConcreteProperty.json_key

Name of the JSON key that will be set.

property PolicyProperty.key#

Inherited property, see lisa.wlgen.rta.PropertyBase.key

Key of the instance.

property PolicyProperty.logger#

Inherited property, see lisa.utils.Loggable.logger

Convenience short-hand for self.get_logger().

property PolicyProperty.val#

Inherited property, see lisa.wlgen.rta.SimpleProperty.val

Value “payload” of the property.

Methods#

PolicyProperty.HASH_COERCE(x, coerce)#

Inherited method, see lisa.utils.SimpleHash.HASH_COERCE()

Used to coerce the values of self.__dict__ to hashable values.

PolicyProperty.__and__(other)#

Inherited method, see lisa.wlgen.rta.SimpleProperty.__and__()

Combine two instances of the same property together.

classmethod PolicyProperty.check_kconfig(plat_info, strict=True)#

Inherited method, see lisa.wlgen.rta.ConcretePropertyBase.check_kconfig()

Check whether plat_info contains the kernel KCONFIG keys contained in REQUIRED_KCONFIG_KEYS.

classmethod PolicyProperty.find_cls(key)#

Inherited method, see lisa.wlgen.rta.PropertyBase.find_cls()

Find which subclass can handle key.

classmethod PolicyProperty.from_key(key, val)#

Inherited method, see lisa.wlgen.rta.PropertyBase.from_key()

Alternative constructor that is available with the same signature for all properties.

classmethod PolicyProperty.get_logger(suffix=None)#

Inherited method, see lisa.utils.Loggable.get_logger()

Provides a logging.Logger named after cls.

classmethod PolicyProperty.log_locals(var_names=None, level='debug')#

Inherited method, see lisa.utils.Loggable.log_locals()

Debugging aid: log the local variables of the calling function.

classmethod PolicyProperty.to_default_json(plat_info, properties)#

Inherited method, see lisa.wlgen.rta.ConcretePropertyBase.to_default_json()

Similar to to_json() but returns the default values for the keys set in to_json().

PolicyProperty.to_json(plat_info, **kwargs)#

Inherited method, see lisa.wlgen.rta.ConcretePropertyBase.to_json()

Snippet of JSON content for that property as Python objects.