->migratepage aops for nfs missing
Subsystems (2)
Trond,
Any particular reason ->migratepage is not enabled for the nfs file aops?
Is it known to be unsafe to move NFS buffer pages at runtime?
I have a similar requirement for memory error handling.
Thanks,
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.
A message that is not in the archive (sent off-list or not yet received): 20090804202648.GA12484-u0/[email protected]
Quoted 5 lines · Andi Kleen
Trond,
Any particular reason ->migratepage is not enabled for the nfs file aops?
Quoted 7 lines
Is it known to be unsafe to move NFS buffer pages at runtime?
I have a similar requirement for memory error handling.
Thanks,
-Andi
Hi Andi,
I don't think there are any fundamental problems with migrating NFS page cache pages. In order to handle dirty pages, we'd need to write the equivalent of buffer_migrate_page() in order to transfer the private data, lock and update the 'struct nfs_page' that tracks the page's dirty area.
The only thing I'm not 100% sure about is fscache, but I think the correct thing is just to call nfs_fscache_release_page(). David?
Cheers
Trond
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
A message that is not in the archive (sent off-list or not yet received): 1249419186.5377.20.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org
Quoted 2 lines · Trond Myklebust
The only thing I'm not 100% sure about is fscache, but I think the correct thing is just to call
nfs_fscache_release_page(). David?
Yes, probably. Note that that will only release the page unconditionally if gfp includes __GFP_WAIT.
David
Quoted 7 lines · David Howells
Quoted 2 lines · Trond Myklebust
The only thing I'm not 100% sure about is fscache, but I think the correct thing is just to call
nfs_fscache_release_page(). David?Yes, probably. Note that that will only release the page unconditionally if gfp includes
__GFP_WAIT.
Right, but I believe that migratepage does allow you to sleep, so that shouldn't be a problem.
Cheers
Trond
Signature · 6 lines
Trond Myklebust Linux NFS client maintainer NetApp [email protected] www.netapp.com
A message that is not in the archive (sent off-list or not yet received): 1249423594.12510.0.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org
Quoted 6 lines · Trond Myklebust
Quoted 5 lines · David Howells
Quoted 2 lines · Trond Myklebust
The only thing I'm not 100% sure about is fscache, but I think the correct thing is just to call
nfs_fscache_release_page(). David?
Quoted 8 lines
Quoted 2 lines
Yes, probably. Note that that will only release the page unconditionally if gfp includes
__GFP_WAIT.Right, but I believe that migratepage does allow you to sleep, so that shouldn't be a problem.
Cheers
Trond
Something like this ought to do it then...
Cheers
Trond
-----------------------------------------------------------------------
From: Trond Myklebust <[email protected]>
Subject: NFS: Add a ->migratepage() aop for NFS
Make NFS a bit more NUMA-friendly...
---
fs/nfs/file.c | 1 + fs/nfs/internal.h | 6 +++ fs/nfs/write.c | 92 ++++++++++++++++++++++++++++++++++++++++------------- 3 files changed, 77 insertions(+), 22 deletions(-)
fs/nfs/file.c +1 -0
@@ -479,6 +479,7 @@ const struct address_space_operations nfs_file_aops = { .invalidatepage = nfs_invalidate_page, .releasepage = nfs_release_page, .direct_IO = nfs_direct_IO, + .migratepage = nfs_migrate_page, .launder_page = nfs_launder_page, };
fs/nfs/internal.h +6 -0
@@ -248,6 +248,12 @@ extern void nfs_read_prepare(struct rpc_task *task, void *calldata);/* write.c */ extern void nfs_write_prepare (struct rpc_task *task,void *calldata); +#ifdef CONFIG_MIGRATION +extern int nfs_migrate_page (struct address_space *, +struct page *,struct page *); +#else +#define nfs_migrate_page NULL +#endif /* nfs4proc.c */ extern int _nfs4_call_sync(struct nfs_server *server,
fs/nfs/write.c +70 -22
135 lines not on this page · raw message
A message that is not in the archive (sent off-list or not yet received): 1249430567.12510.3.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org
Quoted 1 line
Make NFS a bit more NUMA-friendly...
Minor nit :- page migration is not only used for NUMA.
-Andi
A message that is not in the archive (sent off-list or not yet received): 20090805073036.GC11385-u0/[email protected]
Quoted 5 lines · Andi Kleen
Quoted 1 line
Make NFS a bit more NUMA-friendly...
Minor nit :- page migration is not only used for NUMA.
-Andi
How about "Make NFS a bit more NUMA and memory hot removal-friendly..."? :-)
A message that is not in the archive (sent off-list or not yet received): 1249474573.5385.0.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org
Quoted 9 lines · Trond Myklebust
Quoted 5 lines · Andi Kleen
Quoted 1 line
Make NFS a bit more NUMA-friendly...
Minor nit :- page migration is not only used for NUMA.
-Andi
How about "Make NFS a bit more NUMA and memory hot removal-friendly..."? :-)
Thanks. Looks better.
But I'm actually adding a third user soon which is neither.
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.