diff options
author | Jiri Kosina <jkosina@suse.cz> | 2012-06-29 08:45:58 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-06-29 08:45:58 -0400 |
commit | 59f91e5dd0504dc0ebfaa0b6f3a55e6931f96266 (patch) | |
tree | b913718405d44a921905ac71044fbde410256865 /Documentation | |
parent | 57bdfdd80077addf518a9b90c4a66890efc4f70e (diff) | |
parent | 89abfab133ef1f5902abafb744df72793213ac19 (diff) |
Merge branch 'master' into for-next
Conflicts:
include/linux/mmzone.h
Synced with Linus' tree so that trivial patch can be applied
on top of up-to-date code properly.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/ABI/testing/sysfs-bus-i2c-devices-lm3533 | 15 | ||||
-rw-r--r-- | Documentation/cgroups/memory.txt | 24 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/mfd/da9052-i2c.txt | 60 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/mfd/tps65910.txt | 133 | ||||
-rw-r--r-- | Documentation/devicetree/bindings/mfd/twl6040.txt | 62 | ||||
-rw-r--r-- | Documentation/filesystems/Locking | 2 | ||||
-rw-r--r-- | Documentation/filesystems/proc.txt | 2 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 13 | ||||
-rw-r--r-- | Documentation/vm/transhuge.txt | 62 |
9 files changed, 350 insertions, 23 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-i2c-devices-lm3533 b/Documentation/ABI/testing/sysfs-bus-i2c-devices-lm3533 new file mode 100644 index 000000000000..1b62230b33b9 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-i2c-devices-lm3533 | |||
@@ -0,0 +1,15 @@ | |||
1 | What: /sys/bus/i2c/devices/.../output_hvled[n] | ||
2 | Date: April 2012 | ||
3 | KernelVersion: 3.5 | ||
4 | Contact: Johan Hovold <jhovold@gmail.com> | ||
5 | Description: | ||
6 | Set the controlling backlight device for high-voltage current | ||
7 | sink HVLED[n] (n = 1, 2) (0, 1). | ||
8 | |||
9 | What: /sys/bus/i2c/devices/.../output_lvled[n] | ||
10 | Date: April 2012 | ||
11 | KernelVersion: 3.5 | ||
12 | Contact: Johan Hovold <jhovold@gmail.com> | ||
13 | Description: | ||
14 | Set the controlling led device for low-voltage current sink | ||
15 | LVLED[n] (n = 1..5) (0..3). | ||
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index 9b1067afb224..6a066a270fc5 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -184,12 +184,14 @@ behind this approach is that a cgroup that aggressively uses a shared | |||
184 | page will eventually get charged for it (once it is uncharged from | 184 | page will eventually get charged for it (once it is uncharged from |
185 | the cgroup that brought it in -- this will happen on memory pressure). | 185 | the cgroup that brought it in -- this will happen on memory pressure). |
186 | 186 | ||
187 | But see section 8.2: when moving a task to another cgroup, its pages may | ||
188 | be recharged to the new cgroup, if move_charge_at_immigrate has been chosen. | ||
189 | |||
187 | Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used. | 190 | Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used. |
188 | When you do swapoff and make swapped-out pages of shmem(tmpfs) to | 191 | When you do swapoff and make swapped-out pages of shmem(tmpfs) to |
189 | be backed into memory in force, charges for pages are accounted against the | 192 | be backed into memory in force, charges for pages are accounted against the |
190 | caller of swapoff rather than the users of shmem. | 193 | caller of swapoff rather than the users of shmem. |
191 | 194 | ||
192 | |||
193 | 2.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) | 195 | 2.4 Swap Extension (CONFIG_CGROUP_MEM_RES_CTLR_SWAP) |
194 | 196 | ||
195 | Swap Extension allows you to record charge for swap. A swapped-in page is | 197 | Swap Extension allows you to record charge for swap. A swapped-in page is |
@@ -430,17 +432,10 @@ hierarchical_memory_limit - # of bytes of memory limit with regard to hierarchy | |||
430 | hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to | 432 | hierarchical_memsw_limit - # of bytes of memory+swap limit with regard to |
431 | hierarchy under which memory cgroup is. | 433 | hierarchy under which memory cgroup is. |
432 | 434 | ||
433 | total_cache - sum of all children's "cache" | 435 | total_<counter> - # hierarchical version of <counter>, which in |
434 | total_rss - sum of all children's "rss" | 436 | addition to the cgroup's own value includes the |
435 | total_mapped_file - sum of all children's "cache" | 437 | sum of all hierarchical children's values of |
436 | total_pgpgin - sum of all children's "pgpgin" | 438 | <counter>, i.e. total_cache |
437 | total_pgpgout - sum of all children's "pgpgout" | ||
438 | total_swap - sum of all children's "swap" | ||
439 | total_inactive_anon - sum of all children's "inactive_anon" | ||
440 | total_active_anon - sum of all children's "active_anon" | ||
441 | total_inactive_file - sum of all children's "inactive_file" | ||
442 | total_active_file - sum of all children's "active_file" | ||
443 | total_unevictable - sum of all children's "unevictable" | ||
444 | 439 | ||
445 | # The following additional stats are dependent on CONFIG_DEBUG_VM. | 440 | # The following additional stats are dependent on CONFIG_DEBUG_VM. |
446 | 441 | ||
@@ -622,8 +617,7 @@ memory cgroup. | |||
622 | bit | what type of charges would be moved ? | 617 | bit | what type of charges would be moved ? |
623 | -----+------------------------------------------------------------------------ | 618 | -----+------------------------------------------------------------------------ |
624 | 0 | A charge of an anonymous page(or swap of it) used by the target task. | 619 | 0 | A charge of an anonymous page(or swap of it) used by the target task. |
625 | | Those pages and swaps must be used only by the target task. You must | 620 | | You must enable Swap Extension(see 2.4) to enable move of swap charges. |
626 | | enable Swap Extension(see 2.4) to enable move of swap charges. | ||
627 | -----+------------------------------------------------------------------------ | 621 | -----+------------------------------------------------------------------------ |
628 | 1 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory) | 622 | 1 | A charge of file pages(normal file, tmpfs file(e.g. ipc shared memory) |
629 | | and swaps of tmpfs file) mmapped by the target task. Unlike the case of | 623 | | and swaps of tmpfs file) mmapped by the target task. Unlike the case of |
@@ -636,8 +630,6 @@ memory cgroup. | |||
636 | 630 | ||
637 | 8.3 TODO | 631 | 8.3 TODO |
638 | 632 | ||
639 | - Implement madvise(2) to let users decide the vma to be moved or not to be | ||
640 | moved. | ||
641 | - All of moving charge operations are done under cgroup_mutex. It's not good | 633 | - All of moving charge operations are done under cgroup_mutex. It's not good |
642 | behavior to hold the mutex too long, so we may need some trick. | 634 | behavior to hold the mutex too long, so we may need some trick. |
643 | 635 | ||
diff --git a/Documentation/devicetree/bindings/mfd/da9052-i2c.txt b/Documentation/devicetree/bindings/mfd/da9052-i2c.txt new file mode 100644 index 000000000000..1857f4a6b9a9 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/da9052-i2c.txt | |||
@@ -0,0 +1,60 @@ | |||
1 | * Dialog DA9052/53 Power Management Integrated Circuit (PMIC) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : Should be "dlg,da9052", "dlg,da9053-aa", | ||
5 | "dlg,da9053-ab", or "dlg,da9053-bb" | ||
6 | |||
7 | Sub-nodes: | ||
8 | - regulators : Contain the regulator nodes. The DA9052/53 regulators are | ||
9 | bound using their names as listed below: | ||
10 | |||
11 | buck0 : regulator BUCK0 | ||
12 | buck1 : regulator BUCK1 | ||
13 | buck2 : regulator BUCK2 | ||
14 | buck3 : regulator BUCK3 | ||
15 | ldo4 : regulator LDO4 | ||
16 | ldo5 : regulator LDO5 | ||
17 | ldo6 : regulator LDO6 | ||
18 | ldo7 : regulator LDO7 | ||
19 | ldo8 : regulator LDO8 | ||
20 | ldo9 : regulator LDO9 | ||
21 | ldo10 : regulator LDO10 | ||
22 | ldo11 : regulator LDO11 | ||
23 | ldo12 : regulator LDO12 | ||
24 | ldo13 : regulator LDO13 | ||
25 | |||
26 | The bindings details of individual regulator device can be found in: | ||
27 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
28 | |||
29 | Examples: | ||
30 | |||
31 | i2c@63fc8000 { /* I2C1 */ | ||
32 | status = "okay"; | ||
33 | |||
34 | pmic: dialog@48 { | ||
35 | compatible = "dlg,da9053-aa"; | ||
36 | reg = <0x48>; | ||
37 | |||
38 | regulators { | ||
39 | buck0 { | ||
40 | regulator-min-microvolt = <500000>; | ||
41 | regulator-max-microvolt = <2075000>; | ||
42 | }; | ||
43 | |||
44 | buck1 { | ||
45 | regulator-min-microvolt = <500000>; | ||
46 | regulator-max-microvolt = <2075000>; | ||
47 | }; | ||
48 | |||
49 | buck2 { | ||
50 | regulator-min-microvolt = <925000>; | ||
51 | regulator-max-microvolt = <2500000>; | ||
52 | }; | ||
53 | |||
54 | buck3 { | ||
55 | regulator-min-microvolt = <925000>; | ||
56 | regulator-max-microvolt = <2500000>; | ||
57 | }; | ||
58 | }; | ||
59 | }; | ||
60 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/tps65910.txt b/Documentation/devicetree/bindings/mfd/tps65910.txt new file mode 100644 index 000000000000..645f5eaadb3f --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/tps65910.txt | |||
@@ -0,0 +1,133 @@ | |||
1 | TPS65910 Power Management Integrated Circuit | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "ti,tps65910" or "ti,tps65911" | ||
5 | - reg: I2C slave address | ||
6 | - interrupts: the interrupt outputs of the controller | ||
7 | - #gpio-cells: number of cells to describe a GPIO, this should be 2. | ||
8 | The first cell is the GPIO number. | ||
9 | The second cell is used to specify additional options <unused>. | ||
10 | - gpio-controller: mark the device as a GPIO controller | ||
11 | - #interrupt-cells: the number of cells to describe an IRQ, this should be 2. | ||
12 | The first cell is the IRQ number. | ||
13 | The second cell is the flags, encoded as the trigger masks from | ||
14 | Documentation/devicetree/bindings/interrupts.txt | ||
15 | - regulators: This is the list of child nodes that specify the regulator | ||
16 | initialization data for defined regulators. Not all regulators for the given | ||
17 | device need to be present. The definition for each of these nodes is defined | ||
18 | using the standard binding for regulators found at | ||
19 | Documentation/devicetree/bindings/regulator/regulator.txt. | ||
20 | |||
21 | The valid names for regulators are: | ||
22 | tps65910: vrtc, vio, vdd1, vdd2, vdd3, vdig1, vdig2, vpll, vdac, vaux1, | ||
23 | vaux2, vaux33, vmmc | ||
24 | tps65911: vrtc, vio, vdd1, vdd3, vddctrl, ldo1, ldo2, ldo3, ldo4, ldo5, | ||
25 | ldo6, ldo7, ldo8 | ||
26 | |||
27 | Optional properties: | ||
28 | - ti,vmbch-threshold: (tps65911) main battery charged threshold | ||
29 | comparator. (see VMBCH_VSEL in TPS65910 datasheet) | ||
30 | - ti,vmbch2-threshold: (tps65911) main battery discharged threshold | ||
31 | comparator. (see VMBCH_VSEL in TPS65910 datasheet) | ||
32 | - ti,en-gpio-sleep: enable sleep control for gpios | ||
33 | There should be 9 entries here, one for each gpio. | ||
34 | |||
35 | Regulator Optional properties: | ||
36 | - ti,regulator-ext-sleep-control: enable external sleep | ||
37 | control through external inputs [0 (not enabled), 1 (EN1), 2 (EN2) or 4(EN3)] | ||
38 | If this property is not defined, it defaults to 0 (not enabled). | ||
39 | |||
40 | Example: | ||
41 | |||
42 | pmu: tps65910@d2 { | ||
43 | compatible = "ti,tps65910"; | ||
44 | reg = <0xd2>; | ||
45 | interrupt-parent = <&intc>; | ||
46 | interrupts = < 0 118 0x04 >; | ||
47 | |||
48 | #gpio-cells = <2>; | ||
49 | gpio-controller; | ||
50 | |||
51 | #interrupt-cells = <2>; | ||
52 | interrupt-controller; | ||
53 | |||
54 | ti,vmbch-threshold = 0; | ||
55 | ti,vmbch2-threshold = 0; | ||
56 | |||
57 | ti,en-gpio-sleep = <0 0 1 0 0 0 0 0 0>; | ||
58 | |||
59 | regulators { | ||
60 | vdd1_reg: vdd1 { | ||
61 | regulator-min-microvolt = < 600000>; | ||
62 | regulator-max-microvolt = <1500000>; | ||
63 | regulator-always-on; | ||
64 | regulator-boot-on; | ||
65 | ti,regulator-ext-sleep-control = <0>; | ||
66 | }; | ||
67 | vdd2_reg: vdd2 { | ||
68 | regulator-min-microvolt = < 600000>; | ||
69 | regulator-max-microvolt = <1500000>; | ||
70 | regulator-always-on; | ||
71 | regulator-boot-on; | ||
72 | ti,regulator-ext-sleep-control = <4>; | ||
73 | }; | ||
74 | vddctrl_reg: vddctrl { | ||
75 | regulator-min-microvolt = < 600000>; | ||
76 | regulator-max-microvolt = <1400000>; | ||
77 | regulator-always-on; | ||
78 | regulator-boot-on; | ||
79 | ti,regulator-ext-sleep-control = <0>; | ||
80 | }; | ||
81 | vio_reg: vio { | ||
82 | regulator-min-microvolt = <1500000>; | ||
83 | regulator-max-microvolt = <1800000>; | ||
84 | regulator-always-on; | ||
85 | regulator-boot-on; | ||
86 | ti,regulator-ext-sleep-control = <1>; | ||
87 | }; | ||
88 | ldo1_reg: ldo1 { | ||
89 | regulator-min-microvolt = <1000000>; | ||
90 | regulator-max-microvolt = <3300000>; | ||
91 | ti,regulator-ext-sleep-control = <0>; | ||
92 | }; | ||
93 | ldo2_reg: ldo2 { | ||
94 | regulator-min-microvolt = <1050000>; | ||
95 | regulator-max-microvolt = <1050000>; | ||
96 | ti,regulator-ext-sleep-control = <0>; | ||
97 | }; | ||
98 | ldo3_reg: ldo3 { | ||
99 | regulator-min-microvolt = <1000000>; | ||
100 | regulator-max-microvolt = <3300000>; | ||
101 | ti,regulator-ext-sleep-control = <0>; | ||
102 | }; | ||
103 | ldo4_reg: ldo4 { | ||
104 | regulator-min-microvolt = <1000000>; | ||
105 | regulator-max-microvolt = <3300000>; | ||
106 | regulator-always-on; | ||
107 | ti,regulator-ext-sleep-control = <0>; | ||
108 | }; | ||
109 | ldo5_reg: ldo5 { | ||
110 | regulator-min-microvolt = <1000000>; | ||
111 | regulator-max-microvolt = <3300000>; | ||
112 | ti,regulator-ext-sleep-control = <0>; | ||
113 | }; | ||
114 | ldo6_reg: ldo6 { | ||
115 | regulator-min-microvolt = <1200000>; | ||
116 | regulator-max-microvolt = <1200000>; | ||
117 | ti,regulator-ext-sleep-control = <0>; | ||
118 | }; | ||
119 | ldo7_reg: ldo7 { | ||
120 | regulator-min-microvolt = <1200000>; | ||
121 | regulator-max-microvolt = <1200000>; | ||
122 | regulator-always-on; | ||
123 | regulator-boot-on; | ||
124 | ti,regulator-ext-sleep-control = <1>; | ||
125 | }; | ||
126 | ldo8_reg: ldo8 { | ||
127 | regulator-min-microvolt = <1000000>; | ||
128 | regulator-max-microvolt = <3300000>; | ||
129 | regulator-always-on; | ||
130 | ti,regulator-ext-sleep-control = <1>; | ||
131 | }; | ||
132 | }; | ||
133 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/twl6040.txt b/Documentation/devicetree/bindings/mfd/twl6040.txt new file mode 100644 index 000000000000..bc67c6f424aa --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/twl6040.txt | |||
@@ -0,0 +1,62 @@ | |||
1 | Texas Instruments TWL6040 family | ||
2 | |||
3 | The TWL6040s are 8-channel high quality low-power audio codecs providing audio | ||
4 | and vibra functionality on OMAP4+ platforms. | ||
5 | They are connected ot the host processor via i2c for commands, McPDM for audio | ||
6 | data and commands. | ||
7 | |||
8 | Required properties: | ||
9 | - compatible : Must be "ti,twl6040"; | ||
10 | - reg: must be 0x4b for i2c address | ||
11 | - interrupts: twl6040 has one interrupt line connecteded to the main SoC | ||
12 | - interrupt-parent: The parent interrupt controller | ||
13 | - twl6040,audpwron-gpio: Power on GPIO line for the twl6040 | ||
14 | |||
15 | - vio-supply: Regulator for the twl6040 VIO supply | ||
16 | - v2v1-supply: Regulator for the twl6040 V2V1 supply | ||
17 | |||
18 | Optional properties, nodes: | ||
19 | - enable-active-high: To power on the twl6040 during boot. | ||
20 | |||
21 | Vibra functionality | ||
22 | Required properties: | ||
23 | - vddvibl-supply: Regulator for the left vibra motor | ||
24 | - vddvibr-supply: Regulator for the right vibra motor | ||
25 | - vibra { }: Configuration section for vibra parameters containing the following | ||
26 | properties: | ||
27 | - ti,vibldrv-res: Resistance parameter for left driver | ||
28 | - ti,vibrdrv-res: Resistance parameter for right driver | ||
29 | - ti,viblmotor-res: Resistance parameter for left motor | ||
30 | - ti,viblmotor-res: Resistance parameter for right motor | ||
31 | |||
32 | Optional properties within vibra { } section: | ||
33 | - vddvibl_uV: If the vddvibl default voltage need to be changed | ||
34 | - vddvibr_uV: If the vddvibr default voltage need to be changed | ||
35 | |||
36 | Example: | ||
37 | &i2c1 { | ||
38 | twl6040: twl@4b { | ||
39 | compatible = "ti,twl6040"; | ||
40 | reg = <0x4b>; | ||
41 | |||
42 | interrupts = <0 119 4>; | ||
43 | interrupt-parent = <&gic>; | ||
44 | twl6040,audpwron-gpio = <&gpio4 31 0>; | ||
45 | |||
46 | vio-supply = <&v1v8>; | ||
47 | v2v1-supply = <&v2v1>; | ||
48 | enable-active-high; | ||
49 | |||
50 | /* regulators for vibra motor */ | ||
51 | vddvibl-supply = <&vbat>; | ||
52 | vddvibr-supply = <&vbat>; | ||
53 | |||
54 | vibra { | ||
55 | /* Vibra driver, motor resistance parameters */ | ||
56 | ti,vibldrv-res = <8>; | ||
57 | ti,vibrdrv-res = <3>; | ||
58 | ti,viblmotor-res = <10>; | ||
59 | ti,vibrmotor-res = <10>; | ||
60 | }; | ||
61 | }; | ||
62 | }; | ||
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 4fca82e5276e..d449e632e6a0 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -60,7 +60,6 @@ ata *); | |||
60 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); | 60 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); |
61 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 61 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
62 | int (*removexattr) (struct dentry *, const char *); | 62 | int (*removexattr) (struct dentry *, const char *); |
63 | void (*truncate_range)(struct inode *, loff_t, loff_t); | ||
64 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); | 63 | int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len); |
65 | 64 | ||
66 | locking rules: | 65 | locking rules: |
@@ -87,7 +86,6 @@ setxattr: yes | |||
87 | getxattr: no | 86 | getxattr: no |
88 | listxattr: no | 87 | listxattr: no |
89 | removexattr: yes | 88 | removexattr: yes |
90 | truncate_range: yes | ||
91 | fiemap: no | 89 | fiemap: no |
92 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on | 90 | Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on |
93 | victim. | 91 | victim. |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index ef088e55ab2e..912af6ce5626 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -743,6 +743,7 @@ Committed_AS: 100056 kB | |||
743 | VmallocTotal: 112216 kB | 743 | VmallocTotal: 112216 kB |
744 | VmallocUsed: 428 kB | 744 | VmallocUsed: 428 kB |
745 | VmallocChunk: 111088 kB | 745 | VmallocChunk: 111088 kB |
746 | AnonHugePages: 49152 kB | ||
746 | 747 | ||
747 | MemTotal: Total usable ram (i.e. physical ram minus a few reserved | 748 | MemTotal: Total usable ram (i.e. physical ram minus a few reserved |
748 | bits and the kernel binary code) | 749 | bits and the kernel binary code) |
@@ -776,6 +777,7 @@ VmallocChunk: 111088 kB | |||
776 | Dirty: Memory which is waiting to get written back to the disk | 777 | Dirty: Memory which is waiting to get written back to the disk |
777 | Writeback: Memory which is actively being written back to the disk | 778 | Writeback: Memory which is actively being written back to the disk |
778 | AnonPages: Non-file backed pages mapped into userspace page tables | 779 | AnonPages: Non-file backed pages mapped into userspace page tables |
780 | AnonHugePages: Non-file backed huge pages mapped into userspace page tables | ||
779 | Mapped: files which have been mmaped, such as libraries | 781 | Mapped: files which have been mmaped, such as libraries |
780 | Slab: in-kernel data structures cache | 782 | Slab: in-kernel data structures cache |
781 | SReclaimable: Part of Slab, that might be reclaimed, such as caches | 783 | SReclaimable: Part of Slab, that might be reclaimed, such as caches |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 0d0492028082..ef19f91a0f12 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -363,7 +363,6 @@ struct inode_operations { | |||
363 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); | 363 | ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); |
364 | ssize_t (*listxattr) (struct dentry *, char *, size_t); | 364 | ssize_t (*listxattr) (struct dentry *, char *, size_t); |
365 | int (*removexattr) (struct dentry *, const char *); | 365 | int (*removexattr) (struct dentry *, const char *); |
366 | void (*truncate_range)(struct inode *, loff_t, loff_t); | ||
367 | }; | 366 | }; |
368 | 367 | ||
369 | Again, all methods are called without any locks being held, unless | 368 | Again, all methods are called without any locks being held, unless |
@@ -472,9 +471,6 @@ otherwise noted. | |||
472 | removexattr: called by the VFS to remove an extended attribute from | 471 | removexattr: called by the VFS to remove an extended attribute from |
473 | a file. This method is called by removexattr(2) system call. | 472 | a file. This method is called by removexattr(2) system call. |
474 | 473 | ||
475 | truncate_range: a method provided by the underlying filesystem to truncate a | ||
476 | range of blocks , i.e. punch a hole somewhere in a file. | ||
477 | |||
478 | 474 | ||
479 | The Address Space Object | 475 | The Address Space Object |
480 | ======================== | 476 | ======================== |
@@ -760,7 +756,7 @@ struct file_operations | |||
760 | ---------------------- | 756 | ---------------------- |
761 | 757 | ||
762 | This describes how the VFS can manipulate an open file. As of kernel | 758 | This describes how the VFS can manipulate an open file. As of kernel |
763 | 2.6.22, the following members are defined: | 759 | 3.5, the following members are defined: |
764 | 760 | ||
765 | struct file_operations { | 761 | struct file_operations { |
766 | struct module *owner; | 762 | struct module *owner; |
@@ -790,6 +786,8 @@ struct file_operations { | |||
790 | int (*flock) (struct file *, int, struct file_lock *); | 786 | int (*flock) (struct file *, int, struct file_lock *); |
791 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); | 787 | ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, size_t, unsigned int); |
792 | ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); | 788 | ssize_t (*splice_read)(struct file *, struct pipe_inode_info *, size_t, unsigned int); |
789 | int (*setlease)(struct file *, long arg, struct file_lock **); | ||
790 | long (*fallocate)(struct file *, int mode, loff_t offset, loff_t len); | ||
793 | }; | 791 | }; |
794 | 792 | ||
795 | Again, all methods are called without any locks being held, unless | 793 | Again, all methods are called without any locks being held, unless |
@@ -858,6 +856,11 @@ otherwise noted. | |||
858 | splice_read: called by the VFS to splice data from file to a pipe. This | 856 | splice_read: called by the VFS to splice data from file to a pipe. This |
859 | method is used by the splice(2) system call | 857 | method is used by the splice(2) system call |
860 | 858 | ||
859 | setlease: called by the VFS to set or release a file lock lease. | ||
860 | setlease has the file_lock_lock held and must not sleep. | ||
861 | |||
862 | fallocate: called by the VFS to preallocate blocks or punch a hole. | ||
863 | |||
861 | Note that the file operations are implemented by the specific | 864 | Note that the file operations are implemented by the specific |
862 | filesystem in which the inode resides. When opening a device node | 865 | filesystem in which the inode resides. When opening a device node |
863 | (character or block special) most filesystems will call special | 866 | (character or block special) most filesystems will call special |
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt index 29bdf62aac09..f734bb2a78dc 100644 --- a/Documentation/vm/transhuge.txt +++ b/Documentation/vm/transhuge.txt | |||
@@ -166,6 +166,68 @@ behavior. So to make them effective you need to restart any | |||
166 | application that could have been using hugepages. This also applies to | 166 | application that could have been using hugepages. This also applies to |
167 | the regions registered in khugepaged. | 167 | the regions registered in khugepaged. |
168 | 168 | ||
169 | == Monitoring usage == | ||
170 | |||
171 | The number of transparent huge pages currently used by the system is | ||
172 | available by reading the AnonHugePages field in /proc/meminfo. To | ||
173 | identify what applications are using transparent huge pages, it is | ||
174 | necessary to read /proc/PID/smaps and count the AnonHugePages fields | ||
175 | for each mapping. Note that reading the smaps file is expensive and | ||
176 | reading it frequently will incur overhead. | ||
177 | |||
178 | There are a number of counters in /proc/vmstat that may be used to | ||
179 | monitor how successfully the system is providing huge pages for use. | ||
180 | |||
181 | thp_fault_alloc is incremented every time a huge page is successfully | ||
182 | allocated to handle a page fault. This applies to both the | ||
183 | first time a page is faulted and for COW faults. | ||
184 | |||
185 | thp_collapse_alloc is incremented by khugepaged when it has found | ||
186 | a range of pages to collapse into one huge page and has | ||
187 | successfully allocated a new huge page to store the data. | ||
188 | |||
189 | thp_fault_fallback is incremented if a page fault fails to allocate | ||
190 | a huge page and instead falls back to using small pages. | ||
191 | |||
192 | thp_collapse_alloc_failed is incremented if khugepaged found a range | ||
193 | of pages that should be collapsed into one huge page but failed | ||
194 | the allocation. | ||
195 | |||
196 | thp_split is incremented every time a huge page is split into base | ||
197 | pages. This can happen for a variety of reasons but a common | ||
198 | reason is that a huge page is old and is being reclaimed. | ||
199 | |||
200 | As the system ages, allocating huge pages may be expensive as the | ||
201 | system uses memory compaction to copy data around memory to free a | ||
202 | huge page for use. There are some counters in /proc/vmstat to help | ||
203 | monitor this overhead. | ||
204 | |||
205 | compact_stall is incremented every time a process stalls to run | ||
206 | memory compaction so that a huge page is free for use. | ||
207 | |||
208 | compact_success is incremented if the system compacted memory and | ||
209 | freed a huge page for use. | ||
210 | |||
211 | compact_fail is incremented if the system tries to compact memory | ||
212 | but failed. | ||
213 | |||
214 | compact_pages_moved is incremented each time a page is moved. If | ||
215 | this value is increasing rapidly, it implies that the system | ||
216 | is copying a lot of data to satisfy the huge page allocation. | ||
217 | It is possible that the cost of copying exceeds any savings | ||
218 | from reduced TLB misses. | ||
219 | |||
220 | compact_pagemigrate_failed is incremented when the underlying mechanism | ||
221 | for moving a page failed. | ||
222 | |||
223 | compact_blocks_moved is incremented each time memory compaction examines | ||
224 | a huge page aligned range of pages. | ||
225 | |||
226 | It is possible to establish how long the stalls were using the function | ||
227 | tracer to record how long was spent in __alloc_pages_nodemask and | ||
228 | using the mm_page_alloc tracepoint to identify which allocations were | ||
229 | for huge pages. | ||
230 | |||
169 | == get_user_pages and follow_page == | 231 | == get_user_pages and follow_page == |
170 | 232 | ||
171 | get_user_pages and follow_page if run on a hugepage, will return the | 233 | get_user_pages and follow_page if run on a hugepage, will return the |