FS-Cache for cifs
Subsystems (2)
Hello everyone,
Recently I'd like to test fs-cache for cifs. But CONFIG_CIFS_FSCACHE is not set defaultly. Are there any concern to enable it? Test it to enbale fs-cache. It seems work. The file /proc/fs/fscache/stats is update when do some cp operations.
Thanks.
Signature · 2 lines
Best regards! XiaoLi Feng 冯小丽
fscache (perhaps more so with the recent rewrite that Dave Howells did) may be most well suited to cifs.ko (SMB3.1.1 mounts) among the various file systems since it would allow offline caching of files and directories leveraging:
1) handle leases and directory leases for "strict caching" models or
2) directory change notification for "loose caching" models (Although file version numbers are not provided, the combination of creation time, 64 bit DiskFileId, and last write time with 100ns time granularity is probably sufficient to use in conjunction with this) In addition the protocol already supports four flags to control whether client side offline caching can/should be done:
SMB2_SHAREFLAG_MANUAL_CACHING SMB2_SHAREFLAG_AUTO_CACHING
SMB2_SHAREFLAG_VDO_CACHING
SMB2_SHAREFLAG_NO_CACHING
So fscache could be very, very useful for cifs.ko, especially for metadata heavy workloads that are largely from one client ... but fscache doesn't have tight integration with many cifs features (like handle leases e.g.) yet.
It would make sense to better tie cifs.ko in with fscache (especially as it has shown to be useful on other operating systems over SMB3/SMB3.1.1).
Quoted 13 lines · Xiaoli Feng
Hello everyone,
Recently I'd like to test fs-cache for cifs. But
CONFIG_CIFS_FSCACHEis not set defaultly. Are there any concern to enable it? Test it to enbale fs-cache. It seems work. The file/proc/fs/fscache/statsis update when do some cp operations.Thanks.
--
Best regards!
XiaoLi Feng 冯小丽
Signature · 3 lines
Thanks, Steve
Thanks Steve for the info. File a bug for cifs fscache.
Bug 208883 - CIFS: kernel BUG at fs/cachefiles/rdwr.c:715!
https://bugzilla.kernel.org/show_bug.cgi?id=208883
----- Original Message -----
Quoted 62 lines
From: "Steve French" <[email protected]>
To: "Xiaoli Feng" <[email protected]>
Cc: "CIFS" <[email protected]>, "David Howells" <[email protected]>
Sent: Tuesday, August 11, 2020 10:12:28 AM
Subject: Re: FS-Cache for cifsMy tests in recent kernels with fscache and cifs.ko worked but didn't provide much performance benefit (which would be expected since close releases leases )
Quoted 49 lines · On Mon, Aug 10, 2020, 20:51 Steve French <[email protected]> wrote:
fscache (perhaps more so with the recent rewrite that Dave Howells did) may be most well suited to cifs.ko (SMB3.1.1 mounts) among the various file systems since it would allow offline caching of files and directories leveraging:
1) handle leases and directory leases for "strict caching" models or
2) directory change notification for "loose caching" models (Although file version numbers are not provided, the combination of creation time, 64 bit DiskFileId, and last write time with 100ns time granularity is probably sufficient to use in conjunction with this) In addition the protocol already supports four flags to control whether client side offline caching can/should be done:
SMB2_SHAREFLAG_MANUAL_CACHINGSMB2_SHAREFLAG_AUTO_CACHING
SMB2_SHAREFLAG_VDO_CACHING
SMB2_SHAREFLAG_NO_CACHINGSo fscache could be very, very useful for cifs.ko, especially for metadata heavy workloads that are largely from one client ... but fscache doesn't have tight integration with many cifs features (like handle leases e.g.) yet.
It would make sense to better tie cifs.ko in with fscache (especially as it has shown to be useful on other operating systems over SMB3/SMB3.1.1).
Quoted 4 lines · Xiaoli Feng
Hello everyone,
Recently I'd like to test fs-cache for cifs. But
CONFIG_CIFS_FSCACHEisnot set defaultly.
Quoted 1 line
Are there any concern to enable it? Test it to enbale fs-cache. It seems
work. The file
Quoted 8 lines
/proc/fs/fscache/statsis update when do some cp operations.Thanks.
--
Best regards!
XiaoLi Feng 冯小丽--
Thanks,Steve
Quoted 7 lines · Xiaoli Feng
Thanks Steve for the info. File a bug for cifs fscache.
Bug 208883 - CIFS: kernel BUG at
fs/cachefiles/rdwr.c:715!
https://bugzilla.kernel.org/show_bug.cgi?id=208883
I updated the bug - this is not a CIFS issue but a general bug in current fscache implementation and will be fixed once the fscache-iter rewrite is merged.
Is there an overview document somewhere that describe what fscache does? We are seeing some warnings about duplicated entries in some scenarios but I'd like to understand better what it does before changing what goes in the key.
Cheers,
Signature · 4 lines
Aurélien Aptel / SUSE Labs Samba Team GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)
Quoted 4 lines · Aurélien Aptel
Is there an overview document somewhere that describe what fscache does? We are seeing some warnings about duplicated entries in some scenarios but I'd like to understand better what it does before changing what goes in the key.
Documentation/filesystems/caching/* in the kernel.
David