OpenSolaris

Printable Version Enter a New Search
Bug ID 6354547
Synopsis sticky log buf size
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:zfs
Keywords onnv_triage
Responsible Engineer Neil Perrin
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_31
Fixed In snv_31
Release Fixed solaris_nevada(snv_31)
Related Bugs
Submit Date 23-November-2005
Last Update Date 9-January-2006
Description
The ZFS intent log preallocates a new log block before
writing out one in order to maintain a chain. The ZIL
supports a variable block size, and makes a choice as
to the best size based on what is currently waiting 
to be flushed, or if 0 then on the previous block size.
The last case handles the situation where a single thread
is doing O_DSYNC writes, so there is nothing waiting 
but we don't want to allocate a minimum 4K block.

The problem occurs if the previous log block written
was say 128KB then we keep getting 128KB even
is we only need a 4K, leading to writing 124KB
too much. This large block is sticky in that it
will reamin this size until another thread also uses
the ZIL and a log flush is waiting.

The solution is to use the smaller buffer that would contain
the last block, instead of the last block size.
This information is in lwb_nused. See suggested fix.
Work Around
N/A
Comments
N/A