A ring buffer run in linux kernel context, use spinlock,atomic,etc.Just an example.