Re: [PATCH v2 4/7] Add a cache of recent lines

2025-02-07 Thread David Malcolm
On Sun, 2025-02-02 at 21:47 -0800, Andi Kleen wrote: > > > > If I reading this right, calls to get_next_line lead to insertions > > into > > the ring buffer whilst the buffer is empty or the last line in the > > ring > > buffer cache is m_line_num - 1. > > > > There are a few places where we upda

Re: [PATCH v2 4/7] Add a cache of recent lines

2025-02-02 Thread Andi Kleen
> > If I reading this right, calls to get_next_line lead to insertions into > the ring buffer whilst the buffer is empty or the last line in the ring > buffer cache is m_line_num - 1. > > There are a few places where we update m_line_num, but this caching > code doesn't seem to touch those places

Re: [PATCH v2 4/7] Add a cache of recent lines

2025-01-27 Thread David Malcolm
On Sat, 2025-01-25 at 23:30 -0800, Andi Kleen wrote: > From: Andi Kleen > > For larger files the file_cache line index will be spread out to make > the index fit into the fixed buffer, so any access to the non latest > line > will need some skipping of lines. > > Most accesses for line are near

[PATCH v2 4/7] Add a cache of recent lines

2025-01-25 Thread Andi Kleen
From: Andi Kleen For larger files the file_cache line index will be spread out to make the index fit into the fixed buffer, so any access to the non latest line will need some skipping of lines. Most accesses for line are near the latest line because a diagnostic is likely near where the scanner