# Notification Mechanism

* Built on top of the standard pipe driver
* can be enabled by `CONFIG_WATCH_QUEUE`
* [splicing](/linux-kernel-notes/implementations/pipes.md#splice) is disabled on these pipes to prevent inter-leaving of kernel messages
* owner of the pipe has to tell the kernel, the sources from which it would like to get notifications
* a message will be discarded if there isn’t a slot available in the ring or if no preallocated message buffer is available. In both of these cases
* the kernel **does not wait** for the consumers to collect it, but rather just continues on.
  * This means that **notifications can be generated whilst spinlocks are held** and also protects the kernel from being held up indefinitely by a userspace malfunction.

Please refer [General notification mechanism - Kernel Docs](https://docs.kernel.org/core-api/watch_queue.html) for information on Mesage Structure, Watch Queue, Watch List and Event Filtering.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lagnos.gitbook.io/linux-kernel-notes/core-apis/core-utilities/notification-mechanism.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
