Kernel Introspection:Design Meeting 2007-04-25#


Who#

bstecher, dbailey, adanko, cburgess

Summary#


What we did#

new questions#


More on pathnames #



API for generic notifier#


This is the struct type seen by the user:
 struct {
    unint64     threshold_level;
    sigevent    users_event;
    uint32      threshold_flags
 } 
 
 THRESHOLD_FLAG_LEVEL    0x00000001 /* on: level detection, off: edge detection. recommended: off */
 THRESHOLD_FLAG_UP       0x00000002 /* rising edge detect, or trigger  above level */
 THRESHOLD_FLAG_DOWN     0x00000004 /* falling edge detect, or trigger below level */
 THRESHOLD_FLAG_ONESHOT  0x00000008 /* threshold self-deletes on being triggered */
This set of flags allows for these kinds of detections:

Using THRESHOLD_FLAG_LEVEL can cause a flood of sigevents, since it will trigger every time that resource's level changes. So THRESHOLD_FLAG_ONESHOT is offered as a throttling mechanism. It makes sure there is only one notification for each triggering event. (The user must re-create the threshold to re-arm.) With ONESHOT, during the time between triggering the threshold and the user recreating it, we will not be delivering sigenvents. This may be desirable to the user as a means of throttling notifications automatically to a level it can handle for those cases where the user is interested only in the final value of the resource. For other cases, using edge-detecting thresholds gives better throttling.

As an alternative throttling strategy, a user can define their sigevent to be a pulse, so repeating notifications, or a level sensitive threshold, will be compressed.