On 14.11.18 г. 2:31 ч., Qu Wenruo wrote: > Hi, > > Is there any (easy) method for a fstests test case to limit the page > cache usage? > > I triggered btrfs/139 failure with 2G vRAM VM, and located the root > cause of the problem. You can always size your test vm properly. Otherwise what about the various sysctl tuning knobs? I.e Documentation/sysctl/vm.txt explains some of them: dirty_bytes, dirty_background_bytes, dirty_background_ratio, dirty_expire_centisecs So with a 2g machine the default settings are using only a fraction of the ram. If you adjust the same settings for the larger ram size you should get almost identical behavior. > > However it's only really reproducible for small ram VM, since it could > trigger dirty page writeback due to memory pressure. > > So I'm wondering if we could do such thing even for large RAM test machine. > > Thanks, > Qu >