Metadata cache and multiple metadata channels

* Mathieu Desnoyers (mathieu.desnoyers@efficios.com) wrote:
> * Julien Desfossez (jdesfossez@efficios.com) wrote:
> > Implement a cache for the kernel metadata and a list of metadata
> > channels.
> >
> > When new metadata is appended, all metadata channels are awakened so
> > they can return from poll and get the newly added metadata
> > This allows to request the metadata multiple times by creating multiple
> > metadata channels (useful for snapshots).
> >
> > With this new feature, the poll and get_subbuf ring buffer operations
> > are now overridden by lttng-abi for the metadata channels, to check the
> > cache before doing these operations.
> >
>
> First pass of cleanup: bypass the metadata-specific functions entirely
> for per-cpu file descriptors.

Second pass: fixed missing locking around metadata destroy.

I recommend you run metadata creation/destroy stress-test to catch this
kind of race in the future.
kref

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>