OpenSolaris

Printable Version Enter a New Search
Bug ID 6561733
Synopsis ZFS znode z_sync_cnt field is miscounted
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:zfs
Keywords
Responsible Engineer Neil Perrin
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_66
Fixed In snv_66
Release Fixed solaris_nevada(snv_66) , solaris_10u6(s10u6_01) (Bug ID:2156376)
Related Bugs 6413510 , 6473775
Submit Date 24-May-2007
Last Update Date 29-April-2008
Description
The znode_t z_sync_cnt is atomically incremented/decremented in the zfs_open/zfs_close.
Due to forking, there are some valid close that do not have an associtated open
throwing off the field.

This causes write itx to not be marked as synchronous and so are not flushed out by other thread in zil_commit handling other files. For concurrent O_DSYNC writers to different files (same FS) each thread ends up commiting only it's own data and a lot more queuing in the zil than necessary. A simple fix shows a 5X perf gain on vdbench and this load:

fsd=fsd1,anchor=/myfs,depth=1,width=1,files=8,size=100m,openflags=O_DSYNC,fwd=fwd1,fsd=fsd1,operation=write,xfersize=128k,fileio=random,stopafter=2000000,fileselect=random,skew=100,threads=8,rd=rd1,fwd=fwd1,fwdrate=max,iorate=max,format=yes,elapsed=60,interval=20

Within  xxxxx , vdbench home : http://webhome.sfbay/nwsspe/speweb/vdbench/index.html

In attachment I have a small program that causes z_sync_cnt to misfire and a d-script that 
highlights  it.
Work Around
N/A
Comments
N/A