aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/scsi.tmpl2
-rw-r--r--Documentation/hwmon/ads782836
-rw-r--r--Documentation/hwmon/it872
-rw-r--r--Documentation/hwmon/lm784
-rw-r--r--Documentation/hwmon/lm8711
-rw-r--r--Documentation/hwmon/userspace-tools2
-rw-r--r--Documentation/hwmon/w83627ehf5
-rw-r--r--Documentation/hwmon/w83627hf3
-rw-r--r--Documentation/hwmon/w83781d22
-rw-r--r--Documentation/hwmon/w83l786ng54
-rw-r--r--Documentation/i2c/busses/i2c-piix42
-rw-r--r--Documentation/input/input-programming.txt2
-rw-r--r--Documentation/scsi/ChangeLog.arcmsr41
-rw-r--r--Documentation/scsi/scsi_mid_low_api.txt2
-rw-r--r--Documentation/vm/slabinfo.c149
15 files changed, 297 insertions, 40 deletions
diff --git a/Documentation/DocBook/scsi.tmpl b/Documentation/DocBook/scsi.tmpl
index f299ab182bbe..10a150ae2a7e 100644
--- a/Documentation/DocBook/scsi.tmpl
+++ b/Documentation/DocBook/scsi.tmpl
@@ -12,7 +12,7 @@
12 <surname>Bottomley</surname> 12 <surname>Bottomley</surname>
13 <affiliation> 13 <affiliation>
14 <address> 14 <address>
15 <email>James.Bottomley@steeleye.com</email> 15 <email>James.Bottomley@hansenpartnership.com</email>
16 </address> 16 </address>
17 </affiliation> 17 </affiliation>
18 </author> 18 </author>
diff --git a/Documentation/hwmon/ads7828 b/Documentation/hwmon/ads7828
new file mode 100644
index 000000000000..75bc4beaf447
--- /dev/null
+++ b/Documentation/hwmon/ads7828
@@ -0,0 +1,36 @@
1Kernel driver ads7828
2=====================
3
4Supported chips:
5 * Texas Instruments/Burr-Brown ADS7828
6 Prefix: 'ads7828'
7 Addresses scanned: I2C 0x48, 0x49, 0x4a, 0x4b
8 Datasheet: Publicly available at the Texas Instruments website :
9 http://focus.ti.com/lit/ds/symlink/ads7828.pdf
10
11Authors:
12 Steve Hardy <steve@linuxrealtime.co.uk>
13
14Module Parameters
15-----------------
16
17* se_input: bool (default Y)
18 Single ended operation - set to N for differential mode
19* int_vref: bool (default Y)
20 Operate with the internal 2.5V reference - set to N for external reference
21* vref_mv: int (default 2500)
22 If using an external reference, set this to the reference voltage in mV
23
24Description
25-----------
26
27This driver implements support for the Texas Instruments ADS7828.
28
29This device is a 12-bit 8-channel A-D converter.
30
31It can operate in single ended mode (8 +ve inputs) or in differential mode,
32where 4 differential pairs can be measured.
33
34The chip also has the facility to use an external voltage reference. This
35may be required if your hardware supplies the ADS7828 from a 5V supply, see
36the datasheet for more details.
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87
index 5b704a40256b..f4ce1fdbeff6 100644
--- a/Documentation/hwmon/it87
+++ b/Documentation/hwmon/it87
@@ -30,7 +30,7 @@ Supported chips:
30 Datasheet: No longer be available 30 Datasheet: No longer be available
31 31
32Authors: 32Authors:
33 Christophe Gauthron <chrisg@0-in.com> 33 Christophe Gauthron
34 Jean Delvare <khali@linux-fr.org> 34 Jean Delvare <khali@linux-fr.org>
35 35
36 36
diff --git a/Documentation/hwmon/lm78 b/Documentation/hwmon/lm78
index dfc318a60fd4..60932e26abaa 100644
--- a/Documentation/hwmon/lm78
+++ b/Documentation/hwmon/lm78
@@ -4,12 +4,12 @@ Kernel driver lm78
4Supported chips: 4Supported chips:
5 * National Semiconductor LM78 / LM78-J 5 * National Semiconductor LM78 / LM78-J
6 Prefix: 'lm78' 6 Prefix: 'lm78'
7 Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports) 7 Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)
8 Datasheet: Publicly available at the National Semiconductor website 8 Datasheet: Publicly available at the National Semiconductor website
9 http://www.national.com/ 9 http://www.national.com/
10 * National Semiconductor LM79 10 * National Semiconductor LM79
11 Prefix: 'lm79' 11 Prefix: 'lm79'
12 Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports) 12 Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)
13 Datasheet: Publicly available at the National Semiconductor website 13 Datasheet: Publicly available at the National Semiconductor website
14 http://www.national.com/ 14 http://www.national.com/
15 15
diff --git a/Documentation/hwmon/lm87 b/Documentation/hwmon/lm87
index c952c57f0e11..ec27aa1b94cb 100644
--- a/Documentation/hwmon/lm87
+++ b/Documentation/hwmon/lm87
@@ -4,8 +4,12 @@ Kernel driver lm87
4Supported chips: 4Supported chips:
5 * National Semiconductor LM87 5 * National Semiconductor LM87
6 Prefix: 'lm87' 6 Prefix: 'lm87'
7 Addresses scanned: I2C 0x2c - 0x2f 7 Addresses scanned: I2C 0x2c - 0x2e
8 Datasheet: http://www.national.com/pf/LM/LM87.html 8 Datasheet: http://www.national.com/pf/LM/LM87.html
9 * Analog Devices ADM1024
10 Prefix: 'adm1024'
11 Addresses scanned: I2C 0x2c - 0x2e
12 Datasheet: http://www.analog.com/en/prod/0,2877,ADM1024,00.html
9 13
10Authors: 14Authors:
11 Frodo Looijaard <frodol@dds.nl>, 15 Frodo Looijaard <frodol@dds.nl>,
@@ -19,11 +23,12 @@ Authors:
19Description 23Description
20----------- 24-----------
21 25
22This driver implements support for the National Semiconductor LM87. 26This driver implements support for the National Semiconductor LM87
27and the Analog Devices ADM1024.
23 28
24The LM87 implements up to three temperature sensors, up to two fan 29The LM87 implements up to three temperature sensors, up to two fan
25rotation speed sensors, up to seven voltage sensors, alarms, and some 30rotation speed sensors, up to seven voltage sensors, alarms, and some
26miscellaneous stuff. 31miscellaneous stuff. The ADM1024 is fully compatible.
27 32
28Temperatures are measured in degrees Celsius. Each input has a high 33Temperatures are measured in degrees Celsius. Each input has a high
29and low alarm settings. A high limit produces an alarm when the value 34and low alarm settings. A high limit produces an alarm when the value
diff --git a/Documentation/hwmon/userspace-tools b/Documentation/hwmon/userspace-tools
index 19900a8fe679..9865aeedc58f 100644
--- a/Documentation/hwmon/userspace-tools
+++ b/Documentation/hwmon/userspace-tools
@@ -14,7 +14,7 @@ Lm-sensors
14 14
15Core set of utilities that will allow you to obtain health information, 15Core set of utilities that will allow you to obtain health information,
16setup monitoring limits etc. You can get them on their homepage 16setup monitoring limits etc. You can get them on their homepage
17http://www.lm-sensors.nu/ or as a package from your Linux distribution. 17http://www.lm-sensors.org/ or as a package from your Linux distribution.
18 18
19If from website: 19If from website:
20Get lm-sensors from project web site. Please note, you need only userspace 20Get lm-sensors from project web site. Please note, you need only userspace
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf
index ccc2bcb61068..d6e1ae30fa6e 100644
--- a/Documentation/hwmon/w83627ehf
+++ b/Documentation/hwmon/w83627ehf
@@ -23,8 +23,9 @@ W83627DHG super I/O chips. We will refer to them collectively as Winbond chips.
23 23
24The chips implement three temperature sensors, five fan rotation 24The chips implement three temperature sensors, five fan rotation
25speed sensors, ten analog voltage sensors (only nine for the 627DHG), one 25speed sensors, ten analog voltage sensors (only nine for the 627DHG), one
26VID (6 pins), alarms with beep warnings (control unimplemented), and 26VID (6 pins for the 627EHF/EHG, 8 pins for the 627DHG), alarms with beep
27some automatic fan regulation strategies (plus manual fan control mode). 27warnings (control unimplemented), and some automatic fan regulation
28strategies (plus manual fan control mode).
28 29
29Temperatures are measured in degrees Celsius and measurement resolution is 1 30Temperatures are measured in degrees Celsius and measurement resolution is 1
30degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when 31degC for temp1 and 0.5 degC for temp2 and temp3. An alarm is triggered when
diff --git a/Documentation/hwmon/w83627hf b/Documentation/hwmon/w83627hf
index 792231921241..880a59f53da9 100644
--- a/Documentation/hwmon/w83627hf
+++ b/Documentation/hwmon/w83627hf
@@ -73,5 +73,4 @@ doesn't help, you may just ignore the bogus VID reading with no harm done.
73 73
74For further information on this driver see the w83781d driver documentation. 74For further information on this driver see the w83781d driver documentation.
75 75
76[1] http://www2.lm-sensors.nu/~lm78/cvs/browse.cgi/lm_sensors2/doc/vid 76[1] http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/vid
77
diff --git a/Documentation/hwmon/w83781d b/Documentation/hwmon/w83781d
index b1e9f80098ee..6f800a0283e9 100644
--- a/Documentation/hwmon/w83781d
+++ b/Documentation/hwmon/w83781d
@@ -4,20 +4,16 @@ Kernel driver w83781d
4Supported chips: 4Supported chips:
5 * Winbond W83781D 5 * Winbond W83781D
6 Prefix: 'w83781d' 6 Prefix: 'w83781d'
7 Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports) 7 Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)
8 Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83781d.pdf 8 Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83781d.pdf
9 * Winbond W83782D 9 * Winbond W83782D
10 Prefix: 'w83782d' 10 Prefix: 'w83782d'
11 Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports) 11 Addresses scanned: I2C 0x28 - 0x2f, ISA 0x290 (8 I/O ports)
12 Datasheet: http://www.winbond.com/PDF/sheet/w83782d.pdf 12 Datasheet: http://www.winbond.com/PDF/sheet/w83782d.pdf
13 * Winbond W83783S 13 * Winbond W83783S
14 Prefix: 'w83783s' 14 Prefix: 'w83783s'
15 Addresses scanned: I2C 0x2d 15 Addresses scanned: I2C 0x2d
16 Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83783s.pdf 16 Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/w83783s.pdf
17 * Winbond W83627HF
18 Prefix: 'w83627hf'
19 Addresses scanned: I2C 0x20 - 0x2f, ISA 0x290 (8 I/O ports)
20 Datasheet: http://www.winbond.com/PDF/sheet/w83627hf.pdf
21 * Asus AS99127F 17 * Asus AS99127F
22 Prefix: 'as99127f' 18 Prefix: 'as99127f'
23 Addresses scanned: I2C 0x28 - 0x2f 19 Addresses scanned: I2C 0x28 - 0x2f
@@ -50,20 +46,18 @@ force_subclients=bus,caddr,saddr,saddr
50Description 46Description
51----------- 47-----------
52 48
53This driver implements support for the Winbond W83781D, W83782D, W83783S, 49This driver implements support for the Winbond W83781D, W83782D, W83783S
54W83627HF chips, and the Asus AS99127F chips. We will refer to them 50chips, and the Asus AS99127F chips. We will refer to them collectively as
55collectively as W8378* chips. 51W8378* chips.
56 52
57There is quite some difference between these chips, but they are similar 53There is quite some difference between these chips, but they are similar
58enough that it was sensible to put them together in one driver. 54enough that it was sensible to put them together in one driver.
59The W83627HF chip is assumed to be identical to the ISA W83782D.
60The Asus chips are similar to an I2C-only W83782D. 55The Asus chips are similar to an I2C-only W83782D.
61 56
62Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA 57Chip #vin #fanin #pwm #temp wchipid vendid i2c ISA
63as99127f 7 3 0 3 0x31 0x12c3 yes no 58as99127f 7 3 0 3 0x31 0x12c3 yes no
64as99127f rev.2 (type_name = as99127f) 0x31 0x5ca3 yes no 59as99127f rev.2 (type_name = as99127f) 0x31 0x5ca3 yes no
65w83781d 7 3 0 3 0x10-1 0x5ca3 yes yes 60w83781d 7 3 0 3 0x10-1 0x5ca3 yes yes
66w83627hf 9 3 2 3 0x21 0x5ca3 yes yes(LPC)
67w83782d 9 3 2-4 3 0x30 0x5ca3 yes yes 61w83782d 9 3 2-4 3 0x30 0x5ca3 yes yes
68w83783s 5-6 3 2 1-2 0x40 0x5ca3 yes no 62w83783s 5-6 3 2 1-2 0x40 0x5ca3 yes no
69 63
@@ -143,9 +137,9 @@ Individual alarm and beep bits:
1430x000400: in6 1370x000400: in6
1440x000800: fan3 1380x000800: fan3
1450x001000: chassis 1390x001000: chassis
1460x002000: temp3 (W83782D and W83627HF only) 1400x002000: temp3 (W83782D only)
1470x010000: in7 (W83782D and W83627HF only) 1410x010000: in7 (W83782D only)
1480x020000: in8 (W83782D and W83627HF only) 1420x020000: in8 (W83782D only)
149 143
150If an alarm triggers, it will remain triggered until the hardware register 144If an alarm triggers, it will remain triggered until the hardware register
151is read at least once. This means that the cause for the alarm may 145is read at least once. This means that the cause for the alarm may
diff --git a/Documentation/hwmon/w83l786ng b/Documentation/hwmon/w83l786ng
new file mode 100644
index 000000000000..d8f55d7fff10
--- /dev/null
+++ b/Documentation/hwmon/w83l786ng
@@ -0,0 +1,54 @@
1Kernel driver w83l786ng
2=====================
3
4Supported chips:
5 * Winbond W83L786NG/W83L786NR
6 Prefix: 'w83l786ng'
7 Addresses scanned: I2C 0x2e - 0x2f
8 Datasheet: http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83L786NRNG09.pdf
9
10Author: Kevin Lo <kevlo@kevlo.org>
11
12
13Module Parameters
14-----------------
15
16* reset boolean
17 (default 0)
18 Use 'reset=1' to reset the chip (via index 0x40, bit 7). The default
19 behavior is no chip reset to preserve BIOS settings
20
21
22Description
23-----------
24
25This driver implements support for Winbond W83L786NG/W83L786NR chips.
26
27The driver implements two temperature sensors, two fan rotation speed
28sensors, and three voltage sensors.
29
30Temperatures are measured in degrees Celsius and measurement resolution is 1
31degC for temp1 and temp2.
32
33Fan rotation speeds are reported in RPM (rotations per minute). Fan readings
34readings can be divided by a programmable divider (1, 2, 4, 8, 16, 32, 64
35or 128 for fan 1/2) to give the readings more range or accuracy.
36
37Voltage sensors (also known as IN sensors) report their values in millivolts.
38An alarm is triggered if the voltage has crossed a programmable minimum
39or maximum limit.
40
41/sys files
42----------
43
44pwm[1-2] - this file stores PWM duty cycle or DC value (fan speed) in range:
45 0 (stop) to 255 (full)
46pwm[1-2]_enable - this file controls mode of fan/temperature control:
47 * 0 Manual Mode
48 * 1 Thermal Cruise
49 * 2 Smart Fan II
50 * 4 FAN_SET
51pwm[1-2]_mode - Select PWM of DC mode
52 * 0 DC
53 * 1 PWM
54tolerance[1-2] - Value in degrees of Celsius (degC) for +- T
diff --git a/Documentation/i2c/busses/i2c-piix4 b/Documentation/i2c/busses/i2c-piix4
index cf6b6cb02aa1..ef1efa79b1df 100644
--- a/Documentation/i2c/busses/i2c-piix4
+++ b/Documentation/i2c/busses/i2c-piix4
@@ -95,4 +95,4 @@ of all affected systems, so the only safe solution was to prevent access to
95the SMBus on all IBM systems (detected using DMI data.) 95the SMBus on all IBM systems (detected using DMI data.)
96 96
97For additional information, read: 97For additional information, read:
98http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/README.thinkpad 98http://www.lm-sensors.org/browser/lm-sensors/trunk/README.thinkpad
diff --git a/Documentation/input/input-programming.txt b/Documentation/input/input-programming.txt
index 47fc86830cd7..81905e81585e 100644
--- a/Documentation/input/input-programming.txt
+++ b/Documentation/input/input-programming.txt
@@ -22,7 +22,7 @@ static struct input_dev *button_dev;
22 22
23static void button_interrupt(int irq, void *dummy, struct pt_regs *fp) 23static void button_interrupt(int irq, void *dummy, struct pt_regs *fp)
24{ 24{
25 input_report_key(button_dev, BTN_1, inb(BUTTON_PORT) & 1); 25 input_report_key(button_dev, BTN_0, inb(BUTTON_PORT) & 1);
26 input_sync(button_dev); 26 input_sync(button_dev);
27} 27}
28 28
diff --git a/Documentation/scsi/ChangeLog.arcmsr b/Documentation/scsi/ChangeLog.arcmsr
index cd8403a33ee6..de2bcacfa870 100644
--- a/Documentation/scsi/ChangeLog.arcmsr
+++ b/Documentation/scsi/ChangeLog.arcmsr
@@ -68,4 +68,45 @@
68** 2. modify the arcmsr_pci_slot_reset function 68** 2. modify the arcmsr_pci_slot_reset function
69** 3. modify the arcmsr_pci_ers_disconnect_forepart function 69** 3. modify the arcmsr_pci_ers_disconnect_forepart function
70** 4. modify the arcmsr_pci_ers_need_reset_forepart function 70** 4. modify the arcmsr_pci_ers_need_reset_forepart function
71** 1.20.00.15 09/27/2007 Erich Chen & Nick Cheng
72** 1. add arcmsr_enable_eoi_mode() on adapter Type B
73** 2. add readl(reg->iop2drv_doorbell_reg) in arcmsr_handle_hbb_isr()
74** in case of the doorbell interrupt clearance is cached
75** 1.20.00.15 10/01/2007 Erich Chen & Nick Cheng
76** 1. modify acb->devstate[i][j]
77** as ARECA_RAID_GOOD instead of
78** ARECA_RAID_GONE in arcmsr_alloc_ccb_pool
79** 1.20.00.15 11/06/2007 Erich Chen & Nick Cheng
80** 1. add conditional declaration for
81** arcmsr_pci_error_detected() and
82** arcmsr_pci_slot_reset
83** 1.20.00.15 11/23/2007 Erich Chen & Nick Cheng
84** 1.check if the sg list member number
85** exceeds arcmsr default limit in arcmsr_build_ccb()
86** 2.change the returned value type of arcmsr_build_ccb()
87** from "void" to "int"
88** 3.add the conditional check if arcmsr_build_ccb()
89** returns FAILED
90** 1.20.00.15 12/04/2007 Erich Chen & Nick Cheng
91** 1. modify arcmsr_drain_donequeue() to ignore unknown
92** command and let kernel process command timeout.
93** This could handle IO request violating max. segments
94** while Linux XFS over DM-CRYPT.
95** Thanks to Milan Broz's comments <mbroz@redhat.com>
96** 1.20.00.15 12/24/2007 Erich Chen & Nick Cheng
97** 1.fix the portability problems
98** 2.fix type B where we should _not_ iounmap() acb->pmu;
99** it's not ioremapped.
100** 3.add return -ENOMEM if ioremap() fails
101** 4.transfer IS_SG64_ADDR w/ cpu_to_le32()
102** in arcmsr_build_ccb
103** 5. modify acb->devstate[i][j] as ARECA_RAID_GONE instead of
104** ARECA_RAID_GOOD in arcmsr_alloc_ccb_pool()
105** 6.fix arcmsr_cdb->Context as (unsigned long)arcmsr_cdb
106** 7.add the checking state of
107** (outbound_intstatus & ARCMSR_MU_OUTBOUND_HANDLE_INT) == 0
108** in arcmsr_handle_hba_isr
109** 8.replace pci_alloc_consistent()/pci_free_consistent() with kmalloc()/kfree() in arcmsr_iop_message_xfer()
110** 9. fix the release of dma memory for type B in arcmsr_free_ccb_pool()
111** 10.fix the arcmsr_polling_hbb_ccbdone()
71************************************************************************** 112**************************************************************************
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt
index 6f70f2b9327e..a6d5354639b2 100644
--- a/Documentation/scsi/scsi_mid_low_api.txt
+++ b/Documentation/scsi/scsi_mid_low_api.txt
@@ -1407,7 +1407,7 @@ Credits
1407======= 1407=======
1408The following people have contributed to this document: 1408The following people have contributed to this document:
1409 Mike Anderson <andmike at us dot ibm dot com> 1409 Mike Anderson <andmike at us dot ibm dot com>
1410 James Bottomley <James dot Bottomley at steeleye dot com> 1410 James Bottomley <James dot Bottomley at hansenpartnership dot com>
1411 Patrick Mansfield <patmans at us dot ibm dot com> 1411 Patrick Mansfield <patmans at us dot ibm dot com>
1412 Christoph Hellwig <hch at infradead dot org> 1412 Christoph Hellwig <hch at infradead dot org>
1413 Doug Ledford <dledford at redhat dot com> 1413 Doug Ledford <dledford at redhat dot com>
diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c
index 488c1f31b992..7123fee708ca 100644
--- a/Documentation/vm/slabinfo.c
+++ b/Documentation/vm/slabinfo.c
@@ -32,6 +32,13 @@ struct slabinfo {
32 int sanity_checks, slab_size, store_user, trace; 32 int sanity_checks, slab_size, store_user, trace;
33 int order, poison, reclaim_account, red_zone; 33 int order, poison, reclaim_account, red_zone;
34 unsigned long partial, objects, slabs; 34 unsigned long partial, objects, slabs;
35 unsigned long alloc_fastpath, alloc_slowpath;
36 unsigned long free_fastpath, free_slowpath;
37 unsigned long free_frozen, free_add_partial, free_remove_partial;
38 unsigned long alloc_from_partial, alloc_slab, free_slab, alloc_refill;
39 unsigned long cpuslab_flush, deactivate_full, deactivate_empty;
40 unsigned long deactivate_to_head, deactivate_to_tail;
41 unsigned long deactivate_remote_frees;
35 int numa[MAX_NODES]; 42 int numa[MAX_NODES];
36 int numa_partial[MAX_NODES]; 43 int numa_partial[MAX_NODES];
37} slabinfo[MAX_SLABS]; 44} slabinfo[MAX_SLABS];
@@ -64,8 +71,10 @@ int show_inverted = 0;
64int show_single_ref = 0; 71int show_single_ref = 0;
65int show_totals = 0; 72int show_totals = 0;
66int sort_size = 0; 73int sort_size = 0;
74int sort_active = 0;
67int set_debug = 0; 75int set_debug = 0;
68int show_ops = 0; 76int show_ops = 0;
77int show_activity = 0;
69 78
70/* Debug options */ 79/* Debug options */
71int sanity = 0; 80int sanity = 0;
@@ -93,8 +102,10 @@ void usage(void)
93 printf("slabinfo 5/7/2007. (c) 2007 sgi. clameter@sgi.com\n\n" 102 printf("slabinfo 5/7/2007. (c) 2007 sgi. clameter@sgi.com\n\n"
94 "slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n" 103 "slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n"
95 "-a|--aliases Show aliases\n" 104 "-a|--aliases Show aliases\n"
105 "-A|--activity Most active slabs first\n"
96 "-d<options>|--debug=<options> Set/Clear Debug options\n" 106 "-d<options>|--debug=<options> Set/Clear Debug options\n"
97 "-e|--empty Show empty slabs\n" 107 "-D|--display-active Switch line format to activity\n"
108 "-e|--empty Show empty slabs\n"
98 "-f|--first-alias Show first alias\n" 109 "-f|--first-alias Show first alias\n"
99 "-h|--help Show usage information\n" 110 "-h|--help Show usage information\n"
100 "-i|--inverted Inverted list\n" 111 "-i|--inverted Inverted list\n"
@@ -281,8 +292,11 @@ int line = 0;
281 292
282void first_line(void) 293void first_line(void)
283{ 294{
284 printf("Name Objects Objsize Space " 295 if (show_activity)
285 "Slabs/Part/Cpu O/S O %%Fr %%Ef Flg\n"); 296 printf("Name Objects Alloc Free %%Fast\n");
297 else
298 printf("Name Objects Objsize Space "
299 "Slabs/Part/Cpu O/S O %%Fr %%Ef Flg\n");
286} 300}
287 301
288/* 302/*
@@ -309,6 +323,12 @@ unsigned long slab_size(struct slabinfo *s)
309 return s->slabs * (page_size << s->order); 323 return s->slabs * (page_size << s->order);
310} 324}
311 325
326unsigned long slab_activity(struct slabinfo *s)
327{
328 return s->alloc_fastpath + s->free_fastpath +
329 s->alloc_slowpath + s->free_slowpath;
330}
331
312void slab_numa(struct slabinfo *s, int mode) 332void slab_numa(struct slabinfo *s, int mode)
313{ 333{
314 int node; 334 int node;
@@ -392,6 +412,71 @@ const char *onoff(int x)
392 return "Off"; 412 return "Off";
393} 413}
394 414
415void slab_stats(struct slabinfo *s)
416{
417 unsigned long total_alloc;
418 unsigned long total_free;
419 unsigned long total;
420
421 if (!s->alloc_slab)
422 return;
423
424 total_alloc = s->alloc_fastpath + s->alloc_slowpath;
425 total_free = s->free_fastpath + s->free_slowpath;
426
427 if (!total_alloc)
428 return;
429
430 printf("\n");
431 printf("Slab Perf Counter Alloc Free %%Al %%Fr\n");
432 printf("--------------------------------------------------\n");
433 printf("Fastpath %8lu %8lu %3lu %3lu\n",
434 s->alloc_fastpath, s->free_fastpath,
435 s->alloc_fastpath * 100 / total_alloc,
436 s->free_fastpath * 100 / total_free);
437 printf("Slowpath %8lu %8lu %3lu %3lu\n",
438 total_alloc - s->alloc_fastpath, s->free_slowpath,
439 (total_alloc - s->alloc_fastpath) * 100 / total_alloc,
440 s->free_slowpath * 100 / total_free);
441 printf("Page Alloc %8lu %8lu %3lu %3lu\n",
442 s->alloc_slab, s->free_slab,
443 s->alloc_slab * 100 / total_alloc,
444 s->free_slab * 100 / total_free);
445 printf("Add partial %8lu %8lu %3lu %3lu\n",
446 s->deactivate_to_head + s->deactivate_to_tail,
447 s->free_add_partial,
448 (s->deactivate_to_head + s->deactivate_to_tail) * 100 / total_alloc,
449 s->free_add_partial * 100 / total_free);
450 printf("Remove partial %8lu %8lu %3lu %3lu\n",
451 s->alloc_from_partial, s->free_remove_partial,
452 s->alloc_from_partial * 100 / total_alloc,
453 s->free_remove_partial * 100 / total_free);
454
455 printf("RemoteObj/SlabFrozen %8lu %8lu %3lu %3lu\n",
456 s->deactivate_remote_frees, s->free_frozen,
457 s->deactivate_remote_frees * 100 / total_alloc,
458 s->free_frozen * 100 / total_free);
459
460 printf("Total %8lu %8lu\n\n", total_alloc, total_free);
461
462 if (s->cpuslab_flush)
463 printf("Flushes %8lu\n", s->cpuslab_flush);
464
465 if (s->alloc_refill)
466 printf("Refill %8lu\n", s->alloc_refill);
467
468 total = s->deactivate_full + s->deactivate_empty +
469 s->deactivate_to_head + s->deactivate_to_tail;
470
471 if (total)
472 printf("Deactivate Full=%lu(%lu%%) Empty=%lu(%lu%%) "
473 "ToHead=%lu(%lu%%) ToTail=%lu(%lu%%)\n",
474 s->deactivate_full, (s->deactivate_full * 100) / total,
475 s->deactivate_empty, (s->deactivate_empty * 100) / total,
476 s->deactivate_to_head, (s->deactivate_to_head * 100) / total,
477 s->deactivate_to_tail, (s->deactivate_to_tail * 100) / total);
478}
479
395void report(struct slabinfo *s) 480void report(struct slabinfo *s)
396{ 481{
397 if (strcmp(s->name, "*") == 0) 482 if (strcmp(s->name, "*") == 0)
@@ -430,6 +515,7 @@ void report(struct slabinfo *s)
430 ops(s); 515 ops(s);
431 show_tracking(s); 516 show_tracking(s);
432 slab_numa(s, 1); 517 slab_numa(s, 1);
518 slab_stats(s);
433} 519}
434 520
435void slabcache(struct slabinfo *s) 521void slabcache(struct slabinfo *s)
@@ -479,13 +565,27 @@ void slabcache(struct slabinfo *s)
479 *p++ = 'T'; 565 *p++ = 'T';
480 566
481 *p = 0; 567 *p = 0;
482 printf("%-21s %8ld %7d %8s %14s %4d %1d %3ld %3ld %s\n", 568 if (show_activity) {
483 s->name, s->objects, s->object_size, size_str, dist_str, 569 unsigned long total_alloc;
484 s->objs_per_slab, s->order, 570 unsigned long total_free;
485 s->slabs ? (s->partial * 100) / s->slabs : 100, 571
486 s->slabs ? (s->objects * s->object_size * 100) / 572 total_alloc = s->alloc_fastpath + s->alloc_slowpath;
487 (s->slabs * (page_size << s->order)) : 100, 573 total_free = s->free_fastpath + s->free_slowpath;
488 flags); 574
575 printf("%-21s %8ld %8ld %8ld %3ld %3ld \n",
576 s->name, s->objects,
577 total_alloc, total_free,
578 total_alloc ? (s->alloc_fastpath * 100 / total_alloc) : 0,
579 total_free ? (s->free_fastpath * 100 / total_free) : 0);
580 }
581 else
582 printf("%-21s %8ld %7d %8s %14s %4d %1d %3ld %3ld %s\n",
583 s->name, s->objects, s->object_size, size_str, dist_str,
584 s->objs_per_slab, s->order,
585 s->slabs ? (s->partial * 100) / s->slabs : 100,
586 s->slabs ? (s->objects * s->object_size * 100) /
587 (s->slabs * (page_size << s->order)) : 100,
588 flags);
489} 589}
490 590
491/* 591/*
@@ -892,6 +992,8 @@ void sort_slabs(void)
892 992
893 if (sort_size) 993 if (sort_size)
894 result = slab_size(s1) < slab_size(s2); 994 result = slab_size(s1) < slab_size(s2);
995 else if (sort_active)
996 result = slab_activity(s1) < slab_activity(s2);
895 else 997 else
896 result = strcasecmp(s1->name, s2->name); 998 result = strcasecmp(s1->name, s2->name);
897 999
@@ -1074,6 +1176,23 @@ void read_slab_dir(void)
1074 free(t); 1176 free(t);
1075 slab->store_user = get_obj("store_user"); 1177 slab->store_user = get_obj("store_user");
1076 slab->trace = get_obj("trace"); 1178 slab->trace = get_obj("trace");
1179 slab->alloc_fastpath = get_obj("alloc_fastpath");
1180 slab->alloc_slowpath = get_obj("alloc_slowpath");
1181 slab->free_fastpath = get_obj("free_fastpath");
1182 slab->free_slowpath = get_obj("free_slowpath");
1183 slab->free_frozen= get_obj("free_frozen");
1184 slab->free_add_partial = get_obj("free_add_partial");
1185 slab->free_remove_partial = get_obj("free_remove_partial");
1186 slab->alloc_from_partial = get_obj("alloc_from_partial");
1187 slab->alloc_slab = get_obj("alloc_slab");
1188 slab->alloc_refill = get_obj("alloc_refill");
1189 slab->free_slab = get_obj("free_slab");
1190 slab->cpuslab_flush = get_obj("cpuslab_flush");
1191 slab->deactivate_full = get_obj("deactivate_full");
1192 slab->deactivate_empty = get_obj("deactivate_empty");
1193 slab->deactivate_to_head = get_obj("deactivate_to_head");
1194 slab->deactivate_to_tail = get_obj("deactivate_to_tail");
1195 slab->deactivate_remote_frees = get_obj("deactivate_remote_frees");
1077 chdir(".."); 1196 chdir("..");
1078 if (slab->name[0] == ':') 1197 if (slab->name[0] == ':')
1079 alias_targets++; 1198 alias_targets++;
@@ -1124,7 +1243,9 @@ void output_slabs(void)
1124 1243
1125struct option opts[] = { 1244struct option opts[] = {
1126 { "aliases", 0, NULL, 'a' }, 1245 { "aliases", 0, NULL, 'a' },
1246 { "activity", 0, NULL, 'A' },
1127 { "debug", 2, NULL, 'd' }, 1247 { "debug", 2, NULL, 'd' },
1248 { "display-activity", 0, NULL, 'D' },
1128 { "empty", 0, NULL, 'e' }, 1249 { "empty", 0, NULL, 'e' },
1129 { "first-alias", 0, NULL, 'f' }, 1250 { "first-alias", 0, NULL, 'f' },
1130 { "help", 0, NULL, 'h' }, 1251 { "help", 0, NULL, 'h' },
@@ -1149,7 +1270,7 @@ int main(int argc, char *argv[])
1149 1270
1150 page_size = getpagesize(); 1271 page_size = getpagesize();
1151 1272
1152 while ((c = getopt_long(argc, argv, "ad::efhil1noprstvzTS", 1273 while ((c = getopt_long(argc, argv, "aAd::Defhil1noprstvzTS",
1153 opts, NULL)) != -1) 1274 opts, NULL)) != -1)
1154 switch (c) { 1275 switch (c) {
1155 case '1': 1276 case '1':
@@ -1158,11 +1279,17 @@ int main(int argc, char *argv[])
1158 case 'a': 1279 case 'a':
1159 show_alias = 1; 1280 show_alias = 1;
1160 break; 1281 break;
1282 case 'A':
1283 sort_active = 1;
1284 break;
1161 case 'd': 1285 case 'd':
1162 set_debug = 1; 1286 set_debug = 1;
1163 if (!debug_opt_scan(optarg)) 1287 if (!debug_opt_scan(optarg))
1164 fatal("Invalid debug option '%s'\n", optarg); 1288 fatal("Invalid debug option '%s'\n", optarg);
1165 break; 1289 break;
1290 case 'D':
1291 show_activity = 1;
1292 break;
1166 case 'e': 1293 case 'e':
1167 show_empty = 1; 1294 show_empty = 1;
1168 break; 1295 break;