Messages in this thread | | | Date | Wed, 23 Jun 1999 10:40:53 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: ll_rw_block mark_buffer_clean without the big kernel lock |
| |
On Wed, 23 Jun 1999, Andrea Arcangeli wrote: > > ll_rw_block will refile the buffer, and currently it can do that without > the big kernel lock held (at least in write-partial). I think we can't put > the lock_kernel just around mark_buffer_clean (in a > async_mark_buffer_clean style) because we would end waiting for the big > kernel lock but with the io_request_lock just acquired while other part of > the kernel gets the io_request_lock with the lock_kernel acquired.
Agreed. However, I think the easier solution is to move the "mark_buffer_clean()" code into the early write case (search for the comment "Hmmph! Nothing to write" ;)
> I am not sure if we can make the buffer clean outside the io_request_lock > (looks not to be sure that the req->bh won't change under us).
We can. We have to do it _before_ rather than later, though - just in case we race with somebody else marking it dirty (it's ok to do the IO twice, but it's not ok to not do it at all).
> It also fixes a wrong param to async_mark_buffer_dirty.
Oops, right you are, I was going to change the rules but ended up reverting those changes (except for this one case I missed). Thanks,
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/
| |