Messages in this thread | | | Date | Mon, 30 Aug 1999 10:42:25 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: vm kills processes in our 2.3.12 port of reiserfs - what wasthe story on the changes to mark_buffer_dirty() and the too many dirtybuffers issue? |
| |
On Mon, 30 Aug 1999, Hans Reiser wrote: > > If not, then we should have two mark_buffer_dirty()'s, one atomic, one not, like > we put into the 2.2.11 patch for reiserfs.
I would just do it in the write path in raiserfs explicitly - that's what the standard filesystems do that use the generic block write code (see fs/buffer.c:
* we dirty buffers only after copying the data into * the page - this way we can dirty the buffer even if * the bh is still doing IO. * * NOTE! This also does a direct dirty balace check, * rather than relying on bdflush just waking up every * once in a while. This is to catch (and slow down) * the processes that write tons of buffer.. * * Note how we do NOT want to do this in the full block * case: full pages are flushed not by the people who * dirtied them, but by people who need memory. And we * should not penalize them for somebody else writing * lots of dirty pages. */ set_bit(BH_Uptodate, &bh->b_state); if (!test_and_set_bit(BH_Dirty, &bh->b_state)) { __mark_dirty(bh, 0); if (too_many_dirty_buffers) balance_dirty(bh->b_dev); }
the comment just about says it all..
Linus
- 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/
| |