Skip to contentSkip to conversation

Cleancache support in XFS

PATCH James Dingwall 4 participants 18 messages May 1, 2013 – Nov 26, 2013 XFS filesystem

lore
Share & tools
lore
#0 lore raw

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.cleancache.c 2013-05-01 13:22:44.367763564 +0100 renamed from xfs_super.c 2013-04-29 10:28:22.000000000 +0100 +3 -0
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw

Hi James,

Quoted 11 lines · James Dingwall

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.
Quoted 2 lines

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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw
Quoted 14 lines · Ben Myers

Hi James,

Quoted 11 lines · James Dingwall

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.
Quoted 6 lines
Quoted 2 lines

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.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#3 lore raw
Quoted 15 lines · Dave Chinner
Quoted 14 lines · Ben Myers

Hi James,

Quoted 11 lines · James Dingwall

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.
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

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.

Quoted 6 lines
| 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)
Quoted 7 lines

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.

Quoted 10 lines
|- 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.

Quoted 7 lines

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().

Quoted 10 lines
|- 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.

Quoted 4 lines

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.

Quoted 9 lines

|- 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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#17 lore raw
In reply to James Dingwall
Quoted 11 lines · James Dingwall
xfs_super.cleancache.c 2013-05-01 13:22:44.367763564 +0100 renamed from xfs_super.c 2013-04-29 10:28:22.000000000 +0100 +1 -0
@@ -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;

xfs_super.cleancache.c 2013-05-01 13:22:44.367763564 +0100 line 1497

Quoted 8 lines
xfs_super.cleancache.c 2013-05-01 13:22:44.367763564 +0100 renamed from xfs_super.c 2013-04-29 10:28:22.000000000 +0100 +2 -0
@@ -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

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#4 lore raw
In reply to James Dingwall
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines · James Dingwall
Quoted 11 lines

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.
Quoted 2 lines

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.

Quoted 8 lines
Quoted 1 line

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?

Quoted 20 lines
Quoted 6 lines
| 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)
Quoted 7 lines

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;
Quoted 5 lines

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?

Quoted 11 lines
Quoted 11 lines

|- 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.

Quoted 7 lines
Quoted 7 lines

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.

Quoted 2 lines

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'.

Quoted 10 lines
Quoted 10 lines
|- 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.

Quoted 5 lines
Quoted 4 lines

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).

Quoted 8 lines
Quoted 8 lines

|- 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.

Quoted 2 lines
Quoted 1 line

James

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#5 lore raw
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 12 lines · James Dingwall
Quoted 11 lines

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.
Quoted 5 lines
Quoted 2 lines

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:

Quoted 8 lines
Quoted 7 lines

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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#6 lore raw
Quoted 34 lines · James Dingwall
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 12 lines · James Dingwall
Quoted 11 lines

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.
Quoted 5 lines
Quoted 2 lines

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:

Quoted 8 lines
Quoted 7 lines

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?

Quoted 10 lines

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.

Quoted 4 lines

Regards,
James

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#7 lore raw
Quoted 45 lines · Konrad Rzeszutek Wilk
Quoted 34 lines · James Dingwall
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 12 lines · James Dingwall
Quoted 11 lines

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.
Quoted 5 lines
Quoted 2 lines

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:

Quoted 8 lines
Quoted 7 lines

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?

Quoted 10 lines

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.

Quoted 8 lines

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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#8 lore raw
Quoted 48 lines · James Dingwall
Quoted 47 lines · Konrad Rzeszutek Wilk
Quoted 34 lines · James Dingwall
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 12 lines · James Dingwall
Quoted 11 lines

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.
Quoted 5 lines
Quoted 2 lines

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:

Quoted 8 lines
Quoted 7 lines

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?

Quoted 10 lines

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,

Quoted 8 lines
Quoted 6 lines

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!

Quoted 3 lines

Regards,
James

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#9 lore raw
Quoted 54 lines · Konrad Rzeszutek Wilk
Quoted 53 lines · James Dingwall
Quoted 52 lines · Konrad Rzeszutek Wilk
Quoted 34 lines · James Dingwall
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 12 lines · James Dingwall
Quoted 11 lines

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.
Quoted 5 lines
Quoted 2 lines

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:

Quoted 8 lines
Quoted 7 lines

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?

Quoted 10 lines

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."

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#10 lore raw
Quoted 58 lines · James Dingwall
Quoted 57 lines · Konrad Rzeszutek Wilk
Quoted 56 lines · James Dingwall
Quoted 45 lines · Konrad Rzeszutek Wilk
Quoted 34 lines · James Dingwall
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 12 lines · James Dingwall
Quoted 11 lines

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.
Quoted 5 lines
Quoted 2 lines

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:

Quoted 8 lines
Quoted 7 lines

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?

Quoted 10 lines

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.

Quoted 8 lines

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.

Quoted 8 lines
Quoted 2 lines

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.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
author Acked-by Konrad Rzeszutek Wilk
#11 lore raw

________________________________________
From: Dave Chinner <[email protected]>
Sent: 23 July 2013 09:27
To: James Dingwall
Cc: Konrad Rzeszutek Wilk; Ben Myers; [email protected]
Subject: Re: Cleancache support in XFS

Quoted 58 lines · James Dingwall
Quoted 57 lines · Konrad Rzeszutek Wilk
Quoted 56 lines · James Dingwall
Quoted 45 lines · Konrad Rzeszutek Wilk
Quoted 34 lines · James Dingwall
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 12 lines · James Dingwall
Quoted 11 lines

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.
Quoted 5 lines
Quoted 2 lines

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:

Quoted 8 lines
Quoted 7 lines

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?

Quoted 10 lines

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.

Quoted 8 lines

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.

Quoted 8 lines
Quoted 2 lines

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 <[email protected]>
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.

fs/xfs/xfs_super.c +3 -0
index 3033ba5..bcc1668 100644
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#12 lore raw
In reply to Dave Chinner
Quoted 67 lines · Dave Chinner
Quoted 58 lines · James Dingwall
Quoted 57 lines · Konrad Rzeszutek Wilk
Quoted 56 lines · James Dingwall
Quoted 45 lines · Konrad Rzeszutek Wilk
Quoted 34 lines · James Dingwall
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 12 lines · James Dingwall
Quoted 11 lines

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.
Quoted 5 lines
Quoted 2 lines

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:

Quoted 8 lines
Quoted 7 lines

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?

Quoted 10 lines

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.

Quoted 8 lines

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.

Quoted 8 lines
Quoted 2 lines

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?

Quoted 5 lines

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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#13 lore raw

Hi James,

Quoted 70 lines · James Dingwall
Quoted 69 lines · Dave Chinner
Quoted 58 lines · James Dingwall
Quoted 57 lines · Konrad Rzeszutek Wilk
Quoted 56 lines · James Dingwall
Quoted 45 lines · Konrad Rzeszutek Wilk
Quoted 34 lines · James Dingwall
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 12 lines · James Dingwall
Quoted 11 lines

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.
Quoted 5 lines
Quoted 2 lines

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:

Quoted 8 lines
Quoted 7 lines

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?

Quoted 10 lines

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.

Quoted 8 lines

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.

Quoted 8 lines
Quoted 2 lines

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 ;)

Quoted 8 lines
Quoted 3 lines

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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by
#14 lore raw
Quoted 82 lines · Ben Myers

Hi James,

Quoted 70 lines · James Dingwall
Quoted 69 lines · Dave Chinner
Quoted 58 lines · James Dingwall
Quoted 57 lines · Konrad Rzeszutek Wilk
Quoted 56 lines · James Dingwall
Quoted 45 lines · Konrad Rzeszutek Wilk
Quoted 34 lines · James Dingwall
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 12 lines · James Dingwall
Quoted 11 lines

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.

Quoted 5 lines
Quoted 2 lines

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:

Quoted 8 lines
Quoted 7 lines

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?

Quoted 10 lines

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.

Quoted 8 lines

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.

Quoted 8 lines
Quoted 2 lines

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 ;)

Quoted 8 lines
Quoted 3 lines

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.

Quoted 3 lines

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.

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#16 lore raw
In reply to Ben Myers
Quoted 75 lines · Ben Myers

Hi James,

Quoted 72 lines · James Dingwall
Quoted 71 lines · Dave Chinner
Quoted 58 lines · James Dingwall
Quoted 57 lines · Konrad Rzeszutek Wilk
Quoted 56 lines · James Dingwall
Quoted 45 lines · Konrad Rzeszutek Wilk
Quoted 34 lines · James Dingwall
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 12 lines · James Dingwall
Quoted 11 lines

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.

Quoted 5 lines
Quoted 2 lines

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:

Quoted 8 lines
Quoted 7 lines

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?

Quoted 10 lines

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.

Quoted 8 lines

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.

Quoted 8 lines
Quoted 2 lines

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,

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

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?

Quoted 2 lines

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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#15 lore raw
In reply to Dave Chinner
Quoted 87 lines · Dave Chinner
Quoted 82 lines · Ben Myers

Hi James,

Quoted 70 lines · James Dingwall
Quoted 69 lines · Dave Chinner
Quoted 58 lines · James Dingwall
Quoted 57 lines · Konrad Rzeszutek Wilk
Quoted 56 lines · James Dingwall
Quoted 45 lines · Konrad Rzeszutek Wilk
Quoted 34 lines · James Dingwall
Quoted 25 lines · Konrad Rzeszutek Wilk
Quoted 3 lines · James Dingwall
Quoted 2 lines · Dave Chinner
Quoted 1 line · Ben Myers

Hi James,

Hey folks,
I am walking through my vacation-emails-mbox.

Quoted 18 lines
Quoted 18 lines
Quoted 17 lines · James Dingwall

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:

Quoted 8 lines
Quoted 7 lines

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?

Quoted 10 lines

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.

Quoted 8 lines

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.

Quoted 8 lines
Quoted 2 lines

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 ;)

Quoted 8 lines
Quoted 3 lines

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.

Quoted 3 lines

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. ;)

Quoted 5 lines

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.

Yeey! (and I should have so read this before I sent the other email out).

Should the patch be rebased and resent? Thanks.

Quoted 7 lines

Cheers,

Dave.

Signature · 2 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs