> >>This case adds two new dataset-level properties, 'primarycache' and > >>'secondarycache', to the existing zfs property infrastructure. These > >>properties control what is cached in the primary cache (ARC) and the > >>secondary cache (l2ARC). > > > >I presume that these properties will be inherited? > > Correct.
Hmmm... the ARC and L2ARC are both physical caches. With snapshots, clones, and (in the future) dedup, the same block can be shared by many datasets. What will determine whether a block is cached in the ARC? What will determine whether the L2ARC feed thread should write or ignore an ARC-cached block? In the case of the ARC, the answer seems simple: only datasets with caching enabled would allocate in the ARC; datasets with caching disabled could skip the ARC, or could consult it anyway (in case someone else has already done the I/O anyway). The L2ARC seems more complex because allocation is done by the feed thread, not in the context of any particular dataset doing I/O. The feed thread has no way of knowing on whose behalf blocks exist. So it would have to operate as it does today, caching everything that falls out of the ARC. It's not clear to me how the L2ARC policy can be anything other than a pool-wide property. Jeff
