Re: [RFC] fsblock



On Mon, Jun 25, 2007 at 04:58:48PM +1000, Nick Piggin wrote:

Using buffer heads instead allows the FS to send file data down inside
the transaction code, without taking the page lock. So, locking wrt
data=ordered is definitely going to be tricky.

The best long term option may be making the locking order
transaction -> page lock, and change writepage to punt to some other
queue when it needs to start a transaction.

Yeah, that's what I would like, and I think it would come naturally
if we move away from these "pass down a single, locked page APIs"
in the VM, and let the filesystem do the locking and potentially
batching of larger ranges.

Definitely.


write_begin/write_end is a step in that direction (and it helps
OCFS and GFS quite a bit). I think there is also not much reason
for writepage sites to require the page to lock the page and clear
the dirty bit themselves (which has seems ugly to me).

If we keep the page mapping information with the page all the time (ie
writepage doesn't have to call get_block ever), it may be possible to
avoid sending down a locked page. But, I don't know the delayed
allocation internals well enough to say for sure if that is true.

Either way, writepage is the easiest of the bunch because it can be
deferred.

-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Working Transactions somehow started not to work
    ... Transaction and locking are not properties of recordsets but are properties ... Opening a served-based cursor will put a lock on ... SL> and are not associated necessarily with server-based cursors. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: parallel interpreter/db problem. transaction didnt fix.
    ... I had *thought* a transaction would fix that, ... I've never used table locking in PHP ... error on your queries - and not checking for them. ... so I changed the LOCK TABLES to a write lock. ...
    (comp.lang.php)
  • [PATCH 09/58] [GFS2] Add writepages for GFS2 jdata
    ... a transaction lock in the wrong order with respect to the page lock. ... By using writepages rather than just writepage, ... * @mapping: The mapping ...
    (Linux-Kernel)
  • Re: Help - Timing Logic
    ... Perhaps a stored proc may be faster to execute and return the values as opposed to building the transaction in the code. ... implement as above locking only the records you retrieve / update - need to watch out here for table locking ... ... you can lock individual rows ... ...
    (microsoft.public.dotnet.languages.vb)
  • Re: DAO recordset append single record locks entire table (linked table)
    ... if there was a locking error, ... I found that Access 2000 keeps doing page lock whenever a new record is ... added into the table inside a transaction. ... The default value for the registry entry is 0, ...
    (comp.databases.ms-access)

Loading