From: Alexandre DERUMIER Subject: Re: question about fuse_disable_pagecache Date: Tue, 6 Feb 2018 06:34:43 +0100 (CET) Message-ID: <445207277.2631286.1517895283679.JavaMail.zimbra@oxygem.tv> References: <112905846.2630949.1517892905113.JavaMail.zimbra@oxygem.tv> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Return-path: Received: from mailpro.odiso.net ([89.248.211.110]:47438 "EHLO mailpro.odiso.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbeBFFep (ORCPT ); Tue, 6 Feb 2018 00:34:45 -0500 In-Reply-To: Sender: ceph-devel-owner@vger.kernel.org List-ID: To: "Yan, Zheng" Cc: ceph-devel >> >>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 ! >>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" À: "aderumier" Cc: "ceph-devel" 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 On Tue, Feb 6, 2018 at 12:55 PM, Alexandre DERUMIER wrote: > 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. > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html