Messages in this thread Patch in this message |  | | Date | Thu, 20 Sep 2001 21:13:45 +0200 | From | Andrea Arcangeli <> | Subject | Re: [PATCH] Significant performace improvements on reiserfs systems |
| |
On Thu, Sep 20, 2001 at 11:58:53AM -0700, Andrew Morton wrote: > Andrea Arcangeli wrote: > > > > ... > > --- 2.4.10pre12aa2/fs/buffer.c.~1~ Thu Sep 20 20:14:19 2001 > > +++ 2.4.10pre12aa2/fs/buffer.c Thu Sep 20 20:45:58 2001 > > @@ -2506,7 +2506,7 @@ > > spin_unlock(&free_list[isize].lock); > > > > page->buffers = bh; > > - page->flags &= ~(1 << PG_referenced); > > + page->flags |= 1 << PG_referenced; > > I don't see how this can change anything - getblk() calls > touch_buffer() shortly afterwards, which does the same > thing?
I'm worried the page is freed before it has a chance to be found in the freelist in smp. The refill_freelist logic is broken too and right fix would be much more invasive than the above one liner, we should return one bh with b_count just set to 1 to be sure it's not collected away under us and we have to try again. But this one probably will do the trick too for now. and maybe it really doesn't matter as you say.
And also the get_hash_table need to touch the buffer since reiserfs makes heavy use if it.
just a few ideas.
--- 2.4.10pre12aa2/fs/buffer.c.~1~ Thu Sep 20 20:14:19 2001 +++ 2.4.10pre12aa2/fs/buffer.c Thu Sep 20 21:06:16 2001 @@ -598,8 +598,10 @@ bh->b_size == size && bh->b_dev == dev) break; - if (bh) + if (bh) { get_bh(bh); + touch_buffer(bh); + } return bh; } @@ -1181,10 +1183,10 @@ /* Insert the buffer into the regular lists */ __insert_into_queues(bh); + touch_buffer(bh); out: write_unlock(&hash_table_lock); spin_unlock(&lru_list_lock); - touch_buffer(bh); return bh; } Andrea - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |