Bugs in 2.3.25 buffer cache?

Jan Kara (jack@atrey.karlin.mff.cuni.cz)
Mon, 8 Nov 1999 19:46:45 +0100


Hello.

While reading buffer cache in 2.3.25 I found two things which might be bugs.

1) I think there is an SMP race in getblk() (is it supposed to be SMP safe, isn't it?).
Processor1: Go through get_hash_table(), create new buffer head and potentialy spend some time on spin locks in
insert_into_queues()
Processor2: In the mean time goes through get_hash_table() for the same block and so we'll get 2 buffers for
one block...

2) When we create buffers heads to cover the page in create_empty_buffers() we don't insert them to LRUs - we just
set b_list to BUF_CLEAN. I think we should also insert the buffers as they will get to the LRUs anyway -- at
least after the first mark_buffer_dirty() and I feel its cleaner (when b_list is set...). Or is this intended behaviour?

Honza.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/