Re: [PATCH v19 00/40] DEPT(DEPendency Tracker)
"David Hildenbrand (Arm)" <[email protected]>
| Newsgroups | org.kernel.vger.rust-for-linux,dev.linux.lists.linux-rt-devel,org.kernel.vger.linux-arch,org.kernel.vger.linux-block,org.kernel.vger.linux-doc,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-i2c,org.kernel.vger.linux-ide,org.kernel.vger.linux-kernel,org.kernel.vger.linux-media,org.kernel.vger.linux-modules,org.kernel.vger.linux-nfs,org.kernel.vger.netdev,org.kernel.vger.rcu,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
>>> It's interesting, that for writeback we never unlock the folio on the I/O path, >>> but instead have the dedicated page flag to tell us when writeback is complete. >> >> PG_locked and PG_writeback are two different lock-bits with two >> different meanings. >> When a folio is PG_locked the content is invalid and shouldn't be accessed. >> When a folio is in PG_writeback its data is not safe even though >> PG_dirty has been cleared (if I remember correctly). >> >> So these are two separate, though related, lock bits that would both >> need to be tracked. lockdep would detect how they are related. > > Some history ... before we had PG_writeback, we held PG_locked > throughout the writeback process. People argued convincingly that it > was fine to map a page into a process's address space (which requires > PG_locked) while it was being written back. And so PG_locked was > split. Now we take PG_locked at the beginning of the writeback process > and downgrade to PG_writeback at some point. Right, conceptually I would have thought we could do something similar on the readahead path. PG_uptodate is likely not what we want I suspect. Not that such a change would be easy, or that we should do it; just one thing that came to mind. -- Cheers, David