diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:47 -0400 |
commit | 8065be8d032f38da25b54bf077a05a30d9ce9f2a (patch) | |
tree | 32a7baf4b40e0240ab4b9dd6f2bbe6129929bb66 /Documentation | |
parent | 27d438c56009e5ae632de36fe70985d1aab5e344 (diff) | |
parent | ecc265fe9e09e32a3573b2ba26e79b2099eb8bbb (diff) |
Merge branch 'akpm' (second patchbomb from Andrew Morton)
Merge more incoming from Andrew Morton:
"Two new syscalls:
memfd_create in "shm: add memfd_create() syscall"
kexec_file_load in "kexec: implementation of new syscall kexec_file_load"
And:
- Most (all?) of the rest of MM
- Lots of the usual misc bits
- fs/autofs4
- drivers/rtc
- fs/nilfs
- procfs
- fork.c, exec.c
- more in lib/
- rapidio
- Janitorial work in filesystems: fs/ufs, fs/reiserfs, fs/adfs,
fs/cramfs, fs/romfs, fs/qnx6.
- initrd/initramfs work
- "file sealing" and the memfd_create() syscall, in tmpfs
- add pci_zalloc_consistent, use it in lots of places
- MAINTAINERS maintenance
- kexec feature work"
* emailed patches from Andrew Morton <akpm@linux-foundation.org: (193 commits)
MAINTAINERS: update nomadik patterns
MAINTAINERS: update usb/gadget patterns
MAINTAINERS: update DMA BUFFER SHARING patterns
kexec: verify the signature of signed PE bzImage
kexec: support kexec/kdump on EFI systems
kexec: support for kexec on panic using new system call
kexec-bzImage64: support for loading bzImage using 64bit entry
kexec: load and relocate purgatory at kernel load time
purgatory: core purgatory functionality
purgatory/sha256: provide implementation of sha256 in purgaotory context
kexec: implementation of new syscall kexec_file_load
kexec: new syscall kexec_file_load() declaration
kexec: make kexec_segment user buffer pointer a union
resource: provide new functions to walk through resources
kexec: use common function for kimage_normal_alloc() and kimage_crash_alloc()
kexec: move segment verification code in a separate function
kexec: rename unusebale_pages to unusable_pages
kernel: build bin2c based on config option CONFIG_BUILD_BIN2C
bin2c: move bin2c in scripts/basic
shm: wait for pins to be released when sealing
...
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/ABI/testing/sysfs-fs-nilfs2 | 269 | ||||
-rw-r--r-- | Documentation/cgroups/memcg_test.txt | 160 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/i2c/trivial-devices.txt | 1 | ||||
-rw-r--r-- | Documentation/oops-tracing.txt | 2 | ||||
-rw-r--r-- | Documentation/rapidio/tsi721.txt | 19 | ||||
-rw-r--r-- | Documentation/sysctl/kernel.txt | 1 |
6 files changed, 300 insertions, 152 deletions
diff --git a/Documentation/ABI/testing/sysfs-fs-nilfs2 b/Documentation/ABI/testing/sysfs-fs-nilfs2 new file mode 100644 index 000000000000..304ba84a973a --- /dev/null +++ b/Documentation/ABI/testing/sysfs-fs-nilfs2 | |||
@@ -0,0 +1,269 @@ | |||
1 | |||
2 | What: /sys/fs/nilfs2/features/revision | ||
3 | Date: April 2014 | ||
4 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
5 | Description: | ||
6 | Show current revision of NILFS file system driver. | ||
7 | This value informs about file system revision that | ||
8 | driver is ready to support. | ||
9 | |||
10 | What: /sys/fs/nilfs2/features/README | ||
11 | Date: April 2014 | ||
12 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
13 | Description: | ||
14 | Describe attributes of /sys/fs/nilfs2/features group. | ||
15 | |||
16 | What: /sys/fs/nilfs2/<device>/revision | ||
17 | Date: April 2014 | ||
18 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
19 | Description: | ||
20 | Show NILFS file system revision on volume. | ||
21 | This value informs about metadata structures' | ||
22 | revision on mounted volume. | ||
23 | |||
24 | What: /sys/fs/nilfs2/<device>/blocksize | ||
25 | Date: April 2014 | ||
26 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
27 | Description: | ||
28 | Show volume's block size in bytes. | ||
29 | |||
30 | What: /sys/fs/nilfs2/<device>/device_size | ||
31 | Date: April 2014 | ||
32 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
33 | Description: | ||
34 | Show volume size in bytes. | ||
35 | |||
36 | What: /sys/fs/nilfs2/<device>/free_blocks | ||
37 | Date: April 2014 | ||
38 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
39 | Description: | ||
40 | Show count of free blocks on volume. | ||
41 | |||
42 | What: /sys/fs/nilfs2/<device>/uuid | ||
43 | Date: April 2014 | ||
44 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
45 | Description: | ||
46 | Show volume's UUID (Universally Unique Identifier). | ||
47 | |||
48 | What: /sys/fs/nilfs2/<device>/volume_name | ||
49 | Date: April 2014 | ||
50 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
51 | Description: | ||
52 | Show volume's label. | ||
53 | |||
54 | What: /sys/fs/nilfs2/<device>/README | ||
55 | Date: April 2014 | ||
56 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
57 | Description: | ||
58 | Describe attributes of /sys/fs/nilfs2/<device> group. | ||
59 | |||
60 | What: /sys/fs/nilfs2/<device>/superblock/sb_write_time | ||
61 | Date: April 2014 | ||
62 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
63 | Description: | ||
64 | Show last write time of super block in human-readable | ||
65 | format. | ||
66 | |||
67 | What: /sys/fs/nilfs2/<device>/superblock/sb_write_time_secs | ||
68 | Date: April 2014 | ||
69 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
70 | Description: | ||
71 | Show last write time of super block in seconds. | ||
72 | |||
73 | What: /sys/fs/nilfs2/<device>/superblock/sb_write_count | ||
74 | Date: April 2014 | ||
75 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
76 | Description: | ||
77 | Show current write count of super block. | ||
78 | |||
79 | What: /sys/fs/nilfs2/<device>/superblock/sb_update_frequency | ||
80 | Date: April 2014 | ||
81 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
82 | Description: | ||
83 | Show/Set interval of periodical update of superblock | ||
84 | (in seconds). | ||
85 | |||
86 | What: /sys/fs/nilfs2/<device>/superblock/README | ||
87 | Date: April 2014 | ||
88 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
89 | Description: | ||
90 | Describe attributes of /sys/fs/nilfs2/<device>/superblock | ||
91 | group. | ||
92 | |||
93 | What: /sys/fs/nilfs2/<device>/segctor/last_pseg_block | ||
94 | Date: April 2014 | ||
95 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
96 | Description: | ||
97 | Show start block number of the latest segment. | ||
98 | |||
99 | What: /sys/fs/nilfs2/<device>/segctor/last_seg_sequence | ||
100 | Date: April 2014 | ||
101 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
102 | Description: | ||
103 | Show sequence value of the latest segment. | ||
104 | |||
105 | What: /sys/fs/nilfs2/<device>/segctor/last_seg_checkpoint | ||
106 | Date: April 2014 | ||
107 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
108 | Description: | ||
109 | Show checkpoint number of the latest segment. | ||
110 | |||
111 | What: /sys/fs/nilfs2/<device>/segctor/current_seg_sequence | ||
112 | Date: April 2014 | ||
113 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
114 | Description: | ||
115 | Show segment sequence counter. | ||
116 | |||
117 | What: /sys/fs/nilfs2/<device>/segctor/current_last_full_seg | ||
118 | Date: April 2014 | ||
119 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
120 | Description: | ||
121 | Show index number of the latest full segment. | ||
122 | |||
123 | What: /sys/fs/nilfs2/<device>/segctor/next_full_seg | ||
124 | Date: April 2014 | ||
125 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
126 | Description: | ||
127 | Show index number of the full segment index | ||
128 | to be used next. | ||
129 | |||
130 | What: /sys/fs/nilfs2/<device>/segctor/next_pseg_offset | ||
131 | Date: April 2014 | ||
132 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
133 | Description: | ||
134 | Show offset of next partial segment in the current | ||
135 | full segment. | ||
136 | |||
137 | What: /sys/fs/nilfs2/<device>/segctor/next_checkpoint | ||
138 | Date: April 2014 | ||
139 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
140 | Description: | ||
141 | Show next checkpoint number. | ||
142 | |||
143 | What: /sys/fs/nilfs2/<device>/segctor/last_seg_write_time | ||
144 | Date: April 2014 | ||
145 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
146 | Description: | ||
147 | Show write time of the last segment in | ||
148 | human-readable format. | ||
149 | |||
150 | What: /sys/fs/nilfs2/<device>/segctor/last_seg_write_time_secs | ||
151 | Date: April 2014 | ||
152 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
153 | Description: | ||
154 | Show write time of the last segment in seconds. | ||
155 | |||
156 | What: /sys/fs/nilfs2/<device>/segctor/last_nongc_write_time | ||
157 | Date: April 2014 | ||
158 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
159 | Description: | ||
160 | Show write time of the last segment not for cleaner | ||
161 | operation in human-readable format. | ||
162 | |||
163 | What: /sys/fs/nilfs2/<device>/segctor/last_nongc_write_time_secs | ||
164 | Date: April 2014 | ||
165 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
166 | Description: | ||
167 | Show write time of the last segment not for cleaner | ||
168 | operation in seconds. | ||
169 | |||
170 | What: /sys/fs/nilfs2/<device>/segctor/dirty_data_blocks_count | ||
171 | Date: April 2014 | ||
172 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
173 | Description: | ||
174 | Show number of dirty data blocks. | ||
175 | |||
176 | What: /sys/fs/nilfs2/<device>/segctor/README | ||
177 | Date: April 2014 | ||
178 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
179 | Description: | ||
180 | Describe attributes of /sys/fs/nilfs2/<device>/segctor | ||
181 | group. | ||
182 | |||
183 | What: /sys/fs/nilfs2/<device>/segments/segments_number | ||
184 | Date: April 2014 | ||
185 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
186 | Description: | ||
187 | Show number of segments on a volume. | ||
188 | |||
189 | What: /sys/fs/nilfs2/<device>/segments/blocks_per_segment | ||
190 | Date: April 2014 | ||
191 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
192 | Description: | ||
193 | Show number of blocks in segment. | ||
194 | |||
195 | What: /sys/fs/nilfs2/<device>/segments/clean_segments | ||
196 | Date: April 2014 | ||
197 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
198 | Description: | ||
199 | Show count of clean segments. | ||
200 | |||
201 | What: /sys/fs/nilfs2/<device>/segments/dirty_segments | ||
202 | Date: April 2014 | ||
203 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
204 | Description: | ||
205 | Show count of dirty segments. | ||
206 | |||
207 | What: /sys/fs/nilfs2/<device>/segments/README | ||
208 | Date: April 2014 | ||
209 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
210 | Description: | ||
211 | Describe attributes of /sys/fs/nilfs2/<device>/segments | ||
212 | group. | ||
213 | |||
214 | What: /sys/fs/nilfs2/<device>/checkpoints/checkpoints_number | ||
215 | Date: April 2014 | ||
216 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
217 | Description: | ||
218 | Show number of checkpoints on volume. | ||
219 | |||
220 | What: /sys/fs/nilfs2/<device>/checkpoints/snapshots_number | ||
221 | Date: April 2014 | ||
222 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
223 | Description: | ||
224 | Show number of snapshots on volume. | ||
225 | |||
226 | What: /sys/fs/nilfs2/<device>/checkpoints/last_seg_checkpoint | ||
227 | Date: April 2014 | ||
228 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
229 | Description: | ||
230 | Show checkpoint number of the latest segment. | ||
231 | |||
232 | What: /sys/fs/nilfs2/<device>/checkpoints/next_checkpoint | ||
233 | Date: April 2014 | ||
234 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
235 | Description: | ||
236 | Show next checkpoint number. | ||
237 | |||
238 | What: /sys/fs/nilfs2/<device>/checkpoints/README | ||
239 | Date: April 2014 | ||
240 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
241 | Description: | ||
242 | Describe attributes of /sys/fs/nilfs2/<device>/checkpoints | ||
243 | group. | ||
244 | |||
245 | What: /sys/fs/nilfs2/<device>/mounted_snapshots/README | ||
246 | Date: April 2014 | ||
247 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
248 | Description: | ||
249 | Describe content of /sys/fs/nilfs2/<device>/mounted_snapshots | ||
250 | group. | ||
251 | |||
252 | What: /sys/fs/nilfs2/<device>/mounted_snapshots/<id>/inodes_count | ||
253 | Date: April 2014 | ||
254 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
255 | Description: | ||
256 | Show number of inodes for snapshot. | ||
257 | |||
258 | What: /sys/fs/nilfs2/<device>/mounted_snapshots/<id>/blocks_count | ||
259 | Date: April 2014 | ||
260 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
261 | Description: | ||
262 | Show number of blocks for snapshot. | ||
263 | |||
264 | What: /sys/fs/nilfs2/<device>/mounted_snapshots/<id>/README | ||
265 | Date: April 2014 | ||
266 | Contact: "Vyacheslav Dubeyko" <slava@dubeyko.com> | ||
267 | Description: | ||
268 | Describe attributes of /sys/fs/nilfs2/<device>/mounted_snapshots/<id> | ||
269 | group. | ||
diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt index 80ac454704b8..8870b0212150 100644 --- a/Documentation/cgroups/memcg_test.txt +++ b/Documentation/cgroups/memcg_test.txt | |||
@@ -24,64 +24,27 @@ Please note that implementation details can be changed. | |||
24 | 24 | ||
25 | a page/swp_entry may be charged (usage += PAGE_SIZE) at | 25 | a page/swp_entry may be charged (usage += PAGE_SIZE) at |
26 | 26 | ||
27 | mem_cgroup_charge_anon() | 27 | mem_cgroup_try_charge() |
28 | Called at new page fault and Copy-On-Write. | ||
29 | |||
30 | mem_cgroup_try_charge_swapin() | ||
31 | Called at do_swap_page() (page fault on swap entry) and swapoff. | ||
32 | Followed by charge-commit-cancel protocol. (With swap accounting) | ||
33 | At commit, a charge recorded in swap_cgroup is removed. | ||
34 | |||
35 | mem_cgroup_charge_file() | ||
36 | Called at add_to_page_cache() | ||
37 | |||
38 | mem_cgroup_cache_charge_swapin() | ||
39 | Called at shmem's swapin. | ||
40 | |||
41 | mem_cgroup_prepare_migration() | ||
42 | Called before migration. "extra" charge is done and followed by | ||
43 | charge-commit-cancel protocol. | ||
44 | At commit, charge against oldpage or newpage will be committed. | ||
45 | 28 | ||
46 | 2. Uncharge | 29 | 2. Uncharge |
47 | a page/swp_entry may be uncharged (usage -= PAGE_SIZE) by | 30 | a page/swp_entry may be uncharged (usage -= PAGE_SIZE) by |
48 | 31 | ||
49 | mem_cgroup_uncharge_page() | 32 | mem_cgroup_uncharge() |
50 | Called when an anonymous page is fully unmapped. I.e., mapcount goes | 33 | Called when a page's refcount goes down to 0. |
51 | to 0. If the page is SwapCache, uncharge is delayed until | ||
52 | mem_cgroup_uncharge_swapcache(). | ||
53 | |||
54 | mem_cgroup_uncharge_cache_page() | ||
55 | Called when a page-cache is deleted from radix-tree. If the page is | ||
56 | SwapCache, uncharge is delayed until mem_cgroup_uncharge_swapcache(). | ||
57 | |||
58 | mem_cgroup_uncharge_swapcache() | ||
59 | Called when SwapCache is removed from radix-tree. The charge itself | ||
60 | is moved to swap_cgroup. (If mem+swap controller is disabled, no | ||
61 | charge to swap occurs.) | ||
62 | 34 | ||
63 | mem_cgroup_uncharge_swap() | 35 | mem_cgroup_uncharge_swap() |
64 | Called when swp_entry's refcnt goes down to 0. A charge against swap | 36 | Called when swp_entry's refcnt goes down to 0. A charge against swap |
65 | disappears. | 37 | disappears. |
66 | 38 | ||
67 | mem_cgroup_end_migration(old, new) | ||
68 | At success of migration old is uncharged (if necessary), a charge | ||
69 | to new page is committed. At failure, charge to old page is committed. | ||
70 | |||
71 | 3. charge-commit-cancel | 39 | 3. charge-commit-cancel |
72 | In some case, we can't know this "charge" is valid or not at charging | 40 | Memcg pages are charged in two steps: |
73 | (because of races). | 41 | mem_cgroup_try_charge() |
74 | To handle such case, there are charge-commit-cancel functions. | 42 | mem_cgroup_commit_charge() or mem_cgroup_cancel_charge() |
75 | mem_cgroup_try_charge_XXX | ||
76 | mem_cgroup_commit_charge_XXX | ||
77 | mem_cgroup_cancel_charge_XXX | ||
78 | these are used in swap-in and migration. | ||
79 | 43 | ||
80 | At try_charge(), there are no flags to say "this page is charged". | 44 | At try_charge(), there are no flags to say "this page is charged". |
81 | at this point, usage += PAGE_SIZE. | 45 | at this point, usage += PAGE_SIZE. |
82 | 46 | ||
83 | At commit(), the function checks the page should be charged or not | 47 | At commit(), the page is associated with the memcg. |
84 | and set flags or avoid charging.(usage -= PAGE_SIZE) | ||
85 | 48 | ||
86 | At cancel(), simply usage -= PAGE_SIZE. | 49 | At cancel(), simply usage -= PAGE_SIZE. |
87 | 50 | ||
@@ -91,18 +54,6 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y. | |||
91 | Anonymous page is newly allocated at | 54 | Anonymous page is newly allocated at |
92 | - page fault into MAP_ANONYMOUS mapping. | 55 | - page fault into MAP_ANONYMOUS mapping. |
93 | - Copy-On-Write. | 56 | - Copy-On-Write. |
94 | It is charged right after it's allocated before doing any page table | ||
95 | related operations. Of course, it's uncharged when another page is used | ||
96 | for the fault address. | ||
97 | |||
98 | At freeing anonymous page (by exit() or munmap()), zap_pte() is called | ||
99 | and pages for ptes are freed one by one.(see mm/memory.c). Uncharges | ||
100 | are done at page_remove_rmap() when page_mapcount() goes down to 0. | ||
101 | |||
102 | Another page freeing is by page-reclaim (vmscan.c) and anonymous | ||
103 | pages are swapped out. In this case, the page is marked as | ||
104 | PageSwapCache(). uncharge() routine doesn't uncharge the page marked | ||
105 | as SwapCache(). It's delayed until __delete_from_swap_cache(). | ||
106 | 57 | ||
107 | 4.1 Swap-in. | 58 | 4.1 Swap-in. |
108 | At swap-in, the page is taken from swap-cache. There are 2 cases. | 59 | At swap-in, the page is taken from swap-cache. There are 2 cases. |
@@ -111,41 +62,6 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y. | |||
111 | (b) If the SwapCache has been mapped by processes, it has been | 62 | (b) If the SwapCache has been mapped by processes, it has been |
112 | charged already. | 63 | charged already. |
113 | 64 | ||
114 | This swap-in is one of the most complicated work. In do_swap_page(), | ||
115 | following events occur when pte is unchanged. | ||
116 | |||
117 | (1) the page (SwapCache) is looked up. | ||
118 | (2) lock_page() | ||
119 | (3) try_charge_swapin() | ||
120 | (4) reuse_swap_page() (may call delete_swap_cache()) | ||
121 | (5) commit_charge_swapin() | ||
122 | (6) swap_free(). | ||
123 | |||
124 | Considering following situation for example. | ||
125 | |||
126 | (A) The page has not been charged before (2) and reuse_swap_page() | ||
127 | doesn't call delete_from_swap_cache(). | ||
128 | (B) The page has not been charged before (2) and reuse_swap_page() | ||
129 | calls delete_from_swap_cache(). | ||
130 | (C) The page has been charged before (2) and reuse_swap_page() doesn't | ||
131 | call delete_from_swap_cache(). | ||
132 | (D) The page has been charged before (2) and reuse_swap_page() calls | ||
133 | delete_from_swap_cache(). | ||
134 | |||
135 | memory.usage/memsw.usage changes to this page/swp_entry will be | ||
136 | Case (A) (B) (C) (D) | ||
137 | Event | ||
138 | Before (2) 0/ 1 0/ 1 1/ 1 1/ 1 | ||
139 | =========================================== | ||
140 | (3) +1/+1 +1/+1 +1/+1 +1/+1 | ||
141 | (4) - 0/ 0 - -1/ 0 | ||
142 | (5) 0/-1 0/ 0 -1/-1 0/ 0 | ||
143 | (6) - 0/-1 - 0/-1 | ||
144 | =========================================== | ||
145 | Result 1/ 1 1/ 1 1/ 1 1/ 1 | ||
146 | |||
147 | In any cases, charges to this page should be 1/ 1. | ||
148 | |||
149 | 4.2 Swap-out. | 65 | 4.2 Swap-out. |
150 | At swap-out, typical state transition is below. | 66 | At swap-out, typical state transition is below. |
151 | 67 | ||
@@ -158,28 +74,20 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y. | |||
158 | swp_entry's refcnt -= 1. | 74 | swp_entry's refcnt -= 1. |
159 | 75 | ||
160 | 76 | ||
161 | At (b), the page is marked as SwapCache and not uncharged. | ||
162 | At (d), the page is removed from SwapCache and a charge in page_cgroup | ||
163 | is moved to swap_cgroup. | ||
164 | |||
165 | Finally, at task exit, | 77 | Finally, at task exit, |
166 | (e) zap_pte() is called and swp_entry's refcnt -=1 -> 0. | 78 | (e) zap_pte() is called and swp_entry's refcnt -=1 -> 0. |
167 | Here, a charge in swap_cgroup disappears. | ||
168 | 79 | ||
169 | 5. Page Cache | 80 | 5. Page Cache |
170 | Page Cache is charged at | 81 | Page Cache is charged at |
171 | - add_to_page_cache_locked(). | 82 | - add_to_page_cache_locked(). |
172 | 83 | ||
173 | uncharged at | ||
174 | - __remove_from_page_cache(). | ||
175 | |||
176 | The logic is very clear. (About migration, see below) | 84 | The logic is very clear. (About migration, see below) |
177 | Note: __remove_from_page_cache() is called by remove_from_page_cache() | 85 | Note: __remove_from_page_cache() is called by remove_from_page_cache() |
178 | and __remove_mapping(). | 86 | and __remove_mapping(). |
179 | 87 | ||
180 | 6. Shmem(tmpfs) Page Cache | 88 | 6. Shmem(tmpfs) Page Cache |
181 | Memcg's charge/uncharge have special handlers of shmem. The best way | 89 | The best way to understand shmem's page state transition is to read |
182 | to understand shmem's page state transition is to read mm/shmem.c. | 90 | mm/shmem.c. |
183 | But brief explanation of the behavior of memcg around shmem will be | 91 | But brief explanation of the behavior of memcg around shmem will be |
184 | helpful to understand the logic. | 92 | helpful to understand the logic. |
185 | 93 | ||
@@ -192,56 +100,10 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y. | |||
192 | It's charged when... | 100 | It's charged when... |
193 | - A new page is added to shmem's radix-tree. | 101 | - A new page is added to shmem's radix-tree. |
194 | - A swp page is read. (move a charge from swap_cgroup to page_cgroup) | 102 | - A swp page is read. (move a charge from swap_cgroup to page_cgroup) |
195 | It's uncharged when | ||
196 | - A page is removed from radix-tree and not SwapCache. | ||
197 | - When SwapCache is removed, a charge is moved to swap_cgroup. | ||
198 | - When swp_entry's refcnt goes down to 0, a charge in swap_cgroup | ||
199 | disappears. | ||
200 | 103 | ||
201 | 7. Page Migration | 104 | 7. Page Migration |
202 | One of the most complicated functions is page-migration-handler. | 105 | |
203 | Memcg has 2 routines. Assume that we are migrating a page's contents | 106 | mem_cgroup_migrate() |
204 | from OLDPAGE to NEWPAGE. | ||
205 | |||
206 | Usual migration logic is.. | ||
207 | (a) remove the page from LRU. | ||
208 | (b) allocate NEWPAGE (migration target) | ||
209 | (c) lock by lock_page(). | ||
210 | (d) unmap all mappings. | ||
211 | (e-1) If necessary, replace entry in radix-tree. | ||
212 | (e-2) move contents of a page. | ||
213 | (f) map all mappings again. | ||
214 | (g) pushback the page to LRU. | ||
215 | (-) OLDPAGE will be freed. | ||
216 | |||
217 | Before (g), memcg should complete all necessary charge/uncharge to | ||
218 | NEWPAGE/OLDPAGE. | ||
219 | |||
220 | The point is.... | ||
221 | - If OLDPAGE is anonymous, all charges will be dropped at (d) because | ||
222 | try_to_unmap() drops all mapcount and the page will not be | ||
223 | SwapCache. | ||
224 | |||
225 | - If OLDPAGE is SwapCache, charges will be kept at (g) because | ||
226 | __delete_from_swap_cache() isn't called at (e-1) | ||
227 | |||
228 | - If OLDPAGE is page-cache, charges will be kept at (g) because | ||
229 | remove_from_swap_cache() isn't called at (e-1) | ||
230 | |||
231 | memcg provides following hooks. | ||
232 | |||
233 | - mem_cgroup_prepare_migration(OLDPAGE) | ||
234 | Called after (b) to account a charge (usage += PAGE_SIZE) against | ||
235 | memcg which OLDPAGE belongs to. | ||
236 | |||
237 | - mem_cgroup_end_migration(OLDPAGE, NEWPAGE) | ||
238 | Called after (f) before (g). | ||
239 | If OLDPAGE is used, commit OLDPAGE again. If OLDPAGE is already | ||
240 | charged, a charge by prepare_migration() is automatically canceled. | ||
241 | If NEWPAGE is used, commit NEWPAGE and uncharge OLDPAGE. | ||
242 | |||
243 | But zap_pte() (by exit or munmap) can be called while migration, | ||
244 | we have to check if OLDPAGE/NEWPAGE is a valid page after commit(). | ||
245 | 107 | ||
246 | 8. LRU | 108 | 8. LRU |
247 | Each memcg has its own private LRU. Now, its handling is under global | 109 | Each memcg has its own private LRU. Now, its handling is under global |
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt index 37803eb5521e..6af570ec53b4 100644 --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt | |||
@@ -70,6 +70,7 @@ nuvoton,npct501 i2c trusted platform module (TPM) | |||
70 | nxp,pca9556 Octal SMBus and I2C registered interface | 70 | nxp,pca9556 Octal SMBus and I2C registered interface |
71 | nxp,pca9557 8-bit I2C-bus and SMBus I/O port with reset | 71 | nxp,pca9557 8-bit I2C-bus and SMBus I/O port with reset |
72 | nxp,pcf8563 Real-time clock/calendar | 72 | nxp,pcf8563 Real-time clock/calendar |
73 | nxp,pcf85063 Tiny Real-Time Clock | ||
73 | ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus | 74 | ovti,ov5642 OV5642: Color CMOS QSXGA (5-megapixel) Image Sensor with OmniBSI and Embedded TrueFocus |
74 | pericom,pt7c4338 Real-time Clock Module | 75 | pericom,pt7c4338 Real-time Clock Module |
75 | plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch | 76 | plx,pex8648 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch |
diff --git a/Documentation/oops-tracing.txt b/Documentation/oops-tracing.txt index e3155995ddd8..beefb9f82902 100644 --- a/Documentation/oops-tracing.txt +++ b/Documentation/oops-tracing.txt | |||
@@ -268,6 +268,8 @@ characters, each representing a particular tainted value. | |||
268 | 14: 'E' if an unsigned module has been loaded in a kernel supporting | 268 | 14: 'E' if an unsigned module has been loaded in a kernel supporting |
269 | module signature. | 269 | module signature. |
270 | 270 | ||
271 | 15: 'L' if a soft lockup has previously occurred on the system. | ||
272 | |||
271 | The primary reason for the 'Tainted: ' string is to tell kernel | 273 | The primary reason for the 'Tainted: ' string is to tell kernel |
272 | debuggers if this is a clean kernel or if anything unusual has | 274 | debuggers if this is a clean kernel or if anything unusual has |
273 | occurred. Tainting is permanent: even if an offending module is | 275 | occurred. Tainting is permanent: even if an offending module is |
diff --git a/Documentation/rapidio/tsi721.txt b/Documentation/rapidio/tsi721.txt index 335f3c6087dc..626052f403bb 100644 --- a/Documentation/rapidio/tsi721.txt +++ b/Documentation/rapidio/tsi721.txt | |||
@@ -20,13 +20,26 @@ II. Known problems | |||
20 | 20 | ||
21 | None. | 21 | None. |
22 | 22 | ||
23 | III. To do | 23 | III. DMA Engine Support |
24 | 24 | ||
25 | Add DMA data transfers (non-messaging). | 25 | Tsi721 mport driver supports DMA data transfers between local system memory and |
26 | Add inbound region (SRIO-to-PCIe) mapping. | 26 | remote RapidIO devices. This functionality is implemented according to SLAVE |
27 | mode API defined by common Linux kernel DMA Engine framework. | ||
28 | |||
29 | Depending on system requirements RapidIO DMA operations can be included/excluded | ||
30 | by setting CONFIG_RAPIDIO_DMA_ENGINE option. Tsi721 miniport driver uses seven | ||
31 | out of eight available BDMA channels to support DMA data transfers. | ||
32 | One BDMA channel is reserved for generation of maintenance read/write requests. | ||
33 | |||
34 | If Tsi721 mport driver have been built with RAPIDIO_DMA_ENGINE support included, | ||
35 | this driver will accept DMA-specific module parameter: | ||
36 | "dma_desc_per_channel" - defines number of hardware buffer descriptors used by | ||
37 | each BDMA channel of Tsi721 (by default - 128). | ||
27 | 38 | ||
28 | IV. Version History | 39 | IV. Version History |
29 | 40 | ||
41 | 1.1.0 - DMA operations re-worked to support data scatter/gather lists larger | ||
42 | than hardware buffer descriptors ring. | ||
30 | 1.0.0 - Initial driver release. | 43 | 1.0.0 - Initial driver release. |
31 | 44 | ||
32 | V. License | 45 | V. License |
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index c14374e71775..f79eb9666379 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -826,6 +826,7 @@ can be ORed together: | |||
826 | 4096 - An out-of-tree module has been loaded. | 826 | 4096 - An out-of-tree module has been loaded. |
827 | 8192 - An unsigned module has been loaded in a kernel supporting module | 827 | 8192 - An unsigned module has been loaded in a kernel supporting module |
828 | signature. | 828 | signature. |
829 | 16384 - A soft lockup has previously occurred on the system. | ||
829 | 830 | ||
830 | ============================================================== | 831 | ============================================================== |
831 | 832 | ||