lkml.org 
[lkml]   [2025]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/2] printk_ringbuffer: don't needlessly wrap data blocks around
Date
This series fixes the issue where data blocks would wrap in cases where the last
data block perfectly fits the ring. This caused whatever was at the beginning of
the ring to get discarded in this case, and the data block would get put there
even though it could be put at the end of the data ring just fine without
discarding anything.

Fixing this issue also allows to simplify the check in data_check_size,
previously it would ensure there's space for a trailing id, which we
don't need anymore.

v0->v1:
- Fix severely broken code alignment

v1->v2:
- Rename & invert get_next_lpos -> is_blk_wrapped
- Add a new commit for changing the logic in data_check_size

Daniil Tatianin (2):
printk_ringbuffer: don't needlessly wrap data blocks around
printk_ringbuffer: allow one data block to occupy the entire data ring

kernel/printk/printk_ringbuffer.c | 38 +++++++++++++++++--------------
1 file changed, 21 insertions(+), 17 deletions(-)

--
2.43.0


\
 
 \ /
  Last update: 2025-09-05 16:43    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog