* Cleancache support in XFS
@ 2012-04-30 17:31 Alexey Vlasov
2012-04-30 19:12 ` Christoph Hellwig
0 siblings, 1 reply; 22+ messages in thread
From: Alexey Vlasov @ 2012-04-30 17:31 UTC (permalink / raw)
To: xfs
Hi.
Could you please tell me if you are planning to support cleancache in
XFS?
And when will it take place approximately?
Thank you in advance.
--
BRGDS. Alexey Vlasov.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2012-04-30 17:31 Cleancache support in XFS Alexey Vlasov
@ 2012-04-30 19:12 ` Christoph Hellwig
2012-05-02 8:02 ` Alexey Vlasov
0 siblings, 1 reply; 22+ messages in thread
From: Christoph Hellwig @ 2012-04-30 19:12 UTC (permalink / raw)
To: Alexey Vlasov; +Cc: xfs
On Mon, Apr 30, 2012 at 09:31:12PM +0400, Alexey Vlasov wrote:
> Hi.
>
> Could you please tell me if you are planning to support cleancache in
> XFS?
> And when will it take place approximately?
As soon as someone submits a patch. In theory it should just work, but
the cleancache maintainer require a completely idiotic one liner to
actually enable it. Feel free to submit it once you actually tested it.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2012-04-30 19:12 ` Christoph Hellwig
@ 2012-05-02 8:02 ` Alexey Vlasov
2012-05-05 23:40 ` Dave Chinner
0 siblings, 1 reply; 22+ messages in thread
From: Alexey Vlasov @ 2012-05-02 8:02 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Mon, Apr 30, 2012 at 03:12:18PM -0400, Christoph Hellwig wrote:
> >
> > Could you please tell me if you are planning to support cleancache in
> > XFS?
>
> As soon as someone submits a patch. In theory it should just work, but
> the cleancache maintainer require a completely idiotic one liner to
> actually enable it. Feel free to submit it once you actually tested it.
Cleancache_init_fs () I can actually put where it it should be but I
think it won't be enough. I think there some hooks needed (as for brtfs)
but I can't fix it as I'm far from programming.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2012-05-02 8:02 ` Alexey Vlasov
@ 2012-05-05 23:40 ` Dave Chinner
0 siblings, 0 replies; 22+ messages in thread
From: Dave Chinner @ 2012-05-05 23:40 UTC (permalink / raw)
To: Alexey Vlasov; +Cc: Christoph Hellwig, xfs
On Wed, May 02, 2012 at 12:02:20PM +0400, Alexey Vlasov wrote:
> On Mon, Apr 30, 2012 at 03:12:18PM -0400, Christoph Hellwig wrote:
> > >
> > > Could you please tell me if you are planning to support cleancache in
> > > XFS?
> >
> > As soon as someone submits a patch. In theory it should just work, but
> > the cleancache maintainer require a completely idiotic one liner to
> > actually enable it. Feel free to submit it once you actually tested it.
>
> Cleancache_init_fs () I can actually put where it it should be but I
> think it won't be enough. I think there some hooks needed (as for brtfs)
> but I can't fix it as I'm far from programming.
XFS uses mpage_readpages() so doesn't need other hooks. btrfs has
it's own readpage path, so needs them for that.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-11-21 22:12 ` Dave Chinner
@ 2013-11-26 16:35 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 22+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-11-26 16:35 UTC (permalink / raw)
To: Dave Chinner; +Cc: James Dingwall, Ben Myers, xfs
On Fri, Nov 22, 2013 at 09:12:14AM +1100, Dave Chinner wrote:
> On Thu, Nov 21, 2013 at 10:07:41AM -0600, Ben Myers wrote:
> > Hi James,
> >
> > On Thu, Nov 21, 2013 at 01:35:59PM +0000, James Dingwall wrote:
> > > Dave Chinner wrote:
> > > >On Tue, Jul 23, 2013 at 08:23:00AM +0100, James Dingwall wrote:
> > > >>Konrad Rzeszutek Wilk wrote:
> > > >>>On Fri, Jul 19, 2013 at 08:18:12AM +0100, James Dingwall wrote:
> > > >>>>Konrad Rzeszutek Wilk wrote:
> > > >>>>>On Fri, May 24, 2013 at 08:30:16AM +0100, James Dingwall wrote:
> > > >>>>>>Konrad Rzeszutek Wilk wrote:
> > > >>>>>>>On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
> > > >>>>>>>>Dave Chinner wrote:
> > > >>>>>>>>>On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
> > > >>>>>>>>>>Hi James,
> > > >>>>>>>Hey folks,
> > > >>>>>>>I am walking through my vacation-emails-mbox.
> > > >>>>>>>
> > > >>>>>>>>>>On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
> > > >>>>>>>>>>>In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
> > > >>>>>>>>>>>
> > > >>>>>>>>>>>$ grep -r cleancache fs/xfs
> > > >>>>>>>>>>>on the 3.9 kernel source suggests that no patch was submitted to
> > > >>>>>>>>>>>enable cleancache for the XFS filesystem. Since it was suggested
> > > >>>>>>>>>>>that this could be a one liner I've had a go and my first effort is
> > > >>>>>>>>>>>inline below. While this seems to compile OK I have no experience
> > > >>>>>>>>>>>in filesystems so I would appreciate it if anyone can point out that
> > > >>>>>>>>>>>it is obviously wrong and likely to eat my data before I try booting
> > > >>>>>>>>>>>the kernel.
> > > >>>>>>>>>>>
> > > >>>>>>>>>>>If it seems a reasonable attempt what would be the best way to check
> > > >>>>>>>>>>>that it isn't doing nasty things?
> > > >>>>>>>>>>Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
> > > >>>>>>>>>>includes a list of attributes the filesystem needs to have to work properly
> > > >>>>>>>>>>with cleancache.
> > > >>>>>>>>>So, those points are:
> > > >>>>>>>>I had started to look at these too but I feel very out of my depth!
> > > >>>>>>>>I had similar conclusions to what Dave wrote but I don't think my
> > > >>>>>>>>thoughts should carry very much (any) weight. Anyway I gambled and
> > > >>>>>>>>booted my xen domU with this patch and so far so good... xen top
> > > >>>>>>>>shows that tmem is now being used where previously it wasn't. I'll
> > > >>>>>>>>try running the xfstests at the weekend after a couple more days up
> > > >>>>>>>>time to see what happens.
> > > >>>>>>>And how did it go?
> > > >>>>>>I am running the patch I created on 3.9.3 on half of my xen guests
> > > >>>>>>now and have not noticed any stability or filesystem problems. xl
> > > >>>>>>top with 'T' shows that the guests running with it are using
> > > >>>>>>ephemeral pages were those without do not. I did do some runs with
> > > >>>>>>xfstests which had some failures but they were present with and
> > > >>>>>>without the patch. The best I can really offer is that it works for
> > > >>>>>>me, ymmv. The patch is available as commit
> > > >>>>>>c725011c4fc5d47e12d131f61bd91a58a40036b5 in
> > > >>>>>>https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in
> > > >>>>>>the first message of this thread.
> > > >>>>>Hey James,
> > > >>>>>
> > > >>>>>I've run this patch on my local tree and it looks to work right. I am
> > > >>>>>saying "looks" as I am hitting some other issue that I believe are
> > > >>>>>unralted to the patch - but I need to figure them out before I can
> > > >>>>>comfortably say: "Yes, this looks right and works for me as well."
> > > >>>>>
> > > >>>>>Stay tuned.
> > > >>>>Just to add that I have also had no observable problems running this
> > > >>>>patch on 3.10.0 or 3.10.1.
> > > >>>Yup. And I tested it as well. In other words if you would like to add
> > > >>>Acked-by from me that would be super. Thanks!
> > > >>My patch is now available in https://github.com/JKDingwall/linux.git
> > > >>xfs-enable-cleancache as commit id
> > > >>6d50663e4ec88b7e1fd872b12ac310b1f4bb38c6. I have rebased it on 3.10
> > > >>with KRW's Acked-by and my Signed-off-by in the commit message. Is
> > > >>it reasonable for this to be considered for 3.12 or would further
> > > >>testing be required?
> > > >I think that's sufficient. Send it to the list ;)
> > > >
> > > >Cheers,
> > > >
> > > >Dave.
> > > I had a quick look through the 3.12 sources today and noted that
> > > this patch did not seem to get picked up. I'm still running with it
> > > and am now on 3.12 with no observed problems. I'm happy to rebase
> > > against 3.12 if required but it seems simple enough it should go on
> > > cleanly to the current development tree.
> >
> > It hasn't been picked up because I'm not quite convinced it's ok to do this.
> > See if you can get a Dave, Christoph, or Eric to offer a Reviewed-by with a
> > little explanation of why this is ok and I'll pull it in. ;)
>
> Like I said back in July, it's OK because they performed a
> substantial amount of testing like we asked them to it didn't show
> up any obvious regressions.
>
> Reviewed-by: Dave Chinner <david@fromorbit.com>
Yeey! (and I should have so read this before I sent the other email out).
Should the patch be rebased and resent? Thanks.
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-11-21 16:07 ` Ben Myers
2013-11-21 22:12 ` Dave Chinner
@ 2013-11-26 16:35 ` Konrad Rzeszutek Wilk
1 sibling, 0 replies; 22+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-11-26 16:35 UTC (permalink / raw)
To: Ben Myers; +Cc: James Dingwall, xfs
On Thu, Nov 21, 2013 at 10:07:41AM -0600, Ben Myers wrote:
> Hi James,
>
> On Thu, Nov 21, 2013 at 01:35:59PM +0000, James Dingwall wrote:
> > Dave Chinner wrote:
> > >On Tue, Jul 23, 2013 at 08:23:00AM +0100, James Dingwall wrote:
> > >>Konrad Rzeszutek Wilk wrote:
> > >>>On Fri, Jul 19, 2013 at 08:18:12AM +0100, James Dingwall wrote:
> > >>>>Konrad Rzeszutek Wilk wrote:
> > >>>>>On Fri, May 24, 2013 at 08:30:16AM +0100, James Dingwall wrote:
> > >>>>>>Konrad Rzeszutek Wilk wrote:
> > >>>>>>>On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
> > >>>>>>>>Dave Chinner wrote:
> > >>>>>>>>>On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
> > >>>>>>>>>>Hi James,
> > >>>>>>>Hey folks,
> > >>>>>>>I am walking through my vacation-emails-mbox.
> > >>>>>>>
> > >>>>>>>>>>On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
> > >>>>>>>>>>>In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
> > >>>>>>>>>>>
> > >>>>>>>>>>>$ grep -r cleancache fs/xfs
> > >>>>>>>>>>>on the 3.9 kernel source suggests that no patch was submitted to
> > >>>>>>>>>>>enable cleancache for the XFS filesystem. Since it was suggested
> > >>>>>>>>>>>that this could be a one liner I've had a go and my first effort is
> > >>>>>>>>>>>inline below. While this seems to compile OK I have no experience
> > >>>>>>>>>>>in filesystems so I would appreciate it if anyone can point out that
> > >>>>>>>>>>>it is obviously wrong and likely to eat my data before I try booting
> > >>>>>>>>>>>the kernel.
> > >>>>>>>>>>>
> > >>>>>>>>>>>If it seems a reasonable attempt what would be the best way to check
> > >>>>>>>>>>>that it isn't doing nasty things?
> > >>>>>>>>>>Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
> > >>>>>>>>>>includes a list of attributes the filesystem needs to have to work properly
> > >>>>>>>>>>with cleancache.
> > >>>>>>>>>So, those points are:
> > >>>>>>>>I had started to look at these too but I feel very out of my depth!
> > >>>>>>>>I had similar conclusions to what Dave wrote but I don't think my
> > >>>>>>>>thoughts should carry very much (any) weight. Anyway I gambled and
> > >>>>>>>>booted my xen domU with this patch and so far so good... xen top
> > >>>>>>>>shows that tmem is now being used where previously it wasn't. I'll
> > >>>>>>>>try running the xfstests at the weekend after a couple more days up
> > >>>>>>>>time to see what happens.
> > >>>>>>>And how did it go?
> > >>>>>>I am running the patch I created on 3.9.3 on half of my xen guests
> > >>>>>>now and have not noticed any stability or filesystem problems. xl
> > >>>>>>top with 'T' shows that the guests running with it are using
> > >>>>>>ephemeral pages were those without do not. I did do some runs with
> > >>>>>>xfstests which had some failures but they were present with and
> > >>>>>>without the patch. The best I can really offer is that it works for
> > >>>>>>me, ymmv. The patch is available as commit
> > >>>>>>c725011c4fc5d47e12d131f61bd91a58a40036b5 in
> > >>>>>>https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in
> > >>>>>>the first message of this thread.
> > >>>>>Hey James,
> > >>>>>
> > >>>>>I've run this patch on my local tree and it looks to work right. I am
> > >>>>>saying "looks" as I am hitting some other issue that I believe are
> > >>>>>unralted to the patch - but I need to figure them out before I can
> > >>>>>comfortably say: "Yes, this looks right and works for me as well."
> > >>>>>
> > >>>>>Stay tuned.
> > >>>>Just to add that I have also had no observable problems running this
> > >>>>patch on 3.10.0 or 3.10.1.
> > >>>Yup. And I tested it as well. In other words if you would like to add
> > >>>Acked-by from me that would be super. Thanks!
> > >>My patch is now available in https://github.com/JKDingwall/linux.git
> > >>xfs-enable-cleancache as commit id
> > >>6d50663e4ec88b7e1fd872b12ac310b1f4bb38c6. I have rebased it on 3.10
> > >>with KRW's Acked-by and my Signed-off-by in the commit message. Is
> > >>it reasonable for this to be considered for 3.12 or would further
> > >>testing be required?
> > >I think that's sufficient. Send it to the list ;)
> > >
> > >Cheers,
> > >
> > >Dave.
> > I had a quick look through the 3.12 sources today and noted that
> > this patch did not seem to get picked up. I'm still running with it
> > and am now on 3.12 with no observed problems. I'm happy to rebase
> > against 3.12 if required but it seems simple enough it should go on
> > cleanly to the current development tree.
>
> It hasn't been picked up because I'm not quite convinced it's ok to do this.
In terms of process (acks, etc) or how it functions/meshes with cleancache?
> See if you can get a Dave, Christoph, or Eric to offer a Reviewed-by with a
> little explanation of why this is ok and I'll pull it in. ;)
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-11-21 16:07 ` Ben Myers
@ 2013-11-21 22:12 ` Dave Chinner
2013-11-26 16:35 ` Konrad Rzeszutek Wilk
2013-11-26 16:35 ` Konrad Rzeszutek Wilk
1 sibling, 1 reply; 22+ messages in thread
From: Dave Chinner @ 2013-11-21 22:12 UTC (permalink / raw)
To: Ben Myers; +Cc: James Dingwall, Konrad Rzeszutek Wilk, xfs
On Thu, Nov 21, 2013 at 10:07:41AM -0600, Ben Myers wrote:
> Hi James,
>
> On Thu, Nov 21, 2013 at 01:35:59PM +0000, James Dingwall wrote:
> > Dave Chinner wrote:
> > >On Tue, Jul 23, 2013 at 08:23:00AM +0100, James Dingwall wrote:
> > >>Konrad Rzeszutek Wilk wrote:
> > >>>On Fri, Jul 19, 2013 at 08:18:12AM +0100, James Dingwall wrote:
> > >>>>Konrad Rzeszutek Wilk wrote:
> > >>>>>On Fri, May 24, 2013 at 08:30:16AM +0100, James Dingwall wrote:
> > >>>>>>Konrad Rzeszutek Wilk wrote:
> > >>>>>>>On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
> > >>>>>>>>Dave Chinner wrote:
> > >>>>>>>>>On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
> > >>>>>>>>>>Hi James,
> > >>>>>>>Hey folks,
> > >>>>>>>I am walking through my vacation-emails-mbox.
> > >>>>>>>
> > >>>>>>>>>>On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
> > >>>>>>>>>>>In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
> > >>>>>>>>>>>
> > >>>>>>>>>>>$ grep -r cleancache fs/xfs
> > >>>>>>>>>>>on the 3.9 kernel source suggests that no patch was submitted to
> > >>>>>>>>>>>enable cleancache for the XFS filesystem. Since it was suggested
> > >>>>>>>>>>>that this could be a one liner I've had a go and my first effort is
> > >>>>>>>>>>>inline below. While this seems to compile OK I have no experience
> > >>>>>>>>>>>in filesystems so I would appreciate it if anyone can point out that
> > >>>>>>>>>>>it is obviously wrong and likely to eat my data before I try booting
> > >>>>>>>>>>>the kernel.
> > >>>>>>>>>>>
> > >>>>>>>>>>>If it seems a reasonable attempt what would be the best way to check
> > >>>>>>>>>>>that it isn't doing nasty things?
> > >>>>>>>>>>Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
> > >>>>>>>>>>includes a list of attributes the filesystem needs to have to work properly
> > >>>>>>>>>>with cleancache.
> > >>>>>>>>>So, those points are:
> > >>>>>>>>I had started to look at these too but I feel very out of my depth!
> > >>>>>>>>I had similar conclusions to what Dave wrote but I don't think my
> > >>>>>>>>thoughts should carry very much (any) weight. Anyway I gambled and
> > >>>>>>>>booted my xen domU with this patch and so far so good... xen top
> > >>>>>>>>shows that tmem is now being used where previously it wasn't. I'll
> > >>>>>>>>try running the xfstests at the weekend after a couple more days up
> > >>>>>>>>time to see what happens.
> > >>>>>>>And how did it go?
> > >>>>>>I am running the patch I created on 3.9.3 on half of my xen guests
> > >>>>>>now and have not noticed any stability or filesystem problems. xl
> > >>>>>>top with 'T' shows that the guests running with it are using
> > >>>>>>ephemeral pages were those without do not. I did do some runs with
> > >>>>>>xfstests which had some failures but they were present with and
> > >>>>>>without the patch. The best I can really offer is that it works for
> > >>>>>>me, ymmv. The patch is available as commit
> > >>>>>>c725011c4fc5d47e12d131f61bd91a58a40036b5 in
> > >>>>>>https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in
> > >>>>>>the first message of this thread.
> > >>>>>Hey James,
> > >>>>>
> > >>>>>I've run this patch on my local tree and it looks to work right. I am
> > >>>>>saying "looks" as I am hitting some other issue that I believe are
> > >>>>>unralted to the patch - but I need to figure them out before I can
> > >>>>>comfortably say: "Yes, this looks right and works for me as well."
> > >>>>>
> > >>>>>Stay tuned.
> > >>>>Just to add that I have also had no observable problems running this
> > >>>>patch on 3.10.0 or 3.10.1.
> > >>>Yup. And I tested it as well. In other words if you would like to add
> > >>>Acked-by from me that would be super. Thanks!
> > >>My patch is now available in https://github.com/JKDingwall/linux.git
> > >>xfs-enable-cleancache as commit id
> > >>6d50663e4ec88b7e1fd872b12ac310b1f4bb38c6. I have rebased it on 3.10
> > >>with KRW's Acked-by and my Signed-off-by in the commit message. Is
> > >>it reasonable for this to be considered for 3.12 or would further
> > >>testing be required?
> > >I think that's sufficient. Send it to the list ;)
> > >
> > >Cheers,
> > >
> > >Dave.
> > I had a quick look through the 3.12 sources today and noted that
> > this patch did not seem to get picked up. I'm still running with it
> > and am now on 3.12 with no observed problems. I'm happy to rebase
> > against 3.12 if required but it seems simple enough it should go on
> > cleanly to the current development tree.
>
> It hasn't been picked up because I'm not quite convinced it's ok to do this.
> See if you can get a Dave, Christoph, or Eric to offer a Reviewed-by with a
> little explanation of why this is ok and I'll pull it in. ;)
Like I said back in July, it's OK because they performed a
substantial amount of testing like we asked them to it didn't show
up any obvious regressions.
Reviewed-by: Dave Chinner <david@fromorbit.com>
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-11-21 13:35 ` James Dingwall
@ 2013-11-21 16:07 ` Ben Myers
2013-11-21 22:12 ` Dave Chinner
2013-11-26 16:35 ` Konrad Rzeszutek Wilk
0 siblings, 2 replies; 22+ messages in thread
From: Ben Myers @ 2013-11-21 16:07 UTC (permalink / raw)
To: James Dingwall; +Cc: Konrad Rzeszutek Wilk, xfs
Hi James,
On Thu, Nov 21, 2013 at 01:35:59PM +0000, James Dingwall wrote:
> Dave Chinner wrote:
> >On Tue, Jul 23, 2013 at 08:23:00AM +0100, James Dingwall wrote:
> >>Konrad Rzeszutek Wilk wrote:
> >>>On Fri, Jul 19, 2013 at 08:18:12AM +0100, James Dingwall wrote:
> >>>>Konrad Rzeszutek Wilk wrote:
> >>>>>On Fri, May 24, 2013 at 08:30:16AM +0100, James Dingwall wrote:
> >>>>>>Konrad Rzeszutek Wilk wrote:
> >>>>>>>On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
> >>>>>>>>Dave Chinner wrote:
> >>>>>>>>>On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
> >>>>>>>>>>Hi James,
> >>>>>>>Hey folks,
> >>>>>>>I am walking through my vacation-emails-mbox.
> >>>>>>>
> >>>>>>>>>>On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
> >>>>>>>>>>>In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
> >>>>>>>>>>>
> >>>>>>>>>>>$ grep -r cleancache fs/xfs
> >>>>>>>>>>>on the 3.9 kernel source suggests that no patch was submitted to
> >>>>>>>>>>>enable cleancache for the XFS filesystem. Since it was suggested
> >>>>>>>>>>>that this could be a one liner I've had a go and my first effort is
> >>>>>>>>>>>inline below. While this seems to compile OK I have no experience
> >>>>>>>>>>>in filesystems so I would appreciate it if anyone can point out that
> >>>>>>>>>>>it is obviously wrong and likely to eat my data before I try booting
> >>>>>>>>>>>the kernel.
> >>>>>>>>>>>
> >>>>>>>>>>>If it seems a reasonable attempt what would be the best way to check
> >>>>>>>>>>>that it isn't doing nasty things?
> >>>>>>>>>>Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
> >>>>>>>>>>includes a list of attributes the filesystem needs to have to work properly
> >>>>>>>>>>with cleancache.
> >>>>>>>>>So, those points are:
> >>>>>>>>I had started to look at these too but I feel very out of my depth!
> >>>>>>>>I had similar conclusions to what Dave wrote but I don't think my
> >>>>>>>>thoughts should carry very much (any) weight. Anyway I gambled and
> >>>>>>>>booted my xen domU with this patch and so far so good... xen top
> >>>>>>>>shows that tmem is now being used where previously it wasn't. I'll
> >>>>>>>>try running the xfstests at the weekend after a couple more days up
> >>>>>>>>time to see what happens.
> >>>>>>>And how did it go?
> >>>>>>I am running the patch I created on 3.9.3 on half of my xen guests
> >>>>>>now and have not noticed any stability or filesystem problems. xl
> >>>>>>top with 'T' shows that the guests running with it are using
> >>>>>>ephemeral pages were those without do not. I did do some runs with
> >>>>>>xfstests which had some failures but they were present with and
> >>>>>>without the patch. The best I can really offer is that it works for
> >>>>>>me, ymmv. The patch is available as commit
> >>>>>>c725011c4fc5d47e12d131f61bd91a58a40036b5 in
> >>>>>>https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in
> >>>>>>the first message of this thread.
> >>>>>Hey James,
> >>>>>
> >>>>>I've run this patch on my local tree and it looks to work right. I am
> >>>>>saying "looks" as I am hitting some other issue that I believe are
> >>>>>unralted to the patch - but I need to figure them out before I can
> >>>>>comfortably say: "Yes, this looks right and works for me as well."
> >>>>>
> >>>>>Stay tuned.
> >>>>Just to add that I have also had no observable problems running this
> >>>>patch on 3.10.0 or 3.10.1.
> >>>Yup. And I tested it as well. In other words if you would like to add
> >>>Acked-by from me that would be super. Thanks!
> >>My patch is now available in https://github.com/JKDingwall/linux.git
> >>xfs-enable-cleancache as commit id
> >>6d50663e4ec88b7e1fd872b12ac310b1f4bb38c6. I have rebased it on 3.10
> >>with KRW's Acked-by and my Signed-off-by in the commit message. Is
> >>it reasonable for this to be considered for 3.12 or would further
> >>testing be required?
> >I think that's sufficient. Send it to the list ;)
> >
> >Cheers,
> >
> >Dave.
> I had a quick look through the 3.12 sources today and noted that
> this patch did not seem to get picked up. I'm still running with it
> and am now on 3.12 with no observed problems. I'm happy to rebase
> against 3.12 if required but it seems simple enough it should go on
> cleanly to the current development tree.
It hasn't been picked up because I'm not quite convinced it's ok to do this.
See if you can get a Dave, Christoph, or Eric to offer a Reviewed-by with a
little explanation of why this is ok and I'll pull it in. ;)
Thanks,
Ben
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-07-23 8:27 ` Dave Chinner
2013-07-23 8:53 ` James Dingwall
@ 2013-11-21 13:35 ` James Dingwall
2013-11-21 16:07 ` Ben Myers
1 sibling, 1 reply; 22+ messages in thread
From: James Dingwall @ 2013-11-21 13:35 UTC (permalink / raw)
To: Dave Chinner; +Cc: Ben Myers, xfs, Konrad Rzeszutek Wilk
Dave Chinner wrote:
> On Tue, Jul 23, 2013 at 08:23:00AM +0100, James Dingwall wrote:
>> Konrad Rzeszutek Wilk wrote:
>>> On Fri, Jul 19, 2013 at 08:18:12AM +0100, James Dingwall wrote:
>>>> Konrad Rzeszutek Wilk wrote:
>>>>> On Fri, May 24, 2013 at 08:30:16AM +0100, James Dingwall wrote:
>>>>>> Konrad Rzeszutek Wilk wrote:
>>>>>>> On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
>>>>>>>> Dave Chinner wrote:
>>>>>>>>> On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
>>>>>>>>>> Hi James,
>>>>>>> Hey folks,
>>>>>>> I am walking through my vacation-emails-mbox.
>>>>>>>
>>>>>>>>>> On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
>>>>>>>>>>> In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
>>>>>>>>>>>
>>>>>>>>>>> $ grep -r cleancache fs/xfs
>>>>>>>>>>> on the 3.9 kernel source suggests that no patch was submitted to
>>>>>>>>>>> enable cleancache for the XFS filesystem. Since it was suggested
>>>>>>>>>>> that this could be a one liner I've had a go and my first effort is
>>>>>>>>>>> inline below. While this seems to compile OK I have no experience
>>>>>>>>>>> in filesystems so I would appreciate it if anyone can point out that
>>>>>>>>>>> it is obviously wrong and likely to eat my data before I try booting
>>>>>>>>>>> the kernel.
>>>>>>>>>>>
>>>>>>>>>>> If it seems a reasonable attempt what would be the best way to check
>>>>>>>>>>> that it isn't doing nasty things?
>>>>>>>>>> Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
>>>>>>>>>> includes a list of attributes the filesystem needs to have to work properly
>>>>>>>>>> with cleancache.
>>>>>>>>> So, those points are:
>>>>>>>> I had started to look at these too but I feel very out of my depth!
>>>>>>>> I had similar conclusions to what Dave wrote but I don't think my
>>>>>>>> thoughts should carry very much (any) weight. Anyway I gambled and
>>>>>>>> booted my xen domU with this patch and so far so good... xen top
>>>>>>>> shows that tmem is now being used where previously it wasn't. I'll
>>>>>>>> try running the xfstests at the weekend after a couple more days up
>>>>>>>> time to see what happens.
>>>>>>> And how did it go?
>>>>>> I am running the patch I created on 3.9.3 on half of my xen guests
>>>>>> now and have not noticed any stability or filesystem problems. xl
>>>>>> top with 'T' shows that the guests running with it are using
>>>>>> ephemeral pages were those without do not. I did do some runs with
>>>>>> xfstests which had some failures but they were present with and
>>>>>> without the patch. The best I can really offer is that it works for
>>>>>> me, ymmv. The patch is available as commit
>>>>>> c725011c4fc5d47e12d131f61bd91a58a40036b5 in
>>>>>> https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in
>>>>>> the first message of this thread.
>>>>> Hey James,
>>>>>
>>>>> I've run this patch on my local tree and it looks to work right. I am
>>>>> saying "looks" as I am hitting some other issue that I believe are
>>>>> unralted to the patch - but I need to figure them out before I can
>>>>> comfortably say: "Yes, this looks right and works for me as well."
>>>>>
>>>>> Stay tuned.
>>>> Just to add that I have also had no observable problems running this
>>>> patch on 3.10.0 or 3.10.1.
>>> Yup. And I tested it as well. In other words if you would like to add
>>> Acked-by from me that would be super. Thanks!
>> My patch is now available in https://github.com/JKDingwall/linux.git
>> xfs-enable-cleancache as commit id
>> 6d50663e4ec88b7e1fd872b12ac310b1f4bb38c6. I have rebased it on 3.10
>> with KRW's Acked-by and my Signed-off-by in the commit message. Is
>> it reasonable for this to be considered for 3.12 or would further
>> testing be required?
> I think that's sufficient. Send it to the list ;)
>
> Cheers,
>
> Dave.
I had a quick look through the 3.12 sources today and noted that this
patch did not seem to get picked up. I'm still running with it and am
now on 3.12 with no observed problems. I'm happy to rebase against 3.12
if required but it seems simple enough it should go on cleanly to the
current development tree.
Thanks,
James
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: Cleancache support in XFS
2013-07-23 8:27 ` Dave Chinner
@ 2013-07-23 8:53 ` James Dingwall
2013-11-21 13:35 ` James Dingwall
1 sibling, 0 replies; 22+ messages in thread
From: James Dingwall @ 2013-07-23 8:53 UTC (permalink / raw)
To: Dave Chinner; +Cc: Ben Myers, xfs, Konrad Rzeszutek Wilk
________________________________________
From: Dave Chinner <david@fromorbit.com>
Sent: 23 July 2013 09:27
To: James Dingwall
Cc: Konrad Rzeszutek Wilk; Ben Myers; xfs@oss.sgi.com
Subject: Re: Cleancache support in XFS
On Tue, Jul 23, 2013 at 08:23:00AM +0100, James Dingwall wrote:
> Konrad Rzeszutek Wilk wrote:
> >On Fri, Jul 19, 2013 at 08:18:12AM +0100, James Dingwall wrote:
> >>Konrad Rzeszutek Wilk wrote:
> >>>On Fri, May 24, 2013 at 08:30:16AM +0100, James Dingwall wrote:
> >>>>Konrad Rzeszutek Wilk wrote:
> >>>>>On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
> >>>>>>Dave Chinner wrote:
> >>>>>>>On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
> >>>>>>>>Hi James,
> >>>>>Hey folks,
> >>>>>I am walking through my vacation-emails-mbox.
> >>>>>
> >>>>>>>>On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
> >>>>>>>>>In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
> >>>>>>>>>
> >>>>>>>>>$ grep -r cleancache fs/xfs
> >>>>>>>>>on the 3.9 kernel source suggests that no patch was submitted to
> >>>>>>>>>enable cleancache for the XFS filesystem. Since it was suggested
> >>>>>>>>>that this could be a one liner I've had a go and my first effort is
> >>>>>>>>>inline below. While this seems to compile OK I have no experience
> >>>>>>>>>in filesystems so I would appreciate it if anyone can point out that
> >>>>>>>>>it is obviously wrong and likely to eat my data before I try booting
> >>>>>>>>>the kernel.
> >>>>>>>>>
> >>>>>>>>>If it seems a reasonable attempt what would be the best way to check
> >>>>>>>>>that it isn't doing nasty things?
> >>>>>>>>Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
> >>>>>>>>includes a list of attributes the filesystem needs to have to work properly
> >>>>>>>>with cleancache.
> >>>>>>>So, those points are:
> >>>>>>I had started to look at these too but I feel very out of my depth!
> >>>>>>I had similar conclusions to what Dave wrote but I don't think my
> >>>>>>thoughts should carry very much (any) weight. Anyway I gambled and
> >>>>>>booted my xen domU with this patch and so far so good... xen top
> >>>>>>shows that tmem is now being used where previously it wasn't. I'll
> >>>>>>try running the xfstests at the weekend after a couple more days up
> >>>>>>time to see what happens.
> >>>>>And how did it go?
> >>>>I am running the patch I created on 3.9.3 on half of my xen guests
> >>>>now and have not noticed any stability or filesystem problems. xl
> >>>>top with 'T' shows that the guests running with it are using
> >>>>ephemeral pages were those without do not. I did do some runs with
> >>>>xfstests which had some failures but they were present with and
> >>>>without the patch. The best I can really offer is that it works for
> >>>>me, ymmv. The patch is available as commit
> >>>>c725011c4fc5d47e12d131f61bd91a58a40036b5 in
> >>>>https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in
> >>>>the first message of this thread.
> >>>Hey James,
> >>>
> >>>I've run this patch on my local tree and it looks to work right. I am
> >>>saying "looks" as I am hitting some other issue that I believe are
> >>>unralted to the patch - but I need to figure them out before I can
> >>>comfortably say: "Yes, this looks right and works for me as well."
> >>>
> >>>Stay tuned.
> >>Just to add that I have also had no observable problems running this
> >>patch on 3.10.0 or 3.10.1.
> >Yup. And I tested it as well. In other words if you would like to add
> >Acked-by from me that would be super. Thanks!
> My patch is now available in https://github.com/JKDingwall/linux.git
> xfs-enable-cleancache as commit id
> 6d50663e4ec88b7e1fd872b12ac310b1f4bb38c6. I have rebased it on 3.10
> with KRW's Acked-by and my Signed-off-by in the commit message. Is
> it reasonable for this to be considered for 3.12 or would further
> testing be required?
I think that's sufficient. Send it to the list ;)
I hope that the inline version below will apply cleanly and the white space hasn't been corrupted.
Regards,
James
commit 6d50663e4ec88b7e1fd872b12ac310b1f4bb38c6
Author: James Dingwall <james@dingwall.me.uk>
Date: Wed May 1 17:32:26 2013 +0100
fs/xfs: add cleancache support to the filesystem
Enabling cleancache for xfs will allow files cached from an xfs filesystem to be stored in any available tmem pools. This has been tested with Xen 4.2.2 where xl top shows usage of the
tmem pools where this is enabled in the guest's kernel.
Signed-off-by: James Dingwall <james@dingwall.me.uk>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 3033ba5..bcc1668 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -61,6 +61,7 @@
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/parser.h>
+#include <linux/cleancache.h>
static const struct super_operations xfs_super_operations;
static kmem_zone_t *xfs_ioend_zone;
@@ -1500,6 +1501,8 @@ xfs_fs_fill_super(
goto out_unmount;
}
+ cleancache_init_fs(sb);
+
return 0;
out_filestream_unmount:
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-07-23 7:23 ` James Dingwall
@ 2013-07-23 8:27 ` Dave Chinner
2013-07-23 8:53 ` James Dingwall
2013-11-21 13:35 ` James Dingwall
0 siblings, 2 replies; 22+ messages in thread
From: Dave Chinner @ 2013-07-23 8:27 UTC (permalink / raw)
To: James Dingwall; +Cc: Ben Myers, xfs, Konrad Rzeszutek Wilk
On Tue, Jul 23, 2013 at 08:23:00AM +0100, James Dingwall wrote:
> Konrad Rzeszutek Wilk wrote:
> >On Fri, Jul 19, 2013 at 08:18:12AM +0100, James Dingwall wrote:
> >>Konrad Rzeszutek Wilk wrote:
> >>>On Fri, May 24, 2013 at 08:30:16AM +0100, James Dingwall wrote:
> >>>>Konrad Rzeszutek Wilk wrote:
> >>>>>On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
> >>>>>>Dave Chinner wrote:
> >>>>>>>On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
> >>>>>>>>Hi James,
> >>>>>Hey folks,
> >>>>>I am walking through my vacation-emails-mbox.
> >>>>>
> >>>>>>>>On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
> >>>>>>>>>In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
> >>>>>>>>>
> >>>>>>>>>$ grep -r cleancache fs/xfs
> >>>>>>>>>on the 3.9 kernel source suggests that no patch was submitted to
> >>>>>>>>>enable cleancache for the XFS filesystem. Since it was suggested
> >>>>>>>>>that this could be a one liner I've had a go and my first effort is
> >>>>>>>>>inline below. While this seems to compile OK I have no experience
> >>>>>>>>>in filesystems so I would appreciate it if anyone can point out that
> >>>>>>>>>it is obviously wrong and likely to eat my data before I try booting
> >>>>>>>>>the kernel.
> >>>>>>>>>
> >>>>>>>>>If it seems a reasonable attempt what would be the best way to check
> >>>>>>>>>that it isn't doing nasty things?
> >>>>>>>>Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
> >>>>>>>>includes a list of attributes the filesystem needs to have to work properly
> >>>>>>>>with cleancache.
> >>>>>>>So, those points are:
> >>>>>>I had started to look at these too but I feel very out of my depth!
> >>>>>>I had similar conclusions to what Dave wrote but I don't think my
> >>>>>>thoughts should carry very much (any) weight. Anyway I gambled and
> >>>>>>booted my xen domU with this patch and so far so good... xen top
> >>>>>>shows that tmem is now being used where previously it wasn't. I'll
> >>>>>>try running the xfstests at the weekend after a couple more days up
> >>>>>>time to see what happens.
> >>>>>And how did it go?
> >>>>I am running the patch I created on 3.9.3 on half of my xen guests
> >>>>now and have not noticed any stability or filesystem problems. xl
> >>>>top with 'T' shows that the guests running with it are using
> >>>>ephemeral pages were those without do not. I did do some runs with
> >>>>xfstests which had some failures but they were present with and
> >>>>without the patch. The best I can really offer is that it works for
> >>>>me, ymmv. The patch is available as commit
> >>>>c725011c4fc5d47e12d131f61bd91a58a40036b5 in
> >>>>https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in
> >>>>the first message of this thread.
> >>>Hey James,
> >>>
> >>>I've run this patch on my local tree and it looks to work right. I am
> >>>saying "looks" as I am hitting some other issue that I believe are
> >>>unralted to the patch - but I need to figure them out before I can
> >>>comfortably say: "Yes, this looks right and works for me as well."
> >>>
> >>>Stay tuned.
> >>Just to add that I have also had no observable problems running this
> >>patch on 3.10.0 or 3.10.1.
> >Yup. And I tested it as well. In other words if you would like to add
> >Acked-by from me that would be super. Thanks!
> My patch is now available in https://github.com/JKDingwall/linux.git
> xfs-enable-cleancache as commit id
> 6d50663e4ec88b7e1fd872b12ac310b1f4bb38c6. I have rebased it on 3.10
> with KRW's Acked-by and my Signed-off-by in the commit message. Is
> it reasonable for this to be considered for 3.12 or would further
> testing be required?
I think that's sufficient. Send it to the list ;)
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-07-22 15:48 ` Konrad Rzeszutek Wilk
@ 2013-07-23 7:23 ` James Dingwall
2013-07-23 8:27 ` Dave Chinner
0 siblings, 1 reply; 22+ messages in thread
From: James Dingwall @ 2013-07-23 7:23 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: Ben Myers, xfs
Konrad Rzeszutek Wilk wrote:
> On Fri, Jul 19, 2013 at 08:18:12AM +0100, James Dingwall wrote:
>> Konrad Rzeszutek Wilk wrote:
>>> On Fri, May 24, 2013 at 08:30:16AM +0100, James Dingwall wrote:
>>>> Konrad Rzeszutek Wilk wrote:
>>>>> On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
>>>>>> Dave Chinner wrote:
>>>>>>> On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
>>>>>>>> Hi James,
>>>>> Hey folks,
>>>>> I am walking through my vacation-emails-mbox.
>>>>>
>>>>>>>> On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
>>>>>>>>> In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
>>>>>>>>>
>>>>>>>>> $ grep -r cleancache fs/xfs
>>>>>>>>> on the 3.9 kernel source suggests that no patch was submitted to
>>>>>>>>> enable cleancache for the XFS filesystem. Since it was suggested
>>>>>>>>> that this could be a one liner I've had a go and my first effort is
>>>>>>>>> inline below. While this seems to compile OK I have no experience
>>>>>>>>> in filesystems so I would appreciate it if anyone can point out that
>>>>>>>>> it is obviously wrong and likely to eat my data before I try booting
>>>>>>>>> the kernel.
>>>>>>>>>
>>>>>>>>> If it seems a reasonable attempt what would be the best way to check
>>>>>>>>> that it isn't doing nasty things?
>>>>>>>> Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
>>>>>>>> includes a list of attributes the filesystem needs to have to work properly
>>>>>>>> with cleancache.
>>>>>>> So, those points are:
>>>>>> I had started to look at these too but I feel very out of my depth!
>>>>>> I had similar conclusions to what Dave wrote but I don't think my
>>>>>> thoughts should carry very much (any) weight. Anyway I gambled and
>>>>>> booted my xen domU with this patch and so far so good... xen top
>>>>>> shows that tmem is now being used where previously it wasn't. I'll
>>>>>> try running the xfstests at the weekend after a couple more days up
>>>>>> time to see what happens.
>>>>> And how did it go?
>>>> I am running the patch I created on 3.9.3 on half of my xen guests
>>>> now and have not noticed any stability or filesystem problems. xl
>>>> top with 'T' shows that the guests running with it are using
>>>> ephemeral pages were those without do not. I did do some runs with
>>>> xfstests which had some failures but they were present with and
>>>> without the patch. The best I can really offer is that it works for
>>>> me, ymmv. The patch is available as commit
>>>> c725011c4fc5d47e12d131f61bd91a58a40036b5 in
>>>> https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in
>>>> the first message of this thread.
>>> Hey James,
>>>
>>> I've run this patch on my local tree and it looks to work right. I am
>>> saying "looks" as I am hitting some other issue that I believe are
>>> unralted to the patch - but I need to figure them out before I can
>>> comfortably say: "Yes, this looks right and works for me as well."
>>>
>>> Stay tuned.
>> Just to add that I have also had no observable problems running this
>> patch on 3.10.0 or 3.10.1.
> Yup. And I tested it as well. In other words if you would like to add
> Acked-by from me that would be super. Thanks!
My patch is now available in https://github.com/JKDingwall/linux.git
xfs-enable-cleancache as commit id
6d50663e4ec88b7e1fd872b12ac310b1f4bb38c6. I have rebased it on 3.10
with KRW's Acked-by and my Signed-off-by in the commit message. Is it
reasonable for this to be considered for 3.12 or would further testing
be required?
Thanks,
James
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-07-19 7:18 ` James Dingwall
@ 2013-07-22 15:48 ` Konrad Rzeszutek Wilk
2013-07-23 7:23 ` James Dingwall
0 siblings, 1 reply; 22+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-07-22 15:48 UTC (permalink / raw)
To: James Dingwall; +Cc: Ben Myers, xfs
On Fri, Jul 19, 2013 at 08:18:12AM +0100, James Dingwall wrote:
> Konrad Rzeszutek Wilk wrote:
> >On Fri, May 24, 2013 at 08:30:16AM +0100, James Dingwall wrote:
> >>Konrad Rzeszutek Wilk wrote:
> >>>On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
> >>>>Dave Chinner wrote:
> >>>>>On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
> >>>>>>Hi James,
> >>>Hey folks,
> >>>I am walking through my vacation-emails-mbox.
> >>>
> >>>>>>On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
> >>>>>>>In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
> >>>>>>>
> >>>>>>>$ grep -r cleancache fs/xfs
> >>>>>>>on the 3.9 kernel source suggests that no patch was submitted to
> >>>>>>>enable cleancache for the XFS filesystem. Since it was suggested
> >>>>>>>that this could be a one liner I've had a go and my first effort is
> >>>>>>>inline below. While this seems to compile OK I have no experience
> >>>>>>>in filesystems so I would appreciate it if anyone can point out that
> >>>>>>>it is obviously wrong and likely to eat my data before I try booting
> >>>>>>>the kernel.
> >>>>>>>
> >>>>>>>If it seems a reasonable attempt what would be the best way to check
> >>>>>>>that it isn't doing nasty things?
> >>>>>>Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
> >>>>>>includes a list of attributes the filesystem needs to have to work properly
> >>>>>>with cleancache.
> >>>>>So, those points are:
> >>>>I had started to look at these too but I feel very out of my depth!
> >>>>I had similar conclusions to what Dave wrote but I don't think my
> >>>>thoughts should carry very much (any) weight. Anyway I gambled and
> >>>>booted my xen domU with this patch and so far so good... xen top
> >>>>shows that tmem is now being used where previously it wasn't. I'll
> >>>>try running the xfstests at the weekend after a couple more days up
> >>>>time to see what happens.
> >>>And how did it go?
> >>I am running the patch I created on 3.9.3 on half of my xen guests
> >>now and have not noticed any stability or filesystem problems. xl
> >>top with 'T' shows that the guests running with it are using
> >>ephemeral pages were those without do not. I did do some runs with
> >>xfstests which had some failures but they were present with and
> >>without the patch. The best I can really offer is that it works for
> >>me, ymmv. The patch is available as commit
> >>c725011c4fc5d47e12d131f61bd91a58a40036b5 in
> >>https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in
> >>the first message of this thread.
> >Hey James,
> >
> >I've run this patch on my local tree and it looks to work right. I am
> >saying "looks" as I am hitting some other issue that I believe are
> >unralted to the patch - but I need to figure them out before I can
> >comfortably say: "Yes, this looks right and works for me as well."
> >
> >Stay tuned.
> Just to add that I have also had no observable problems running this
> patch on 3.10.0 or 3.10.1.
Yup. And I tested it as well. In other words if you would like to add
Acked-by from me that would be super. Thanks!
>
> Regards,
> James
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-06-07 17:08 ` Konrad Rzeszutek Wilk
@ 2013-07-19 7:18 ` James Dingwall
2013-07-22 15:48 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 22+ messages in thread
From: James Dingwall @ 2013-07-19 7:18 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: Ben Myers, xfs
Konrad Rzeszutek Wilk wrote:
> On Fri, May 24, 2013 at 08:30:16AM +0100, James Dingwall wrote:
>> Konrad Rzeszutek Wilk wrote:
>>> On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
>>>> Dave Chinner wrote:
>>>>> On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
>>>>>> Hi James,
>>> Hey folks,
>>> I am walking through my vacation-emails-mbox.
>>>
>>>>>> On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
>>>>>>> In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
>>>>>>>
>>>>>>> $ grep -r cleancache fs/xfs
>>>>>>> on the 3.9 kernel source suggests that no patch was submitted to
>>>>>>> enable cleancache for the XFS filesystem. Since it was suggested
>>>>>>> that this could be a one liner I've had a go and my first effort is
>>>>>>> inline below. While this seems to compile OK I have no experience
>>>>>>> in filesystems so I would appreciate it if anyone can point out that
>>>>>>> it is obviously wrong and likely to eat my data before I try booting
>>>>>>> the kernel.
>>>>>>>
>>>>>>> If it seems a reasonable attempt what would be the best way to check
>>>>>>> that it isn't doing nasty things?
>>>>>> Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
>>>>>> includes a list of attributes the filesystem needs to have to work properly
>>>>>> with cleancache.
>>>>> So, those points are:
>>>> I had started to look at these too but I feel very out of my depth!
>>>> I had similar conclusions to what Dave wrote but I don't think my
>>>> thoughts should carry very much (any) weight. Anyway I gambled and
>>>> booted my xen domU with this patch and so far so good... xen top
>>>> shows that tmem is now being used where previously it wasn't. I'll
>>>> try running the xfstests at the weekend after a couple more days up
>>>> time to see what happens.
>>> And how did it go?
>> I am running the patch I created on 3.9.3 on half of my xen guests
>> now and have not noticed any stability or filesystem problems. xl
>> top with 'T' shows that the guests running with it are using
>> ephemeral pages were those without do not. I did do some runs with
>> xfstests which had some failures but they were present with and
>> without the patch. The best I can really offer is that it works for
>> me, ymmv. The patch is available as commit
>> c725011c4fc5d47e12d131f61bd91a58a40036b5 in
>> https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in
>> the first message of this thread.
> Hey James,
>
> I've run this patch on my local tree and it looks to work right. I am
> saying "looks" as I am hitting some other issue that I believe are
> unralted to the patch - but I need to figure them out before I can
> comfortably say: "Yes, this looks right and works for me as well."
>
> Stay tuned.
Just to add that I have also had no observable problems running this
patch on 3.10.0 or 3.10.1.
Regards,
James
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-05-24 7:30 ` James Dingwall
@ 2013-06-07 17:08 ` Konrad Rzeszutek Wilk
2013-07-19 7:18 ` James Dingwall
0 siblings, 1 reply; 22+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-06-07 17:08 UTC (permalink / raw)
To: James Dingwall; +Cc: Ben Myers, xfs
On Fri, May 24, 2013 at 08:30:16AM +0100, James Dingwall wrote:
> Konrad Rzeszutek Wilk wrote:
> >On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
> >>Dave Chinner wrote:
> >>>On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
> >>>>Hi James,
> >Hey folks,
> >I am walking through my vacation-emails-mbox.
> >
> >>>>On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
> >>>>>In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
> >>>>>
> >>>>>$ grep -r cleancache fs/xfs
> >>>>>on the 3.9 kernel source suggests that no patch was submitted to
> >>>>>enable cleancache for the XFS filesystem. Since it was suggested
> >>>>>that this could be a one liner I've had a go and my first effort is
> >>>>>inline below. While this seems to compile OK I have no experience
> >>>>>in filesystems so I would appreciate it if anyone can point out that
> >>>>>it is obviously wrong and likely to eat my data before I try booting
> >>>>>the kernel.
> >>>>>
> >>>>>If it seems a reasonable attempt what would be the best way to check
> >>>>>that it isn't doing nasty things?
> >>>>Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
> >>>>includes a list of attributes the filesystem needs to have to work properly
> >>>>with cleancache.
> >>>So, those points are:
> >>I had started to look at these too but I feel very out of my depth!
> >>I had similar conclusions to what Dave wrote but I don't think my
> >>thoughts should carry very much (any) weight. Anyway I gambled and
> >>booted my xen domU with this patch and so far so good... xen top
> >>shows that tmem is now being used where previously it wasn't. I'll
> >>try running the xfstests at the weekend after a couple more days up
> >>time to see what happens.
> >And how did it go?
> I am running the patch I created on 3.9.3 on half of my xen guests
> now and have not noticed any stability or filesystem problems. xl
> top with 'T' shows that the guests running with it are using
> ephemeral pages were those without do not. I did do some runs with
> xfstests which had some failures but they were present with and
> without the patch. The best I can really offer is that it works for
> me, ymmv. The patch is available as commit
> c725011c4fc5d47e12d131f61bd91a58a40036b5 in
> https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in
> the first message of this thread.
Hey James,
I've run this patch on my local tree and it looks to work right. I am
saying "looks" as I am hitting some other issue that I believe are
unralted to the patch - but I need to figure them out before I can
comfortably say: "Yes, this looks right and works for me as well."
Stay tuned.
>
> Regards,
> James
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-05-22 19:28 ` Konrad Rzeszutek Wilk
@ 2013-05-24 7:30 ` James Dingwall
2013-06-07 17:08 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 22+ messages in thread
From: James Dingwall @ 2013-05-24 7:30 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: Ben Myers, xfs
Konrad Rzeszutek Wilk wrote:
> On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
>> Dave Chinner wrote:
>>> On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
>>>> Hi James,
> Hey folks,
> I am walking through my vacation-emails-mbox.
>
>>>> On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
>>>>> In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
>>>>>
>>>>> $ grep -r cleancache fs/xfs
>>>>> on the 3.9 kernel source suggests that no patch was submitted to
>>>>> enable cleancache for the XFS filesystem. Since it was suggested
>>>>> that this could be a one liner I've had a go and my first effort is
>>>>> inline below. While this seems to compile OK I have no experience
>>>>> in filesystems so I would appreciate it if anyone can point out that
>>>>> it is obviously wrong and likely to eat my data before I try booting
>>>>> the kernel.
>>>>>
>>>>> If it seems a reasonable attempt what would be the best way to check
>>>>> that it isn't doing nasty things?
>>>> Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
>>>> includes a list of attributes the filesystem needs to have to work properly
>>>> with cleancache.
>>> So, those points are:
>> I had started to look at these too but I feel very out of my depth!
>> I had similar conclusions to what Dave wrote but I don't think my
>> thoughts should carry very much (any) weight. Anyway I gambled and
>> booted my xen domU with this patch and so far so good... xen top
>> shows that tmem is now being used where previously it wasn't. I'll
>> try running the xfstests at the weekend after a couple more days up
>> time to see what happens.
> And how did it go?
I am running the patch I created on 3.9.3 on half of my xen guests now
and have not noticed any stability or filesystem problems. xl top with
'T' shows that the guests running with it are using ephemeral pages were
those without do not. I did do some runs with xfstests which had some
failures but they were present with and without the patch. The best I
can really offer is that it works for me, ymmv. The patch is available
as commit c725011c4fc5d47e12d131f61bd91a58a40036b5 in
https://github.com/JKDingwall/linux.git xfs-enable-cleancache or in the
first message of this thread.
Regards,
James
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-05-02 8:24 ` James Dingwall
@ 2013-05-22 19:28 ` Konrad Rzeszutek Wilk
2013-05-24 7:30 ` James Dingwall
0 siblings, 1 reply; 22+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-05-22 19:28 UTC (permalink / raw)
To: James Dingwall; +Cc: Ben Myers, xfs
On Thu, May 02, 2013 at 09:24:51AM +0100, James Dingwall wrote:
> Dave Chinner wrote:
> >On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
> >>Hi James,
Hey folks,
I am walking through my vacation-emails-mbox.
> >>
> >>On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
> >>>In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
> >>>
> >>>$ grep -r cleancache fs/xfs
> >>>on the 3.9 kernel source suggests that no patch was submitted to
> >>>enable cleancache for the XFS filesystem. Since it was suggested
> >>>that this could be a one liner I've had a go and my first effort is
> >>>inline below. While this seems to compile OK I have no experience
> >>>in filesystems so I would appreciate it if anyone can point out that
> >>>it is obviously wrong and likely to eat my data before I try booting
> >>>the kernel.
> >>>
> >>>If it seems a reasonable attempt what would be the best way to check
> >>>that it isn't doing nasty things?
> >>Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
> >>includes a list of attributes the filesystem needs to have to work properly
> >>with cleancache.
> >So, those points are:
> I had started to look at these too but I feel very out of my depth!
> I had similar conclusions to what Dave wrote but I don't think my
> thoughts should carry very much (any) weight. Anyway I gambled and
> booted my xen domU with this patch and so far so good... xen top
> shows that tmem is now being used where previously it wasn't. I'll
> try running the xfstests at the weekend after a couple more days up
> time to see what happens.
And how did it go?
> >
> >| Some points for a filesystem to consider:
> >|
> >| - The FS should be block-device-based (e.g. a ram-based FS such
> >| as tmpfs should not enable cleancache)
> >
> >OK.
> >
> >|- To ensure coherency/correctness, the FS must ensure that all
> >| file removal or truncation operations either go through VFS or
> >| add hooks to do the equivalent cleancache "invalidate" operations
> >
> >There be dragons - do all the XFS ioctls do the right thing?
> vfs_unlink() calls *dir->i_op->unlink, in xfs_iops.c for S_IFDIR there is:
>
> if (xfs_sb_version_hasasciici(&XFS_M(inode->i_sb)->m_sb))
> inode->i_op = &xfs_dir_ci_inode_operations;
> else
> inode->i_op = &xfs_dir_inode_operations;
>
> where .unlink in xfs_dir_inode_operations is xfs_vn_unlink() in either
> condition.
>
> I can't work out how to follow the vfs_truncate() in to the filesystem
> code and perhaps there are other paths that would lead to file removal.
Did that ever get worked out or are you waiting for a response on that?
>
> >
> >|- To ensure coherency/correctness, either inode numbers must
> >| be unique across the lifetime of the on-disk file OR the
> >| FS must provide an "encode_fh" function.
> >
> >Ok.
> >
> >|- The FS must call the VFS superblock alloc and deactivate routines
> >| or add hooks to do the equivalent cleancache calls done there.
> >
> >OK.
> >
> >|- To maximize performance, all pages fetched from the FS should
> >| go through the do_mpag_readpage routine or the FS should add
> >| hooks to do the equivalent (cf. btrfs)
> >
> >xfs uses mpage_readpages() so should be fine.
OK.
> I think there is a cleancache documentation bug since no other fs
> calls do_mpage_readpage().
The mpage_readpage goes "through the do_mpage(sic)_readpage" routine.
There is a bug in that it says 'mpa' instead of 'mpage'.
> >
> >|- Currently, the FS blocksize must be the same as PAGESIZE. This
> >| is not an architectural restriction, but no backends currently
> >| support anything different.
> >
> >Which means that we need hooks in the mount path to determine if
> >this is the case or not. I note that neither ext3/ext4 do this check
> >so I can't determine why this restriction is mentioned, and I'm not
> >sure if it has any relevance to btrfs.
> >
> >IOWs, I'd like to know why this restriction exists - what does
> >cleancache care about how the filesystem maps blocks to the page in
> >the page cache - any way the filesystem does this it uses
> >page->private to hide this fact from the page cache....
> + Konrad (cleancache maintainer) for any opinion.
That is a bug. It should not care about the size of it - as long
as 'struct page *' is passed in. If the underlaying architecture
has 64KB pages, it should work (and I think it does as zcache2
can do it).
> >
> >|- A clustered FS should invoke the "shared_init_fs" cleancache
> >| hook to get best performance for some backends.
> >
> >Not a problem.
> >
> >So there's a couple of things that need to be explained and
> >explored, and a bunch of testing to be done....
Any patches that I can put on my environment to test it?
Thanks.
> >
> James
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-05-01 12:39 James Dingwall
2013-05-01 16:20 ` Ben Myers
@ 2013-05-13 8:59 ` James Dingwall
1 sibling, 0 replies; 22+ messages in thread
From: James Dingwall @ 2013-05-13 8:59 UTC (permalink / raw)
To: xfs
[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]
James Dingwall wrote:
> --- xfs_super.c 2013-04-29 10:28:22.000000000 +0100
> +++ xfs_super.cleancache.c 2013-05-01 13:22:44.367763564 +0100
> @@ -61,6 +61,7 @@
> #include <linux/kthread.h>
> #include <linux/freezer.h>
> #include <linux/parser.h>
> +#include <linux/cleancache.h>
>
> static const struct super_operations xfs_super_operations;
> static kmem_zone_t *xfs_ioend_zone;
> @@ -1489,6 +1490,8 @@
> goto out_unmount;
> }
>
> + cleancache_init_fs(sb);
> +
> return 0;
>
> out_filestream_unmount:
I have tested this patch with xfstests
(dd3b5268312e0518ae695e8ee2a618f13805c425) and the output is attached.
I had four reported failures with and without, one seems due to my
locale settings but I don't know what to make of the others. These were
the commands that I ran to prepare my system and execute the tests. If
it would be worth performing more runs or using a different group of
tests please suggest what it would be worth doing. I have also
published the patch in git at:
https://github.com/JKDingwall/linux.git xfs-enable-cleancache
Thanks,
James
# mkfs -t xfs /dev/xvdc1
meta-data=/dev/xvdc1 isize=256 agcount=4, agsize=1048512 blks
= sectsz=512 attr=2, projid32bit=0
data = bsize=4096 blocks=4194048, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
# mkdir /tmp/test
# mkdir /tmp/scratch
# TEST_DEV="/dev/xvdc1" ; export TEST_DEV
# TEST_DIR="/tmp/test" ; export TEST_DIR
# SCRATCH_DEV="/dev/xvdd1" ; export SCRATCH_DEV
# SCRATCH_MNT="/tmp/scratch" ; export SCRATCH_MNT
# mount /dev/xvdc1 /tmp/test
# ./check -xfs -g rw # run 1 - 3.9.0 with cleancache patch
# ./check -xfs -g rw # run 3 - 3.9.1 no patch
[-- Attachment #2: xfstests.1.out.gz --]
[-- Type: application/gzip, Size: 1777 bytes --]
[-- Attachment #3: xfstests.3.out.gz --]
[-- Type: application/gzip, Size: 1887 bytes --]
[-- Attachment #4: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-05-01 22:30 ` Dave Chinner
@ 2013-05-02 8:24 ` James Dingwall
2013-05-22 19:28 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 22+ messages in thread
From: James Dingwall @ 2013-05-02 8:24 UTC (permalink / raw)
To: Dave Chinner, Ben Myers, konrad.wilk; +Cc: xfs
Dave Chinner wrote:
> On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
>> Hi James,
>>
>> On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
>>> In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
>>>
>>> $ grep -r cleancache fs/xfs
>>> on the 3.9 kernel source suggests that no patch was submitted to
>>> enable cleancache for the XFS filesystem. Since it was suggested
>>> that this could be a one liner I've had a go and my first effort is
>>> inline below. While this seems to compile OK I have no experience
>>> in filesystems so I would appreciate it if anyone can point out that
>>> it is obviously wrong and likely to eat my data before I try booting
>>> the kernel.
>>>
>>> If it seems a reasonable attempt what would be the best way to check
>>> that it isn't doing nasty things?
>> Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
>> includes a list of attributes the filesystem needs to have to work properly
>> with cleancache.
> So, those points are:
I had started to look at these too but I feel very out of my depth! I
had similar conclusions to what Dave wrote but I don't think my thoughts
should carry very much (any) weight. Anyway I gambled and booted my xen
domU with this patch and so far so good... xen top shows that tmem is
now being used where previously it wasn't. I'll try running the
xfstests at the weekend after a couple more days up time to see what
happens.
>
> | Some points for a filesystem to consider:
> |
> | - The FS should be block-device-based (e.g. a ram-based FS such
> | as tmpfs should not enable cleancache)
>
> OK.
>
> |- To ensure coherency/correctness, the FS must ensure that all
> | file removal or truncation operations either go through VFS or
> | add hooks to do the equivalent cleancache "invalidate" operations
>
> There be dragons - do all the XFS ioctls do the right thing?
vfs_unlink() calls *dir->i_op->unlink, in xfs_iops.c for S_IFDIR there is:
if (xfs_sb_version_hasasciici(&XFS_M(inode->i_sb)->m_sb))
inode->i_op = &xfs_dir_ci_inode_operations;
else
inode->i_op = &xfs_dir_inode_operations;
where .unlink in xfs_dir_inode_operations is xfs_vn_unlink() in either
condition.
I can't work out how to follow the vfs_truncate() in to the filesystem
code and perhaps there are other paths that would lead to file removal.
>
> |- To ensure coherency/correctness, either inode numbers must
> | be unique across the lifetime of the on-disk file OR the
> | FS must provide an "encode_fh" function.
>
> Ok.
>
> |- The FS must call the VFS superblock alloc and deactivate routines
> | or add hooks to do the equivalent cleancache calls done there.
>
> OK.
>
> |- To maximize performance, all pages fetched from the FS should
> | go through the do_mpag_readpage routine or the FS should add
> | hooks to do the equivalent (cf. btrfs)
>
> xfs uses mpage_readpages() so should be fine.
I think there is a cleancache documentation bug since no other fs calls
do_mpage_readpage().
>
> |- Currently, the FS blocksize must be the same as PAGESIZE. This
> | is not an architectural restriction, but no backends currently
> | support anything different.
>
> Which means that we need hooks in the mount path to determine if
> this is the case or not. I note that neither ext3/ext4 do this check
> so I can't determine why this restriction is mentioned, and I'm not
> sure if it has any relevance to btrfs.
>
> IOWs, I'd like to know why this restriction exists - what does
> cleancache care about how the filesystem maps blocks to the page in
> the page cache - any way the filesystem does this it uses
> page->private to hide this fact from the page cache....
+ Konrad (cleancache maintainer) for any opinion.
>
> |- A clustered FS should invoke the "shared_init_fs" cleancache
> | hook to get best performance for some backends.
>
> Not a problem.
>
> So there's a couple of things that need to be explained and
> explored, and a bunch of testing to be done....
>
James
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-05-01 16:20 ` Ben Myers
@ 2013-05-01 22:30 ` Dave Chinner
2013-05-02 8:24 ` James Dingwall
0 siblings, 1 reply; 22+ messages in thread
From: Dave Chinner @ 2013-05-01 22:30 UTC (permalink / raw)
To: Ben Myers; +Cc: James Dingwall, xfs
On Wed, May 01, 2013 at 11:20:44AM -0500, Ben Myers wrote:
> Hi James,
>
> On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
> > In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
> >
> > $ grep -r cleancache fs/xfs
> > on the 3.9 kernel source suggests that no patch was submitted to
> > enable cleancache for the XFS filesystem. Since it was suggested
> > that this could be a one liner I've had a go and my first effort is
> > inline below. While this seems to compile OK I have no experience
> > in filesystems so I would appreciate it if anyone can point out that
> > it is obviously wrong and likely to eat my data before I try booting
> > the kernel.
> >
> > If it seems a reasonable attempt what would be the best way to check
> > that it isn't doing nasty things?
>
> Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
> includes a list of attributes the filesystem needs to have to work properly
> with cleancache.
So, those points are:
| Some points for a filesystem to consider:
|
| - The FS should be block-device-based (e.g. a ram-based FS such
| as tmpfs should not enable cleancache)
OK.
|- To ensure coherency/correctness, the FS must ensure that all
| file removal or truncation operations either go through VFS or
| add hooks to do the equivalent cleancache "invalidate" operations
There be dragons - do all the XFS ioctls do the right thing?
|- To ensure coherency/correctness, either inode numbers must
| be unique across the lifetime of the on-disk file OR the
| FS must provide an "encode_fh" function.
Ok.
|- The FS must call the VFS superblock alloc and deactivate routines
| or add hooks to do the equivalent cleancache calls done there.
OK.
|- To maximize performance, all pages fetched from the FS should
| go through the do_mpag_readpage routine or the FS should add
| hooks to do the equivalent (cf. btrfs)
xfs uses mpage_readpages() so should be fine.
|- Currently, the FS blocksize must be the same as PAGESIZE. This
| is not an architectural restriction, but no backends currently
| support anything different.
Which means that we need hooks in the mount path to determine if
this is the case or not. I note that neither ext3/ext4 do this check
so I can't determine why this restriction is mentioned, and I'm not
sure if it has any relevance to btrfs.
IOWs, I'd like to know why this restriction exists - what does
cleancache care about how the filesystem maps blocks to the page in
the page cache - any way the filesystem does this it uses
page->private to hide this fact from the page cache....
|- A clustered FS should invoke the "shared_init_fs" cleancache
| hook to get best performance for some backends.
Not a problem.
So there's a couple of things that need to be explained and
explored, and a bunch of testing to be done....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Cleancache support in XFS
2013-05-01 12:39 James Dingwall
@ 2013-05-01 16:20 ` Ben Myers
2013-05-01 22:30 ` Dave Chinner
2013-05-13 8:59 ` James Dingwall
1 sibling, 1 reply; 22+ messages in thread
From: Ben Myers @ 2013-05-01 16:20 UTC (permalink / raw)
To: James Dingwall; +Cc: xfs
Hi James,
On Wed, May 01, 2013 at 01:39:09PM +0100, James Dingwall wrote:
> In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
>
> $ grep -r cleancache fs/xfs
> on the 3.9 kernel source suggests that no patch was submitted to
> enable cleancache for the XFS filesystem. Since it was suggested
> that this could be a one liner I've had a go and my first effort is
> inline below. While this seems to compile OK I have no experience
> in filesystems so I would appreciate it if anyone can point out that
> it is obviously wrong and likely to eat my data before I try booting
> the kernel.
>
> If it seems a reasonable attempt what would be the best way to check
> that it isn't doing nasty things?
Hrm.. Looks like there is a doc in Documentation/vm/cleancache.txt which
includes a list of attributes the filesystem needs to have to work properly
with cleancache. I'd suggest going over that list and the code by inspection
first, followed by some xfstests runs, and then wait for it to make a release
before trusting any data to it. For a test machine that I'm willing to crater,
no worries. But I wouldn't run this on my main workstation without doing the
above first. We can probably explore this for 3.11. Thanks for the patch.
Regards,
Ben
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
* Cleancache support in XFS
@ 2013-05-01 12:39 James Dingwall
2013-05-01 16:20 ` Ben Myers
2013-05-13 8:59 ` James Dingwall
0 siblings, 2 replies; 22+ messages in thread
From: James Dingwall @ 2013-05-01 12:39 UTC (permalink / raw)
To: xfs
In reference to: http://oss.sgi.com/archives/xfs/2012-05/msg00046.html
$ grep -r cleancache fs/xfs
on the 3.9 kernel source suggests that no patch was submitted to enable
cleancache for the XFS filesystem. Since it was suggested that this
could be a one liner I've had a go and my first effort is inline below.
While this seems to compile OK I have no experience in filesystems so I
would appreciate it if anyone can point out that it is obviously wrong
and likely to eat my data before I try booting the kernel.
If it seems a reasonable attempt what would be the best way to check
that it isn't doing nasty things?
Thanks,
James
--- xfs_super.c 2013-04-29 10:28:22.000000000 +0100
+++ xfs_super.cleancache.c 2013-05-01 13:22:44.367763564 +0100
@@ -61,6 +61,7 @@
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/parser.h>
+#include <linux/cleancache.h>
static const struct super_operations xfs_super_operations;
static kmem_zone_t *xfs_ioend_zone;
@@ -1489,6 +1490,8 @@
goto out_unmount;
}
+ cleancache_init_fs(sb);
+
return 0;
out_filestream_unmount:
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2013-11-26 16:35 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-30 17:31 Cleancache support in XFS Alexey Vlasov
2012-04-30 19:12 ` Christoph Hellwig
2012-05-02 8:02 ` Alexey Vlasov
2012-05-05 23:40 ` Dave Chinner
2013-05-01 12:39 James Dingwall
2013-05-01 16:20 ` Ben Myers
2013-05-01 22:30 ` Dave Chinner
2013-05-02 8:24 ` James Dingwall
2013-05-22 19:28 ` Konrad Rzeszutek Wilk
2013-05-24 7:30 ` James Dingwall
2013-06-07 17:08 ` Konrad Rzeszutek Wilk
2013-07-19 7:18 ` James Dingwall
2013-07-22 15:48 ` Konrad Rzeszutek Wilk
2013-07-23 7:23 ` James Dingwall
2013-07-23 8:27 ` Dave Chinner
2013-07-23 8:53 ` James Dingwall
2013-11-21 13:35 ` James Dingwall
2013-11-21 16:07 ` Ben Myers
2013-11-21 22:12 ` Dave Chinner
2013-11-26 16:35 ` Konrad Rzeszutek Wilk
2013-11-26 16:35 ` Konrad Rzeszutek Wilk
2013-05-13 8:59 ` James Dingwall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.