Skip to content

Conversation

@jserv
Copy link
Member

@jserv jserv commented Jan 29, 2026

This implements notification system inspired by seL4, with asynchronous event delivery, notification masks, and IRQ fast-path optimization.

  • Three-layer architecture: Basic/Async/Mask notifications
  • IRQ fast-path delivery (5-10× faster than full IPC)
  • Async queue with bounded RT processing
  • Extended notification API with event_data payload
  • Notification masks for multi-source event coordination
  • TCB fields: notify_bits, notify_{data,pending,depth,generation}
  • Softirq: ASYNC_SOFTIRQ for deferred notification delivery
  • KDB: 'N' command for notification statistics
  • IRQ subsystem: Dual delivery mode (IPC vs notification)

IRQ fast-path:

  • IRQ_DELIVER_NOTIFY flag for notification-based delivery
  • irq_handler_notify(): Fast-path handler (100-200 cycles target)
  • IRQ encoding: 0-30 direct bit, 31+ uses bit 31 + event_data
  • Safe thread lookup prevents use-after-free

Real-time properties:

  • Bounded execution: NOTIFICATION_BATCH_SIZE = 4 events per softirq
  • O(1) queue operations with atomic counter
  • Memory barriers (DMB) for ordering guarantees
  • WCET: 200 cycles for async delivery batch

This implements notification system inspired by seL4, with asynchronous
event delivery, notification masks, and IRQ fast-path optimization.
- Three-layer architecture: Basic/Async/Mask notifications
- IRQ fast-path delivery (5-10× faster than full IPC)
- Async queue with bounded RT processing
- Extended notification API with event_data payload
- Notification masks for multi-source event coordination
- TCB fields: notify_bits, notify_{data,pending,depth,generation}
- Softirq: ASYNC_SOFTIRQ for deferred notification delivery
- KDB: 'N' command for notification statistics
- IRQ subsystem: Dual delivery mode (IPC vs notification)

IRQ fast-path:
- IRQ_DELIVER_NOTIFY flag for notification-based delivery
- irq_handler_notify(): Fast-path handler (100-200 cycles target)
- IRQ encoding: 0-30 direct bit, 31+ uses bit 31 + event_data
- Safe thread lookup prevents use-after-free

Real-time properties:
- Bounded execution: NOTIFICATION_BATCH_SIZE = 4 events per softirq
- O(1) queue operations with atomic counter
- Memory barriers (DMB) for ordering guarantees
- WCET: 200 cycles for async delivery batch
@jserv jserv merged commit 6ec8361 into master Jan 29, 2026
6 checks passed
@jserv jserv deleted the notification branch January 29, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant