Thread (62 messages) 62 messages, 7 authors, 2008-10-01

Re: [PATCH 30/30] nfs: fix various memory recursions possible with swap over NFS.

From: Peter Zijlstra <hidden>
Date: 2008-07-25 10:57:57
Also in: linux-mm, lkml

On Fri, 2008-07-25 at 19:46 +0900, KOSAKI Motohiro wrote:
quoted
GFP_NOFS is not enough, since swap traffic is IO, hence fall back to GFP_NOIO.
this comment imply turn on GFP_NOIO, but the code is s/NOFS/NOIO/. why?
Does the misunderstanding stem from the use of 'enough'?

GFP_NOFS is _more_ permissive than GFP_NOIO in that it will initiate IO,
just not of any filesystem data.

The problem is that previuosly NOFS was correct because that avoids
recursion into the NFS code, it now is not, because also IO (swap) can
lead to this recursion.

Therefore we must tighten the restriction and use NOIO.
quoted
 struct nfs_write_data *nfs_commitdata_alloc(void)
 {
-	struct nfs_write_data *p = kmem_cache_alloc(nfs_wdata_cachep, GFP_NOFS);
+	struct nfs_write_data *p = kmem_cache_alloc(nfs_wdata_cachep, GFP_NOIO);

  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help