Skip to contentSkip to conversation

question about fuse_disable_pagecache

DISCUSSION Alexandre DERUMIER 2 participants 3 messages Feb 6, 2018

lore
Share & tools
lore
#0 lore raw

Hi,

I have a question about this commit

https://github.com/ceph/ceph/pull/5521/commits/0f11ec237d4692d313a038ed61aa07a3f40555ba#diff-bf87beacb5e3b3ff3ade7ac4a8332d20

which introduce "fuse_disable_pagecache" option

commit description is
"In ceph-fuse case,
there are two caches, one is in ceph-fuse, another one is in kernel. We can't disable/enable the kernel cache dynamically. So adding an config option to completely disable kernel cache."

and

- if (cfuse->client->cct->_conf->fuse_use_invalidate_cb)
- fi->keep_cache = 1;

+#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 8)
+ if (cfuse->client->cct->_conf->fuse_disable_pagecache)
+ fi->direct_io = 1;
+ else if (cfuse->client->cct->_conf->fuse_use_invalidate_cb)
+ fi->keep_cache = 1;
+#endif

So, does it disable both caches ? (fuse cache(keep_cache=0) and host cache (direct_io=1).

Isn't it possible to have direct_io = 0 and keep_cache = 1 at the same time ?

If I understand, fuse_use_invalidate_cb is to be able to invalidate fuse cache.

Regards,

Alexandre.

#1 lore raw

both keep_cache and direct_io options control kernel page cache. 'keep_cache = 1' means kernel does not invalidate inode's page cache on open(2). option 'client_oc' controls if fuse cache is enabled

Quoted 41 lines · Alexandre DERUMIER

Hi,

I have a question about this commit

https://github.com/ceph/ceph/pull/5521/commits/0f11ec237d4692d313a038ed61aa07a3f40555ba#diff-bf87beacb5e3b3ff3ade7ac4a8332d20

which introduce "fuse_disable_pagecache" option

commit description is
"In ceph-fuse case,
there are two caches, one is in ceph-fuse, another one is in kernel. We can't disable/enable the kernel cache dynamically. So adding an config option to completely disable kernel cache."

and

(quoted diff) +6 -2
-    if (cfuse->client->cct->_conf->fuse_use_invalidate_cb)
-    fi->keep_cache = 1;
 
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 8)
+    if (cfuse->client->cct->_conf->fuse_disable_pagecache)
+      fi->direct_io = 1;
+    else if (cfuse->client->cct->_conf->fuse_use_invalidate_cb)
+      fi->keep_cache = 1;
+#endif

So, does it disable both caches ? (fuse cache(keep_cache=0) and host cache (direct_io=1).

Isn't it possible to have direct_io = 0 and keep_cache = 1 at the same time ?

If I understand, fuse_use_invalidate_cb is to be able to invalidate fuse cache.

Regards,

Alexandre.

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 4 lines
Quoted 4 lines

both keep_cache and direct_io options control kernel page cache. 'keep_cache = 1' means kernel does not invalidate inode's page cache on open(2).

Ok, Got it !

Quoted 1 line
Quoted 1 line

option 'client_oc' controls if fuse cache is enabled

oh, didn't known that is was also also for fuse client.

Thanks !

Regards,

Alexandre
----- Mail original -----
De: "Yan, Zheng" <[email protected]>
À: "aderumier" <[email protected]>
Cc: "ceph-devel" <[email protected]>
Envoyé: Mardi 6 Février 2018 06:15:18
Objet: Re: question about fuse_disable_pagecache

both keep_cache and direct_io options control kernel page cache. 'keep_cache = 1' means kernel does not invalidate inode's page cache on open(2). option 'client_oc' controls if fuse cache is enabled

Quoted 41 lines · Alexandre DERUMIER

Hi,

I have a question about this commit

https://github.com/ceph/ceph/pull/5521/commits/0f11ec237d4692d313a038ed61aa07a3f40555ba#diff-bf87beacb5e3b3ff3ade7ac4a8332d20

which introduce "fuse_disable_pagecache" option

commit description is
"In ceph-fuse case,
there are two caches, one is in ceph-fuse, another one is in kernel. We can't disable/enable the kernel cache dynamically. So adding an config option to completely disable kernel cache."

and

- if (cfuse->client->cct->_conf->fuse_use_invalidate_cb)
- fi->keep_cache = 1;

(quoted diff) +6 -0
+#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 8) 
+ if (cfuse->client->cct->_conf->fuse_disable_pagecache) 
+ fi->direct_io = 1; 
+ else if (cfuse->client->cct->_conf->fuse_use_invalidate_cb) 
+ fi->keep_cache = 1; 
+#endif 

So, does it disable both caches ? (fuse cache(keep_cache=0) and host cache (direct_io=1).

Isn't it possible to have direct_io = 0 and keep_cache = 1 at the same time ?

If I understand, fuse_use_invalidate_cb is to be able to invalidate fuse cache.

Regards,

Alexandre.

Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in 
the body of a message to [email protected] 
More majordomo info at http://vger.kernel.org/majordomo-info.html 
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in 
the body of a message to [email protected] 
More majordomo info at http://vger.kernel.org/majordomo-info.html