Swap over NFS -v16
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest28 patches 44 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/28 | mm: gfp_to_alloc_flags()mm/ mm/ | +67 | 0 replies | |
| 2/28 | mm: tag reseve pagesinclude/ mm/ | +4 | 0 replies | |
| 3/28 | mm: slb: add knowledge of reserve pagesinclude/ mm/ mm/ | +80 | 0 replies | |
| 4/28 | mm: kmem_estimate_pages()include/ mm/ mm/ | +161 | 1 reply | |
| 5/28 | mm: allow PF_MEMALLOC from softirq contextinclude/ kernel/ mm/ | +11 | 1 reply | |
| 6/28 | mm: serialize access to min_free_kbytesmm/ | +13 | 0 replies | |
| 7/28 | mm: emergency poolinclude/ mm/ mm/ | +79 | 1 reply | |
| 8/28 | mm: system wide ALLOC_NO_WATERMARKmm/ | +6 | 1 reply | |
| 9/28 | mm: __GFP_MEMALLOCinclude/ mm/ | +5 | 1 reply | |
| 10/28 | mm: memory reserve managementinclude/ mm/ mm/ | +484 | 1 reply | |
| 11/28 | selinux: tag avc cache alloc as non-criticalsecurity/ | +1 | 0 replies | |
| 12/28 | net: wrap sk->sk_backlog_rcv()include/ include/ net/ +2 more | +10 | 0 replies | |
| 13/28 | net: packet split receive apidrivers/ drivers/ drivers/ +5 more | +61 | 0 replies | |
| 14/28 | net: sk_allocation() - concentrate socket related allocationsinclude/ net/ net/ +1 more | +23 | 0 replies | |
| 15/28 | netvm: network reserve infrastructureinclude/ net/ net/ | +150 | 2 replies | |
| 16/28 | netvm: INET reserves.net/ net/ net/ +1 more | +252 | 0 replies | |
| 17/28 | netvm: hook skb allocation to reservesinclude/ include/ net/ | +177 | 1 reply | |
| 18/28 | netvm: filter emergency skbs.include/ | +3 | 0 replies | |
| 19/28 | netvm: prevent a stream specific deadlockinclude/ net/ net/ +1 more | +10 | 0 replies | |
| 20/28 | netfilter: NF_QUEUE vs emergency skbsnet/ | +3 | 0 replies | |
| 21/28 | netvm: skb processinginclude/ net/ net/ | +76 | 0 replies | |
| 22/28 | mm: add support for non block device backed swap filesDocumentation/ Documentation/ include/ +5 more | +128 | 4 replies | |
| 23/28 | mm: methods for teaching filesystems about PG_swapcache pagesinclude/ include/ mm/ | +45 | 0 replies | |
| 24/28 | nfs: remove mempoolsfs/ fs/ | +8 | 0 replies | |
| 25/28 | nfs: teach the NFS client how to treat PG_swapcache pagesfs/ fs/ fs/ +2 more | +39 | 0 replies | |
| 26/28 | nfs: disable data cache revalidation for swapfilesfs/ fs/ | +65 | 0 replies | |
| 27/28 | nfs: enable swap on NFSfs/ fs/ fs/ +4 more | +124 | 0 replies | |
| 28/28 | nfs: fix various memory recursions possible with swap over NFS.fs/ fs/ | +4 | 0 replies |
Reviews trailers per patch
1 of 28 patches has a Reviewed-by or Acked-by.
| Patch | James Morris |
|---|---|
| 1/28 | |
| 2/28 | |
| 3/28 | |
| 4/28 | |
| 5/28 | |
| 6/28 | |
| 7/28 | |
| 8/28 | |
| 9/28 | |
| 10/28 | |
| 11/28 | A-b |
| 12/28 | |
| 13/28 | |
| 14/28 | |
| 15/28 | |
| 16/28 | |
| 17/28 | |
| 18/28 | |
| 19/28 | |
| 20/28 | |
| 21/28 | |
| 22/28 | |
| 23/28 | |
| 24/28 | |
| 25/28 | |
| 26/28 | |
| 27/28 | |
| 28/28 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/28] Swap over NFS -v16
Hi,
Another posting of the full swap over NFS series.
Andrew/Linus, could we start thinking of sticking this in -mm?
[ patches against 2.6.25-rc2-mm1, also to be found online at:
http://programming.kicks-ass.net/kernel-patches/vm_deadlock/v2.6.25-rc2-mm1/ ]
The patch-set can be split in roughtly 5 parts, for each of which I shall give a description.
Part 1, patches 1-11
The problem with swap over network is the generic swap problem: needing memory to free memory. Normally this is solved using mempools, as can be seen in the BIO layer.
Swap over network has the problem that the network subsystem does not use fixed sized allocations, but heavily relies on kmalloc(). This makes mempools unusable.
This first part provides a generic reserve framework. This framework could also be used to get rid of some of the __GFP_NOFAIL users.
Care is taken to only affect the slow paths - when we're low on memory.
Caveats: it currently doesn't do SLOB.
1 - mm: gfp_to_alloc_flags()
2 - mm: tag reseve pages
3 - mm: sl[au]b: add knowledge of reserve pages
4 - mm: kmem_estimate_pages()
5 - mm: allow PF_MEMALLOC from softirq context
6 - mm: serialize access to min_free_kbytes
7 - mm: emergency pool
8 - mm: system wide ALLOC_NO_WATERMARK
9 - mm: __GFP_MEMALLOC
10 - mm: memory reserve management
11 - selinux: tag avc cache alloc as non-critical
Part 2, patches 12-14
Provide some generic network infrastructure needed later on.
12 - net: wrap sk->sk_backlog_rcv()
13 - net: packet split receive api
14 - net: sk_allocation() - concentrate socket related allocations
Part 3, patches 15-21
Now that we have a generic memory reserve system, use it on the network stack. The thing that makes this interesting is that, contrary to BIO, both the transmit and receive path require memory allocations.
That is, in the BIO layer write back completion is usually just an ISR flipping a bit and waking stuff up. A network write back completion involved receiving packets, which when there is no memory, is rather hard. And even when there is memory there is no guarantee that the required packet comes in in the window that that memory buys us.
The solution to this problem is found in the fact that network is to be assumed lossy. Even now, when there is no memory to receive packets the network card will have to discard packets. What we do is move this into the network stack.
So we reserve a little pool to act as a receive buffer, this allows us to inspect packets before tossing them. This way, we can filter out those packets that ensure progress (writeback completion) and disregard the others (as would have happened anyway). [ NOTE: this is a stable mode of operation with limited memory usage, exactly the kind of thing we need ]
Again, care is taken to keep much of the overhead of this to only affect the slow path. Only packets allocated from the reserves will suffer the extra atomic overhead needed for accounting.
15 - netvm: network reserve infrastructure
16 - netvm: INET reserves.
17 - netvm: hook skb allocation to reserves
18 - netvm: filter emergency skbs.
19 - netvm: prevent a TCP specific deadlock
20 - netfilter: NF_QUEUE vs emergency skbs
21 - netvm: skb processing
Part 4, patches 22-23
Generic vm infrastructure to handle swapping to a filesystem instead of a block device.
This provides new a_ops to handle swapcache pages and could be used to obsolete the bmap usage for swapfiles.
22 - mm: add support for non block device backed swap files 23 - mm: methods for teaching filesystems about PG_swapcache pages
Part 5, patches 24-28
Finally, convert NFS to make use of the new network and vm infrastructure to provide swap over NFS.
24 - nfs: remove mempools
25 - nfs: teach the NFS client how to treat PG_swapcache pages 26 - nfs: disable data cache revalidation for swapfiles 27 - nfs: enable swap on NFS
28 - nfs: fix various memory recursions possible with swap over NFS.
Changes since -v15:
- fwd port
- more SGE fragment drivers ported
- made the new swapfile logic unconditional
- various bug fixes and cleanups
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>