Messages in this thread | | | Subject | Re: Q: generic_file_write sets PG_locked??? | From | (Eric W. Biederman) | Date | 24 Apr 1999 15:15:03 -0500 |
| |
>>>>> "LT" == Linus Torvalds <torvalds@transmeta.com> writes:
LT> On 24 Apr 1999, Eric W. Biederman wrote: >> >> However the current code has a nice little race.
LT> I don't think so.
Ah. It's not a bug it's a feature. It wasn't what I was expecting but it appears it works. And has the nice feature of not incurring any read cost for write only files.
Now that I understand whats happening in generic_file_write I'm not going to worry about it anymore for 2.2.
For 2.3 though I'm going to seriously revisit generic_file_write. In particular: 1) It clears the PageLock after calling updatepage. This isn't compatible with block based writes (for asynchronous filesystems). (i.e brw_page). 2) We do so much serialization when writing files it's spooky. The page lock, the inode semaphore, and the kernel lock. It's my gut feeling that running the right application on a smp system, we would feel the unnecessary serialization.
I know it definitely makes a difference in databases wether they do page level or record level locking.
Eric
- 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/
| |