Swap over Networked storage -v12
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest40 patches 37 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/40 | mm: page allocation rankmm/ mm/ | +87 | 0 replies | |
| 2/40 | mm: slab allocation fairnessmm/ mm/ | +57 | 1 reply | |
| 3/40 | mm: allow PF_MEMALLOC from softirq contextinclude/ kernel/ mm/ | +11 | 0 replies | |
| 4/40 | mm: serialize access to min_free_kbytesmm/ | +13 | 0 replies | |
| 5/40 | mm: emergency poolinclude/ mm/ mm/ | +48 | 0 replies | |
| 6/40 | mm: __GFP_EMERGENCYinclude/ mm/ | +9 | 0 replies | |
| 7/40 | mm: allow mempool to fall back to memalloc reservesmm/ | +10 | 0 replies | |
| 8/40 | mm: kmem_cache_objsizeinclude/ mm/ mm/ | +34 | 20 replies | |
| 9/40 | mm: optimize gfp_to_rank()mm/ | +31 | 0 replies | |
| 10/40 | selinux: tag avc cache alloc as non-criticalsecurity/ | +1 | 0 replies | |
| 11/40 | net: wrap sk->sk_backlog_rcv()include/ net/ net/ +1 more | +9 | 0 replies | |
| 12/40 | net: packet split receive apidrivers/ drivers/ include/ +1 more | +51 | 0 replies | |
| 13/40 | net: sk_allocation() - concentrate socket related allocationsinclude/ net/ net/ | +21 | 0 replies | |
| 14/40 | netvm: link network to vm layerinclude/ net/ net/ | +180 | 0 replies | |
| 15/40 | netvm: INET reserves.net/ net/ net/ +3 more | +63 | 0 replies | |
| 16/40 | netvm: hook skb allocation to reservesinclude/ net/ | +157 | 1 reply | |
| 17/40 | netvm: filter emergency skbs.include/ | +3 | 0 replies | |
| 18/40 | netvm: prevent a TCP specific deadlockinclude/ net/ | +7 | 0 replies | |
| 19/40 | netfilter: notify about NF_QUEUE vs emergency skbsnet/ | +3 | 0 replies | |
| 20/40 | netvm: skb processinginclude/ net/ net/ | +60 | 0 replies | |
| 21/40 | uml: rename arch/um remove_mapping()arch/ | +3 | 0 replies | |
| 22/40 | mm: prepare swap entry methods for use in page methodsinclude/ include/ include/ +1 more | +57 | 0 replies | |
| 23/40 | mm: add support for non block device backed swap filesDocumentation/ include/ include/ +4 more | +97 | 0 replies | |
| 24/40 | mm: methods for teaching filesystems about PG_swapcache pagesinclude/ include/ | +26 | 0 replies | |
| 25/40 | nfs: remove mempoolsfs/ fs/ | +8 | 0 replies | |
| 26/40 | nfs: teach the NFS client how to treat PG_swapcache pagesfs/ fs/ fs/ +2 more | +30 | 0 replies | |
| 27/40 | nfs: disable data cache revalidation for swapfilesfs/ fs/ | +32 | 0 replies | |
| 28/40 | nfs: enable swap on NFSfs/ fs/ include/ +2 more | +92 | 0 replies | |
| 29/40 | nfs: fix various memory recursions possible with swap over NFS.fs/ fs/ | +4 | 0 replies | |
| 30/40 | nfs: fixup missing error codefs/ | +3 | 2 replies | |
| 31/40 | mm: balance_dirty_pages() vs throttle_vm_writeout() deadlockmm/ | +1 | 0 replies | |
| 32/40 | block: add a swapdev callback to the request_queueinclude/ mm/ | +23 | 0 replies | |
| 33/40 | uml: enable scsi and add iscsi configarch/ arch/ | +1 | 0 replies | |
| 34/40 | sock: safely expose kernel sockets to userspaceinclude/ net/ | +10 | 0 replies | |
| 35/40 | From: Mike Christie <[email protected]>drivers/ drivers/ drivers/ +4 more | +73 | 0 replies | |
| 36/40 | iscsi: fixup of the ep_connect patchdrivers/ | +19 | 0 replies | |
| 37/40 | iscsi: ensure the iscsi kernel fd is not usable in userspacedrivers/ | +7 | 0 replies | |
| 38/40 | netlink: add SOCK_VMIO support to AF_NETLINKinclude/ net/ net/ +1 more | +14 | 0 replies | |
| 39/40 | mm: a process flags to avoid blocking allocationsinclude/ kernel/ mm/ +1 more | +15 | 0 replies | |
| 40/40 | iscsi: support for swapping over iSCSI.drivers/ drivers/ drivers/ +3 more | +170 | 0 replies |
Reviews trailers per patch
4 of 40 patches have a Reviewed-by or Acked-by.
| Patch | James Morris | Jeff Dike | Mike Christie |
|---|---|---|---|
| 1/40 | |||
| 2/40 | |||
| 3/40 | |||
| 4/40 | |||
| 5/40 | |||
| 6/40 | |||
| 7/40 | |||
| 8/40 | |||
| 9/40 | |||
| 10/40 | A-b | ||
| 11/40 | |||
| 12/40 | |||
| 13/40 | |||
| 14/40 | |||
| 15/40 | |||
| 16/40 | |||
| 17/40 | |||
| 18/40 | |||
| 19/40 | |||
| 20/40 | |||
| 21/40 | A-b | ||
| 22/40 | |||
| 23/40 | |||
| 24/40 | |||
| 25/40 | |||
| 26/40 | |||
| 27/40 | |||
| 28/40 | |||
| 29/40 | |||
| 30/40 | |||
| 31/40 | |||
| 32/40 | |||
| 33/40 | A-b | ||
| 34/40 | |||
| 35/40 | |||
| 36/40 | A-b | ||
| 37/40 | |||
| 38/40 | |||
| 39/40 | |||
| 40/40 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 00/40] Swap over Networked storage -v12
There is a fundamental deadlock associated with paging; when writing out a page to free memory requires free memory to complete. The usually solution is to keep a small amount of memory available at all times so we can overcome this problem. This however assumes the amount of memory needed for writeout is (constant and) smaller than the provided reserve.
It is this latter assumption that breaks when doing writeout over network. Network can take up an unspecified amount of memory while waiting for a reply to our write request. This re-introduces the deadlock; we might never complete the writeout, for we might not have enough memory to receive the completion message.
The proposed solution is simple, only allow traffic servicing the VM to make use of the reserves.
This however implies you know what packets are for whom, which generally speaking you don't. Hence we need to receive all packets but discard them as soon as we encounter a non VM bound packet allocated from the reserves.
Also knowing it is headed towards the VM needs a little help, hence we introduce the socket flag SOCK_VMIO to mark sockets with.
Of course, since we are paging all this has to happen in kernel-space, since user-space might just not be there.
Since packet processing might also require memory, this all also implies that those auxiliary allocations may use the reserves when an emergency packet is processed. This is accomplished by using PF_MEMALLOC.
How much memory is to be reserved is also an issue, enough memory to saturate both the route cache and IP fragment reassembly, along with various constants.
This patch-set comes in 6 parts:
1) introduce the memory reserve and make the SLAB allocator play nice with it. patches 01-10
2) add some needed infrastructure to the network code patches 11-13
3) implement the idea outlined above
patches 14-20
4) teach the swap machinery to use generic address_spaces patches 21-24
5) implement swap over NFS using all the new stuff patches 25-31
6) implement swap over iSCSI
patches 32-40
Patches can also be found here:
http://programming.kicks-ass.net/kernel-patches/vm_deadlock/v12/
If I receive no feedback, I will assume the various maintainers do not object and I will respin the series against -mm and submit for inclusion.
There is interest in this feature from the stateless linux world; that is both the virtualization world, and the cluster world.
I have been contacted by various groups, some have just expressed their interest, others have been testing this work in their environments.
Various hardware vendors have also expressed interest, and, of course, my employer finds it important enough to have me work on it.
Also, while it doesn't present a full-fledged reserve-based allocator API yet, it does lay most of the groundwork for it. There is a GFP_NOFAIL elimination project wanting to use this as a foundation. Elimination of GFP_NOFAIL will greatly improve the basic soundness and stability of the code that currently uses that construct - most disk based filesystems.
--
--
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>