Hugh Dickins
a2c16d6cb0
mm: let swap use exceptional entries
...
If swap entries are to be stored along with struct page pointers in a
radix tree, they need to be distinguished as exceptional entries.
Most of the handling of swap entries in radix tree will be contained in
shmem.c, but a few functions in filemap.c's common code need to check
for their appearance: find_get_page(), find_lock_page(),
find_get_pages() and find_get_pages_contig().
So as not to slow their fast paths, tuck those checks inside the
existing checks for unlikely radix_tree_deref_slot(); except for
find_lock_page(), where it is an added test. And make it a BUG in
find_get_pages_tag(), which is not applied to tmpfs files.
A part of the reason for eliminating shmem_readpage() earlier, was to
minimize the places where common code would need to allow for swap
entries.
The swp_entry_t known to swapfile.c must be massaged into a slightly
different form when stored in the radix tree, just as it gets massaged
into a pte_t when stored in page tables.
In an i386 kernel this limits its information (type and page offset) to
30 bits: given 32 "types" of swapfile and 4kB pagesize, that's a maximum
swapfile size of 128GB. Which is less than the 512GB we previously
allowed with X86_PAE (where the swap entry can occupy the entire upper
32 bits of a pte_t), but not a new limitation on 32-bit without PAE; and
there's not a new limitation on 64-bit (where swap filesize is already
limited to 16TB by a 32-bit page offset). Thirty areas of 128GB is
probably still enough swap for a 64GB 32-bit machine.
Provide swp_to_radix_entry() and radix_to_swp_entry() conversions, and
enforce filesize limit in read_swap_header(), just as for ptes.
Signed-off-by: Hugh Dickins <hughd@google.com >
Acked-by: Rik van Riel <riel@redhat.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2011-08-03 14:25:22 -10:00
..
2011-07-27 20:43:21 +05:30
2011-07-22 09:51:12 -04:00
2011-07-26 13:38:50 -07:00
2011-07-27 17:52:58 -03:00
2011-07-17 21:48:22 +02:00
2011-07-06 21:23:54 -07:00
2011-08-03 14:25:22 -10:00
2011-07-26 16:49:47 -07:00
2011-07-20 17:21:16 -04:00
2011-07-22 13:09:55 -07:00
2011-07-21 12:39:35 -07:00
2011-07-15 18:58:42 -04:00
2011-07-30 08:57:57 -10:00
2011-07-08 17:01:58 +04:00
2011-07-28 11:31:47 +10:00
2011-06-09 19:14:34 +01:00
2011-07-15 13:54:17 -06:00
2011-07-25 13:56:39 -07:00
2011-07-27 13:23:02 -07:00
2011-07-14 14:45:59 -07:00
2011-07-08 15:30:55 -07:00
2011-08-02 14:52:13 -04:00
2011-07-22 08:25:37 -07:00
2011-07-26 16:49:47 -07:00
2011-06-21 10:49:31 +02:00
2011-07-20 20:47:43 -04:00
2011-06-22 16:09:57 -04:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-06-30 13:31:57 +02:00
2011-07-26 16:49:47 -07:00
2011-06-10 08:46:26 -06:00
2011-07-20 01:43:10 -04:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:43 -07:00
2011-06-20 13:23:14 +02:00
2011-07-23 20:44:25 +02:00
2011-06-13 20:18:49 +02:00
2011-07-26 16:49:47 -07:00
2011-07-08 22:21:58 +02:00
2011-07-22 17:05:15 -07:00
2011-07-18 21:38:33 +02:00
2011-07-15 18:58:42 -04:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-25 20:57:14 -07:00
2011-06-28 13:54:26 -07:00
2011-07-26 16:49:44 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-06 14:44:42 -07:00
2011-07-25 20:57:16 -07:00
2011-07-26 16:49:47 -07:00
2011-07-05 23:42:17 -07:00
2011-07-26 16:49:47 -07:00
2011-06-20 10:46:04 -04:00
2011-08-02 12:32:04 +01:00
2011-07-26 16:49:47 -07:00
2011-06-10 14:55:36 +02:00
2011-08-02 12:32:06 +01:00
2011-08-02 12:32:04 +01:00
2011-06-21 19:17:20 -07:00
2011-07-26 16:49:45 -07:00
2011-06-21 19:17:20 -07:00
2011-06-30 09:23:45 +02:00
2011-06-27 15:16:21 -07:00
2011-06-27 09:11:02 -04:00
2011-07-26 16:49:47 -07:00
2011-07-25 20:57:16 -07:00
2011-08-01 13:40:51 -10:00
2011-07-13 02:29:59 -07:00
2011-06-30 22:32:49 -07:00
2011-06-25 17:29:52 +02:00
2011-07-26 11:34:40 -07:00
2011-08-03 14:25:20 -10:00
2011-07-20 20:47:59 -04:00
2011-07-07 08:18:18 +02:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-16 07:24:32 +02:00
2011-07-26 16:49:47 -07:00
2011-08-01 01:41:17 -04:00
2011-07-07 13:21:56 -07:00
2011-07-08 00:21:27 -05:00
2011-06-24 17:08:49 +09:00
2011-07-26 16:49:47 -07:00
2011-07-14 16:36:53 -04:00
2011-07-11 10:12:59 -04:00
2011-07-25 14:30:23 -04:00
2011-07-01 16:17:47 +02:00
2011-08-03 14:25:21 -10:00
2011-06-16 08:40:52 -06:00
2011-07-01 15:34:45 -07:00
2011-06-10 15:15:40 +02:00
2011-06-28 10:48:34 +02:00
2011-07-25 20:57:07 -07:00
2011-07-01 11:06:38 +02:00
2011-07-10 05:27:15 -06:00
2011-07-01 10:37:15 +02:00
2011-08-03 14:25:20 -10:00
2011-07-19 16:49:54 -04:00
2011-07-17 12:33:22 -07:00
2011-07-06 01:56:38 -07:00
2011-07-21 13:47:58 -07:00
2011-07-27 22:39:30 -07:00
2011-07-21 13:47:54 -07:00
2011-07-12 08:35:10 +02:00
2011-07-04 20:03:40 -07:00
2011-07-26 16:49:47 -07:00
2011-07-12 14:24:35 +02:00
2011-06-14 11:30:22 +02:00
2011-07-31 14:30:59 -10:00
2011-07-26 16:49:44 -07:00
2011-07-28 01:32:04 -06:00
2011-07-28 01:32:04 -06:00
2011-06-29 16:43:06 -05:00
2011-07-10 22:05:08 -04:00
2011-06-27 11:44:37 +02:00
2011-07-25 17:24:47 +02:00
2011-07-26 16:49:47 -07:00
2011-07-08 00:21:27 -05:00
2011-07-29 21:53:30 +02:00
2011-07-26 16:49:47 -07:00
2011-07-27 13:21:40 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-06-17 09:40:48 -07:00
2011-06-15 20:03:59 -07:00
2011-06-12 17:45:41 -04:00
2011-07-26 16:49:47 -07:00
2011-07-24 11:50:34 +03:00
2011-07-12 13:16:57 +03:00
2011-07-25 20:57:15 -07:00
2011-07-22 14:39:48 +09:30
2011-07-23 17:57:36 -04:00
2011-07-26 16:49:42 -07:00
2011-07-25 20:57:08 -07:00
2011-07-12 11:08:01 +10:00
2011-06-15 11:11:57 -04:00
2011-07-18 15:17:01 +03:00
2011-07-25 20:57:11 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-20 20:47:50 -04:00
2011-07-24 22:06:04 +09:30
2011-07-24 22:06:04 +09:30
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-20 01:44:14 -04:00
2011-07-28 05:58:19 -07:00
2011-06-24 15:25:51 -04:00
2011-07-03 20:02:07 -07:00
2011-07-05 15:26:58 -04:00
2011-07-31 12:18:15 -04:00
2011-07-31 14:27:04 -10:00
2011-08-01 13:48:31 -10:00
2011-07-15 09:12:22 -04:00
2011-07-31 12:18:15 -04:00
2011-07-31 12:18:16 -04:00
2011-07-25 13:56:39 -07:00
2011-07-26 16:49:43 -07:00
2011-07-25 20:57:15 -07:00
2011-07-20 01:44:07 -04:00
2011-07-18 16:37:45 -06:00
2011-07-28 16:19:22 -06:00
2011-07-28 01:32:04 -06:00
2011-07-27 09:30:56 +08:00
2011-06-21 11:04:10 -06:00
2011-08-02 16:50:47 +01:00
2011-07-25 20:57:09 -07:00
2011-07-15 23:58:18 +02:00
2011-07-26 16:49:47 -07:00
2011-07-30 08:21:48 -10:00
2011-07-25 20:57:10 -07:00
2011-07-25 23:09:27 -07:00
2011-07-29 23:35:05 -07:00
2011-07-26 16:49:47 -07:00
2011-07-27 09:31:02 +08:00
2011-07-08 00:21:35 -05:00
2011-07-08 14:02:53 +02:00
2011-07-14 20:59:07 +02:00
2011-07-12 11:17:09 +02:00
2011-07-02 14:29:55 +02:00
2011-07-12 13:40:29 -04:00
2011-06-10 14:55:36 +02:00
2011-07-25 20:57:09 -07:00
2011-08-01 02:10:32 -04:00
2011-06-10 15:15:40 +02:00
2011-07-27 12:50:45 -07:00
2011-07-22 16:14:29 -07:00
2011-07-01 15:39:38 -07:00
2011-07-17 20:23:52 +02:00
2011-07-26 16:49:47 -07:00
2011-08-03 14:25:22 -10:00
2011-07-26 16:49:46 -07:00
2011-07-21 21:25:58 -07:00
2011-07-20 14:10:20 -07:00
2011-06-10 15:15:40 +02:00
2011-07-25 20:57:14 -07:00
2011-07-23 07:56:59 +01:00
2011-07-25 14:30:23 -04:00
2011-07-25 20:57:17 -07:00
2011-07-25 14:30:23 -04:00
2011-06-14 22:04:39 -04:00
2011-07-08 14:02:53 +02:00
2011-07-25 13:56:39 -07:00
2011-07-26 16:49:47 -07:00
2011-07-25 10:33:36 -07:00
2011-07-18 11:06:03 -07:00
2011-07-20 01:43:29 -04:00
2011-07-26 16:49:47 -07:00
2011-07-20 20:47:50 -04:00
2011-06-11 13:17:28 -07:00
2011-06-28 15:25:36 +09:00
2011-07-11 15:07:25 +09:00
2011-06-21 17:56:11 +09:00
2011-07-30 08:44:19 -10:00
2011-06-27 18:00:12 -07:00
2011-07-20 20:47:10 -04:00
2011-07-26 16:49:47 -07:00
2011-07-20 20:27:56 +03:00
2011-07-07 21:04:12 +03:00
2011-06-16 19:40:20 +03:00
2011-07-30 08:21:48 -10:00
2011-06-17 10:17:12 +02:00
2011-07-05 15:26:58 -04:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-25 20:57:11 -07:00
2011-06-14 22:48:51 -04:00
2011-07-21 15:29:16 -07:00
2011-07-25 13:56:39 -07:00
2011-07-25 20:57:15 -07:00
2011-07-26 16:49:47 -07:00
2011-08-03 14:25:22 -10:00
2011-07-26 16:49:47 -07:00
2011-06-08 17:05:30 -07:00
2011-08-02 14:51:57 -04:00
2011-06-15 20:03:59 -07:00
2011-06-27 20:30:08 +02:00
2011-06-15 20:04:00 -07:00
2011-07-27 17:55:40 -03:00
2011-06-11 15:57:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:45 -07:00
2011-07-25 20:57:15 -07:00
2011-07-28 08:01:18 +00:00
2011-07-04 19:31:38 -07:00
2011-07-26 16:49:47 -07:00
2011-07-09 22:09:03 -07:00
2011-06-10 14:55:36 +02:00