This is something I've been meaning to do for a while, but thought I should ask if anyone thinks it's a bad idea.
I've never heard of raw buffer cached causing any problem, and on some cameras it substantially speeds up DNG. So it seems like it should be on by default.
To be more strictly correct, we could do something like the attached patch to make sure the swapped values are written out to uncached memory after each swap. I didn't see any performance hit or other problems doing this, but I'm not sure if this is worth it. Technically, I guess we should also flush the cache before starting (to ensure we don't have old cached values in the raw address space) but in practice a doubt such values could sit around between shots.
The attached csv file has some measurements. One thing that stands out is the first shot after boot up is often significantly longer than the following ones. I've also noticed (not included in this csv) that there are occasional outliers.