Commit 2543a87108d2af7d48a43b3d6685c2b1ea279e36
Committed by
Tejun Heo
1 parent
257313b2a8
Exists in
master
and in
6 other branches
workqueue: remove cancel_rearming_delayed_work[queue]()
cancel_rearming_delayed_work() and cancel_rearming_delayed_workqueue() can be removed now. Signed-off-by: WANG Cong <amwang@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Showing 2 changed files with 0 additions and 25 deletions Inline Diff
Documentation/feature-removal-schedule.txt
1 | The following is a list of files and features that are going to be | 1 | The following is a list of files and features that are going to be |
2 | removed in the kernel source tree. Every entry should contain what | 2 | removed in the kernel source tree. Every entry should contain what |
3 | exactly is going away, why it is happening, and who is going to be doing | 3 | exactly is going away, why it is happening, and who is going to be doing |
4 | the work. When the feature is removed from the kernel, it should also | 4 | the work. When the feature is removed from the kernel, it should also |
5 | be removed from this file. | 5 | be removed from this file. |
6 | 6 | ||
7 | --------------------------- | 7 | --------------------------- |
8 | 8 | ||
9 | What: PRISM54 | 9 | What: PRISM54 |
10 | When: 2.6.34 | 10 | When: 2.6.34 |
11 | 11 | ||
12 | Why: prism54 FullMAC PCI / Cardbus devices used to be supported only by the | 12 | Why: prism54 FullMAC PCI / Cardbus devices used to be supported only by the |
13 | prism54 wireless driver. After Intersil stopped selling these | 13 | prism54 wireless driver. After Intersil stopped selling these |
14 | devices in preference for the newer more flexible SoftMAC devices | 14 | devices in preference for the newer more flexible SoftMAC devices |
15 | a SoftMAC device driver was required and prism54 did not support | 15 | a SoftMAC device driver was required and prism54 did not support |
16 | them. The p54pci driver now exists and has been present in the kernel for | 16 | them. The p54pci driver now exists and has been present in the kernel for |
17 | a while. This driver supports both SoftMAC devices and FullMAC devices. | 17 | a while. This driver supports both SoftMAC devices and FullMAC devices. |
18 | The main difference between these devices was the amount of memory which | 18 | The main difference between these devices was the amount of memory which |
19 | could be used for the firmware. The SoftMAC devices support a smaller | 19 | could be used for the firmware. The SoftMAC devices support a smaller |
20 | amount of memory. Because of this the SoftMAC firmware fits into FullMAC | 20 | amount of memory. Because of this the SoftMAC firmware fits into FullMAC |
21 | devices's memory. p54pci supports not only PCI / Cardbus but also USB | 21 | devices's memory. p54pci supports not only PCI / Cardbus but also USB |
22 | and SPI. Since p54pci supports all devices prism54 supports | 22 | and SPI. Since p54pci supports all devices prism54 supports |
23 | you will have a conflict. I'm not quite sure how distributions are | 23 | you will have a conflict. I'm not quite sure how distributions are |
24 | handling this conflict right now. prism54 was kept around due to | 24 | handling this conflict right now. prism54 was kept around due to |
25 | claims users may experience issues when using the SoftMAC driver. | 25 | claims users may experience issues when using the SoftMAC driver. |
26 | Time has passed users have not reported issues. If you use prism54 | 26 | Time has passed users have not reported issues. If you use prism54 |
27 | and for whatever reason you cannot use p54pci please let us know! | 27 | and for whatever reason you cannot use p54pci please let us know! |
28 | E-mail us at: linux-wireless@vger.kernel.org | 28 | E-mail us at: linux-wireless@vger.kernel.org |
29 | 29 | ||
30 | For more information see the p54 wiki page: | 30 | For more information see the p54 wiki page: |
31 | 31 | ||
32 | http://wireless.kernel.org/en/users/Drivers/p54 | 32 | http://wireless.kernel.org/en/users/Drivers/p54 |
33 | 33 | ||
34 | Who: Luis R. Rodriguez <lrodriguez@atheros.com> | 34 | Who: Luis R. Rodriguez <lrodriguez@atheros.com> |
35 | 35 | ||
36 | --------------------------- | 36 | --------------------------- |
37 | 37 | ||
38 | What: AR9170USB | 38 | What: AR9170USB |
39 | When: 2.6.40 | 39 | When: 2.6.40 |
40 | 40 | ||
41 | Why: This driver is deprecated and the firmware is no longer | 41 | Why: This driver is deprecated and the firmware is no longer |
42 | maintained. The replacement driver "carl9170" has been | 42 | maintained. The replacement driver "carl9170" has been |
43 | around for a while, so the devices are still supported. | 43 | around for a while, so the devices are still supported. |
44 | 44 | ||
45 | Who: Christian Lamparter <chunkeey@googlemail.com> | 45 | Who: Christian Lamparter <chunkeey@googlemail.com> |
46 | 46 | ||
47 | --------------------------- | 47 | --------------------------- |
48 | 48 | ||
49 | What: IRQF_SAMPLE_RANDOM | 49 | What: IRQF_SAMPLE_RANDOM |
50 | Check: IRQF_SAMPLE_RANDOM | 50 | Check: IRQF_SAMPLE_RANDOM |
51 | When: July 2009 | 51 | When: July 2009 |
52 | 52 | ||
53 | Why: Many of IRQF_SAMPLE_RANDOM users are technically bogus as entropy | 53 | Why: Many of IRQF_SAMPLE_RANDOM users are technically bogus as entropy |
54 | sources in the kernel's current entropy model. To resolve this, every | 54 | sources in the kernel's current entropy model. To resolve this, every |
55 | input point to the kernel's entropy pool needs to better document the | 55 | input point to the kernel's entropy pool needs to better document the |
56 | type of entropy source it actually is. This will be replaced with | 56 | type of entropy source it actually is. This will be replaced with |
57 | additional add_*_randomness functions in drivers/char/random.c | 57 | additional add_*_randomness functions in drivers/char/random.c |
58 | 58 | ||
59 | Who: Robin Getz <rgetz@blackfin.uclinux.org> & Matt Mackall <mpm@selenic.com> | 59 | Who: Robin Getz <rgetz@blackfin.uclinux.org> & Matt Mackall <mpm@selenic.com> |
60 | 60 | ||
61 | --------------------------- | 61 | --------------------------- |
62 | 62 | ||
63 | What: Deprecated snapshot ioctls | 63 | What: Deprecated snapshot ioctls |
64 | When: 2.6.36 | 64 | When: 2.6.36 |
65 | 65 | ||
66 | Why: The ioctls in kernel/power/user.c were marked as deprecated long time | 66 | Why: The ioctls in kernel/power/user.c were marked as deprecated long time |
67 | ago. Now they notify users about that so that they need to replace | 67 | ago. Now they notify users about that so that they need to replace |
68 | their userspace. After some more time, remove them completely. | 68 | their userspace. After some more time, remove them completely. |
69 | 69 | ||
70 | Who: Jiri Slaby <jirislaby@gmail.com> | 70 | Who: Jiri Slaby <jirislaby@gmail.com> |
71 | 71 | ||
72 | --------------------------- | 72 | --------------------------- |
73 | 73 | ||
74 | What: The ieee80211_regdom module parameter | 74 | What: The ieee80211_regdom module parameter |
75 | When: March 2010 / desktop catchup | 75 | When: March 2010 / desktop catchup |
76 | 76 | ||
77 | Why: This was inherited by the CONFIG_WIRELESS_OLD_REGULATORY code, | 77 | Why: This was inherited by the CONFIG_WIRELESS_OLD_REGULATORY code, |
78 | and currently serves as an option for users to define an | 78 | and currently serves as an option for users to define an |
79 | ISO / IEC 3166 alpha2 code for the country they are currently | 79 | ISO / IEC 3166 alpha2 code for the country they are currently |
80 | present in. Although there are userspace API replacements for this | 80 | present in. Although there are userspace API replacements for this |
81 | through nl80211 distributions haven't yet caught up with implementing | 81 | through nl80211 distributions haven't yet caught up with implementing |
82 | decent alternatives through standard GUIs. Although available as an | 82 | decent alternatives through standard GUIs. Although available as an |
83 | option through iw or wpa_supplicant its just a matter of time before | 83 | option through iw or wpa_supplicant its just a matter of time before |
84 | distributions pick up good GUI options for this. The ideal solution | 84 | distributions pick up good GUI options for this. The ideal solution |
85 | would actually consist of intelligent designs which would do this for | 85 | would actually consist of intelligent designs which would do this for |
86 | the user automatically even when travelling through different countries. | 86 | the user automatically even when travelling through different countries. |
87 | Until then we leave this module parameter as a compromise. | 87 | Until then we leave this module parameter as a compromise. |
88 | 88 | ||
89 | When userspace improves with reasonable widely-available alternatives for | 89 | When userspace improves with reasonable widely-available alternatives for |
90 | this we will no longer need this module parameter. This entry hopes that | 90 | this we will no longer need this module parameter. This entry hopes that |
91 | by the super-futuristically looking date of "March 2010" we will have | 91 | by the super-futuristically looking date of "March 2010" we will have |
92 | such replacements widely available. | 92 | such replacements widely available. |
93 | 93 | ||
94 | Who: Luis R. Rodriguez <lrodriguez@atheros.com> | 94 | Who: Luis R. Rodriguez <lrodriguez@atheros.com> |
95 | 95 | ||
96 | --------------------------- | 96 | --------------------------- |
97 | 97 | ||
98 | What: dev->power.power_state | 98 | What: dev->power.power_state |
99 | When: July 2007 | 99 | When: July 2007 |
100 | Why: Broken design for runtime control over driver power states, confusing | 100 | Why: Broken design for runtime control over driver power states, confusing |
101 | driver-internal runtime power management with: mechanisms to support | 101 | driver-internal runtime power management with: mechanisms to support |
102 | system-wide sleep state transitions; event codes that distinguish | 102 | system-wide sleep state transitions; event codes that distinguish |
103 | different phases of swsusp "sleep" transitions; and userspace policy | 103 | different phases of swsusp "sleep" transitions; and userspace policy |
104 | inputs. This framework was never widely used, and most attempts to | 104 | inputs. This framework was never widely used, and most attempts to |
105 | use it were broken. Drivers should instead be exposing domain-specific | 105 | use it were broken. Drivers should instead be exposing domain-specific |
106 | interfaces either to kernel or to userspace. | 106 | interfaces either to kernel or to userspace. |
107 | Who: Pavel Machek <pavel@ucw.cz> | 107 | Who: Pavel Machek <pavel@ucw.cz> |
108 | 108 | ||
109 | --------------------------- | 109 | --------------------------- |
110 | 110 | ||
111 | What: sys_sysctl | 111 | What: sys_sysctl |
112 | When: September 2010 | 112 | When: September 2010 |
113 | Option: CONFIG_SYSCTL_SYSCALL | 113 | Option: CONFIG_SYSCTL_SYSCALL |
114 | Why: The same information is available in a more convenient from | 114 | Why: The same information is available in a more convenient from |
115 | /proc/sys, and none of the sysctl variables appear to be | 115 | /proc/sys, and none of the sysctl variables appear to be |
116 | important performance wise. | 116 | important performance wise. |
117 | 117 | ||
118 | Binary sysctls are a long standing source of subtle kernel | 118 | Binary sysctls are a long standing source of subtle kernel |
119 | bugs and security issues. | 119 | bugs and security issues. |
120 | 120 | ||
121 | When I looked several months ago all I could find after | 121 | When I looked several months ago all I could find after |
122 | searching several distributions were 5 user space programs and | 122 | searching several distributions were 5 user space programs and |
123 | glibc (which falls back to /proc/sys) using this syscall. | 123 | glibc (which falls back to /proc/sys) using this syscall. |
124 | 124 | ||
125 | The man page for sysctl(2) documents it as unusable for user | 125 | The man page for sysctl(2) documents it as unusable for user |
126 | space programs. | 126 | space programs. |
127 | 127 | ||
128 | sysctl(2) is not generally ABI compatible to a 32bit user | 128 | sysctl(2) is not generally ABI compatible to a 32bit user |
129 | space application on a 64bit and a 32bit kernel. | 129 | space application on a 64bit and a 32bit kernel. |
130 | 130 | ||
131 | For the last several months the policy has been no new binary | 131 | For the last several months the policy has been no new binary |
132 | sysctls and no one has put forward an argument to use them. | 132 | sysctls and no one has put forward an argument to use them. |
133 | 133 | ||
134 | Binary sysctls issues seem to keep happening appearing so | 134 | Binary sysctls issues seem to keep happening appearing so |
135 | properly deprecating them (with a warning to user space) and a | 135 | properly deprecating them (with a warning to user space) and a |
136 | 2 year grace warning period will mean eventually we can kill | 136 | 2 year grace warning period will mean eventually we can kill |
137 | them and end the pain. | 137 | them and end the pain. |
138 | 138 | ||
139 | In the mean time individual binary sysctls can be dealt with | 139 | In the mean time individual binary sysctls can be dealt with |
140 | in a piecewise fashion. | 140 | in a piecewise fashion. |
141 | 141 | ||
142 | Who: Eric Biederman <ebiederm@xmission.com> | 142 | Who: Eric Biederman <ebiederm@xmission.com> |
143 | 143 | ||
144 | --------------------------- | 144 | --------------------------- |
145 | 145 | ||
146 | What: /proc/<pid>/oom_adj | 146 | What: /proc/<pid>/oom_adj |
147 | When: August 2012 | 147 | When: August 2012 |
148 | Why: /proc/<pid>/oom_adj allows userspace to influence the oom killer's | 148 | Why: /proc/<pid>/oom_adj allows userspace to influence the oom killer's |
149 | badness heuristic used to determine which task to kill when the kernel | 149 | badness heuristic used to determine which task to kill when the kernel |
150 | is out of memory. | 150 | is out of memory. |
151 | 151 | ||
152 | The badness heuristic has since been rewritten since the introduction of | 152 | The badness heuristic has since been rewritten since the introduction of |
153 | this tunable such that its meaning is deprecated. The value was | 153 | this tunable such that its meaning is deprecated. The value was |
154 | implemented as a bitshift on a score generated by the badness() | 154 | implemented as a bitshift on a score generated by the badness() |
155 | function that did not have any precise units of measure. With the | 155 | function that did not have any precise units of measure. With the |
156 | rewrite, the score is given as a proportion of available memory to the | 156 | rewrite, the score is given as a proportion of available memory to the |
157 | task allocating pages, so using a bitshift which grows the score | 157 | task allocating pages, so using a bitshift which grows the score |
158 | exponentially is, thus, impossible to tune with fine granularity. | 158 | exponentially is, thus, impossible to tune with fine granularity. |
159 | 159 | ||
160 | A much more powerful interface, /proc/<pid>/oom_score_adj, was | 160 | A much more powerful interface, /proc/<pid>/oom_score_adj, was |
161 | introduced with the oom killer rewrite that allows users to increase or | 161 | introduced with the oom killer rewrite that allows users to increase or |
162 | decrease the badness() score linearly. This interface will replace | 162 | decrease the badness() score linearly. This interface will replace |
163 | /proc/<pid>/oom_adj. | 163 | /proc/<pid>/oom_adj. |
164 | 164 | ||
165 | A warning will be emitted to the kernel log if an application uses this | 165 | A warning will be emitted to the kernel log if an application uses this |
166 | deprecated interface. After it is printed once, future warnings will be | 166 | deprecated interface. After it is printed once, future warnings will be |
167 | suppressed until the kernel is rebooted. | 167 | suppressed until the kernel is rebooted. |
168 | 168 | ||
169 | --------------------------- | 169 | --------------------------- |
170 | 170 | ||
171 | What: CS5535/CS5536 obsolete GPIO driver | 171 | What: CS5535/CS5536 obsolete GPIO driver |
172 | When: June 2011 | 172 | When: June 2011 |
173 | Files: drivers/staging/cs5535_gpio/* | 173 | Files: drivers/staging/cs5535_gpio/* |
174 | Check: drivers/staging/cs5535_gpio/cs5535_gpio.c | 174 | Check: drivers/staging/cs5535_gpio/cs5535_gpio.c |
175 | Why: A newer driver replaces this; it is drivers/gpio/cs5535-gpio.c, and | 175 | Why: A newer driver replaces this; it is drivers/gpio/cs5535-gpio.c, and |
176 | integrates with the Linux GPIO subsystem. The old driver has been | 176 | integrates with the Linux GPIO subsystem. The old driver has been |
177 | moved to staging, and will be removed altogether around 2.6.40. | 177 | moved to staging, and will be removed altogether around 2.6.40. |
178 | Please test the new driver, and ensure that the functionality you | 178 | Please test the new driver, and ensure that the functionality you |
179 | need and any bugfixes from the old driver are available in the new | 179 | need and any bugfixes from the old driver are available in the new |
180 | one. | 180 | one. |
181 | Who: Andres Salomon <dilinger@queued.net> | 181 | Who: Andres Salomon <dilinger@queued.net> |
182 | 182 | ||
183 | -------------------------- | 183 | -------------------------- |
184 | 184 | ||
185 | What: remove EXPORT_SYMBOL(kernel_thread) | 185 | What: remove EXPORT_SYMBOL(kernel_thread) |
186 | When: August 2006 | 186 | When: August 2006 |
187 | Files: arch/*/kernel/*_ksyms.c | 187 | Files: arch/*/kernel/*_ksyms.c |
188 | Check: kernel_thread | 188 | Check: kernel_thread |
189 | Why: kernel_thread is a low-level implementation detail. Drivers should | 189 | Why: kernel_thread is a low-level implementation detail. Drivers should |
190 | use the <linux/kthread.h> API instead which shields them from | 190 | use the <linux/kthread.h> API instead which shields them from |
191 | implementation details and provides a higherlevel interface that | 191 | implementation details and provides a higherlevel interface that |
192 | prevents bugs and code duplication | 192 | prevents bugs and code duplication |
193 | Who: Christoph Hellwig <hch@lst.de> | 193 | Who: Christoph Hellwig <hch@lst.de> |
194 | 194 | ||
195 | --------------------------- | 195 | --------------------------- |
196 | 196 | ||
197 | What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports | 197 | What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports |
198 | (temporary transition config option provided until then) | 198 | (temporary transition config option provided until then) |
199 | The transition config option will also be removed at the same time. | 199 | The transition config option will also be removed at the same time. |
200 | When: before 2.6.19 | 200 | When: before 2.6.19 |
201 | Why: Unused symbols are both increasing the size of the kernel binary | 201 | Why: Unused symbols are both increasing the size of the kernel binary |
202 | and are often a sign of "wrong API" | 202 | and are often a sign of "wrong API" |
203 | Who: Arjan van de Ven <arjan@linux.intel.com> | 203 | Who: Arjan van de Ven <arjan@linux.intel.com> |
204 | 204 | ||
205 | --------------------------- | 205 | --------------------------- |
206 | 206 | ||
207 | What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment | 207 | What: PHYSDEVPATH, PHYSDEVBUS, PHYSDEVDRIVER in the uevent environment |
208 | When: October 2008 | 208 | When: October 2008 |
209 | Why: The stacking of class devices makes these values misleading and | 209 | Why: The stacking of class devices makes these values misleading and |
210 | inconsistent. | 210 | inconsistent. |
211 | Class devices should not carry any of these properties, and bus | 211 | Class devices should not carry any of these properties, and bus |
212 | devices have SUBSYTEM and DRIVER as a replacement. | 212 | devices have SUBSYTEM and DRIVER as a replacement. |
213 | Who: Kay Sievers <kay.sievers@suse.de> | 213 | Who: Kay Sievers <kay.sievers@suse.de> |
214 | 214 | ||
215 | --------------------------- | 215 | --------------------------- |
216 | 216 | ||
217 | What: ACPI procfs interface | 217 | What: ACPI procfs interface |
218 | When: July 2008 | 218 | When: July 2008 |
219 | Why: ACPI sysfs conversion should be finished by January 2008. | 219 | Why: ACPI sysfs conversion should be finished by January 2008. |
220 | ACPI procfs interface will be removed in July 2008 so that | 220 | ACPI procfs interface will be removed in July 2008 so that |
221 | there is enough time for the user space to catch up. | 221 | there is enough time for the user space to catch up. |
222 | Who: Zhang Rui <rui.zhang@intel.com> | 222 | Who: Zhang Rui <rui.zhang@intel.com> |
223 | 223 | ||
224 | --------------------------- | 224 | --------------------------- |
225 | 225 | ||
226 | What: CONFIG_ACPI_PROCFS_POWER | 226 | What: CONFIG_ACPI_PROCFS_POWER |
227 | When: 2.6.39 | 227 | When: 2.6.39 |
228 | Why: sysfs I/F for ACPI power devices, including AC and Battery, | 228 | Why: sysfs I/F for ACPI power devices, including AC and Battery, |
229 | has been working in upstream kenrel since 2.6.24, Sep 2007. | 229 | has been working in upstream kenrel since 2.6.24, Sep 2007. |
230 | In 2.6.37, we make the sysfs I/F always built in and this option | 230 | In 2.6.37, we make the sysfs I/F always built in and this option |
231 | disabled by default. | 231 | disabled by default. |
232 | Remove this option and the ACPI power procfs interface in 2.6.39. | 232 | Remove this option and the ACPI power procfs interface in 2.6.39. |
233 | Who: Zhang Rui <rui.zhang@intel.com> | 233 | Who: Zhang Rui <rui.zhang@intel.com> |
234 | 234 | ||
235 | --------------------------- | 235 | --------------------------- |
236 | 236 | ||
237 | What: /proc/acpi/event | 237 | What: /proc/acpi/event |
238 | When: February 2008 | 238 | When: February 2008 |
239 | Why: /proc/acpi/event has been replaced by events via the input layer | 239 | Why: /proc/acpi/event has been replaced by events via the input layer |
240 | and netlink since 2.6.23. | 240 | and netlink since 2.6.23. |
241 | Who: Len Brown <len.brown@intel.com> | 241 | Who: Len Brown <len.brown@intel.com> |
242 | 242 | ||
243 | --------------------------- | 243 | --------------------------- |
244 | 244 | ||
245 | What: i386/x86_64 bzImage symlinks | 245 | What: i386/x86_64 bzImage symlinks |
246 | When: April 2010 | 246 | When: April 2010 |
247 | 247 | ||
248 | Why: The i386/x86_64 merge provides a symlink to the old bzImage | 248 | Why: The i386/x86_64 merge provides a symlink to the old bzImage |
249 | location so not yet updated user space tools, e.g. package | 249 | location so not yet updated user space tools, e.g. package |
250 | scripts, do not break. | 250 | scripts, do not break. |
251 | Who: Thomas Gleixner <tglx@linutronix.de> | 251 | Who: Thomas Gleixner <tglx@linutronix.de> |
252 | 252 | ||
253 | --------------------------- | 253 | --------------------------- |
254 | 254 | ||
255 | What: GPIO autorequest on gpio_direction_{input,output}() in gpiolib | 255 | What: GPIO autorequest on gpio_direction_{input,output}() in gpiolib |
256 | When: February 2010 | 256 | When: February 2010 |
257 | Why: All callers should use explicit gpio_request()/gpio_free(). | 257 | Why: All callers should use explicit gpio_request()/gpio_free(). |
258 | The autorequest mechanism in gpiolib was provided mostly as a | 258 | The autorequest mechanism in gpiolib was provided mostly as a |
259 | migration aid for legacy GPIO interfaces (for SOC based GPIOs). | 259 | migration aid for legacy GPIO interfaces (for SOC based GPIOs). |
260 | Those users have now largely migrated. Platforms implementing | 260 | Those users have now largely migrated. Platforms implementing |
261 | the GPIO interfaces without using gpiolib will see no changes. | 261 | the GPIO interfaces without using gpiolib will see no changes. |
262 | Who: David Brownell <dbrownell@users.sourceforge.net> | 262 | Who: David Brownell <dbrownell@users.sourceforge.net> |
263 | --------------------------- | 263 | --------------------------- |
264 | 264 | ||
265 | What: b43 support for firmware revision < 410 | 265 | What: b43 support for firmware revision < 410 |
266 | When: The schedule was July 2008, but it was decided that we are going to keep the | 266 | When: The schedule was July 2008, but it was decided that we are going to keep the |
267 | code as long as there are no major maintanance headaches. | 267 | code as long as there are no major maintanance headaches. |
268 | So it _could_ be removed _any_ time now, if it conflicts with something new. | 268 | So it _could_ be removed _any_ time now, if it conflicts with something new. |
269 | Why: The support code for the old firmware hurts code readability/maintainability | 269 | Why: The support code for the old firmware hurts code readability/maintainability |
270 | and slightly hurts runtime performance. Bugfixes for the old firmware | 270 | and slightly hurts runtime performance. Bugfixes for the old firmware |
271 | are not provided by Broadcom anymore. | 271 | are not provided by Broadcom anymore. |
272 | Who: Michael Buesch <mb@bu3sch.de> | 272 | Who: Michael Buesch <mb@bu3sch.de> |
273 | 273 | ||
274 | --------------------------- | 274 | --------------------------- |
275 | 275 | ||
276 | What: /sys/o2cb symlink | 276 | What: /sys/o2cb symlink |
277 | When: January 2010 | 277 | When: January 2010 |
278 | Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb | 278 | Why: /sys/fs/o2cb is the proper location for this information - /sys/o2cb |
279 | exists as a symlink for backwards compatibility for old versions of | 279 | exists as a symlink for backwards compatibility for old versions of |
280 | ocfs2-tools. 2 years should be sufficient time to phase in new versions | 280 | ocfs2-tools. 2 years should be sufficient time to phase in new versions |
281 | which know to look in /sys/fs/o2cb. | 281 | which know to look in /sys/fs/o2cb. |
282 | Who: ocfs2-devel@oss.oracle.com | 282 | Who: ocfs2-devel@oss.oracle.com |
283 | 283 | ||
284 | --------------------------- | 284 | --------------------------- |
285 | 285 | ||
286 | What: Ability for non root users to shm_get hugetlb pages based on mlock | 286 | What: Ability for non root users to shm_get hugetlb pages based on mlock |
287 | resource limits | 287 | resource limits |
288 | When: 2.6.31 | 288 | When: 2.6.31 |
289 | Why: Non root users need to be part of /proc/sys/vm/hugetlb_shm_group or | 289 | Why: Non root users need to be part of /proc/sys/vm/hugetlb_shm_group or |
290 | have CAP_IPC_LOCK to be able to allocate shm segments backed by | 290 | have CAP_IPC_LOCK to be able to allocate shm segments backed by |
291 | huge pages. The mlock based rlimit check to allow shm hugetlb is | 291 | huge pages. The mlock based rlimit check to allow shm hugetlb is |
292 | inconsistent with mmap based allocations. Hence it is being | 292 | inconsistent with mmap based allocations. Hence it is being |
293 | deprecated. | 293 | deprecated. |
294 | Who: Ravikiran Thirumalai <kiran@scalex86.org> | 294 | Who: Ravikiran Thirumalai <kiran@scalex86.org> |
295 | 295 | ||
296 | --------------------------- | 296 | --------------------------- |
297 | 297 | ||
298 | What: CONFIG_THERMAL_HWMON | 298 | What: CONFIG_THERMAL_HWMON |
299 | When: January 2009 | 299 | When: January 2009 |
300 | Why: This option was introduced just to allow older lm-sensors userspace | 300 | Why: This option was introduced just to allow older lm-sensors userspace |
301 | to keep working over the upgrade to 2.6.26. At the scheduled time of | 301 | to keep working over the upgrade to 2.6.26. At the scheduled time of |
302 | removal fixed lm-sensors (2.x or 3.x) should be readily available. | 302 | removal fixed lm-sensors (2.x or 3.x) should be readily available. |
303 | Who: Rene Herman <rene.herman@gmail.com> | 303 | Who: Rene Herman <rene.herman@gmail.com> |
304 | 304 | ||
305 | --------------------------- | 305 | --------------------------- |
306 | 306 | ||
307 | What: Code that is now under CONFIG_WIRELESS_EXT_SYSFS | 307 | What: Code that is now under CONFIG_WIRELESS_EXT_SYSFS |
308 | (in net/core/net-sysfs.c) | 308 | (in net/core/net-sysfs.c) |
309 | When: After the only user (hal) has seen a release with the patches | 309 | When: After the only user (hal) has seen a release with the patches |
310 | for enough time, probably some time in 2010. | 310 | for enough time, probably some time in 2010. |
311 | Why: Over 1K .text/.data size reduction, data is available in other | 311 | Why: Over 1K .text/.data size reduction, data is available in other |
312 | ways (ioctls) | 312 | ways (ioctls) |
313 | Who: Johannes Berg <johannes@sipsolutions.net> | 313 | Who: Johannes Berg <johannes@sipsolutions.net> |
314 | 314 | ||
315 | --------------------------- | 315 | --------------------------- |
316 | 316 | ||
317 | What: sysfs ui for changing p4-clockmod parameters | 317 | What: sysfs ui for changing p4-clockmod parameters |
318 | When: September 2009 | 318 | When: September 2009 |
319 | Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and | 319 | Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and |
320 | e088e4c9cdb618675874becb91b2fd581ee707e6. | 320 | e088e4c9cdb618675874becb91b2fd581ee707e6. |
321 | Removal is subject to fixing any remaining bugs in ACPI which may | 321 | Removal is subject to fixing any remaining bugs in ACPI which may |
322 | cause the thermal throttling not to happen at the right time. | 322 | cause the thermal throttling not to happen at the right time. |
323 | Who: Dave Jones <davej@redhat.com>, Matthew Garrett <mjg@redhat.com> | 323 | Who: Dave Jones <davej@redhat.com>, Matthew Garrett <mjg@redhat.com> |
324 | 324 | ||
325 | ----------------------------- | 325 | ----------------------------- |
326 | 326 | ||
327 | What: fakephp and associated sysfs files in /sys/bus/pci/slots/ | 327 | What: fakephp and associated sysfs files in /sys/bus/pci/slots/ |
328 | When: 2011 | 328 | When: 2011 |
329 | Why: In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to | 329 | Why: In 2.6.27, the semantics of /sys/bus/pci/slots was redefined to |
330 | represent a machine's physical PCI slots. The change in semantics | 330 | represent a machine's physical PCI slots. The change in semantics |
331 | had userspace implications, as the hotplug core no longer allowed | 331 | had userspace implications, as the hotplug core no longer allowed |
332 | drivers to create multiple sysfs files per physical slot (required | 332 | drivers to create multiple sysfs files per physical slot (required |
333 | for multi-function devices, e.g.). fakephp was seen as a developer's | 333 | for multi-function devices, e.g.). fakephp was seen as a developer's |
334 | tool only, and its interface changed. Too late, we learned that | 334 | tool only, and its interface changed. Too late, we learned that |
335 | there were some users of the fakephp interface. | 335 | there were some users of the fakephp interface. |
336 | 336 | ||
337 | In 2.6.30, the original fakephp interface was restored. At the same | 337 | In 2.6.30, the original fakephp interface was restored. At the same |
338 | time, the PCI core gained the ability that fakephp provided, namely | 338 | time, the PCI core gained the ability that fakephp provided, namely |
339 | function-level hot-remove and hot-add. | 339 | function-level hot-remove and hot-add. |
340 | 340 | ||
341 | Since the PCI core now provides the same functionality, exposed in: | 341 | Since the PCI core now provides the same functionality, exposed in: |
342 | 342 | ||
343 | /sys/bus/pci/rescan | 343 | /sys/bus/pci/rescan |
344 | /sys/bus/pci/devices/.../remove | 344 | /sys/bus/pci/devices/.../remove |
345 | /sys/bus/pci/devices/.../rescan | 345 | /sys/bus/pci/devices/.../rescan |
346 | 346 | ||
347 | there is no functional reason to maintain fakephp as well. | 347 | there is no functional reason to maintain fakephp as well. |
348 | 348 | ||
349 | We will keep the existing module so that 'modprobe fakephp' will | 349 | We will keep the existing module so that 'modprobe fakephp' will |
350 | present the old /sys/bus/pci/slots/... interface for compatibility, | 350 | present the old /sys/bus/pci/slots/... interface for compatibility, |
351 | but users are urged to migrate their applications to the API above. | 351 | but users are urged to migrate their applications to the API above. |
352 | 352 | ||
353 | After a reasonable transition period, we will remove the legacy | 353 | After a reasonable transition period, we will remove the legacy |
354 | fakephp interface. | 354 | fakephp interface. |
355 | Who: Alex Chiang <achiang@hp.com> | 355 | Who: Alex Chiang <achiang@hp.com> |
356 | 356 | ||
357 | --------------------------- | 357 | --------------------------- |
358 | 358 | ||
359 | What: CONFIG_RFKILL_INPUT | 359 | What: CONFIG_RFKILL_INPUT |
360 | When: 2.6.33 | 360 | When: 2.6.33 |
361 | Why: Should be implemented in userspace, policy daemon. | 361 | Why: Should be implemented in userspace, policy daemon. |
362 | Who: Johannes Berg <johannes@sipsolutions.net> | 362 | Who: Johannes Berg <johannes@sipsolutions.net> |
363 | 363 | ||
364 | ---------------------------- | 364 | ---------------------------- |
365 | 365 | ||
366 | What: sound-slot/service-* module aliases and related clutters in | 366 | What: sound-slot/service-* module aliases and related clutters in |
367 | sound/sound_core.c | 367 | sound/sound_core.c |
368 | When: August 2010 | 368 | When: August 2010 |
369 | Why: OSS sound_core grabs all legacy minors (0-255) of SOUND_MAJOR | 369 | Why: OSS sound_core grabs all legacy minors (0-255) of SOUND_MAJOR |
370 | (14) and requests modules using custom sound-slot/service-* | 370 | (14) and requests modules using custom sound-slot/service-* |
371 | module aliases. The only benefit of doing this is allowing | 371 | module aliases. The only benefit of doing this is allowing |
372 | use of custom module aliases which might as well be considered | 372 | use of custom module aliases which might as well be considered |
373 | a bug at this point. This preemptive claiming prevents | 373 | a bug at this point. This preemptive claiming prevents |
374 | alternative OSS implementations. | 374 | alternative OSS implementations. |
375 | 375 | ||
376 | Till the feature is removed, the kernel will be requesting | 376 | Till the feature is removed, the kernel will be requesting |
377 | both sound-slot/service-* and the standard char-major-* module | 377 | both sound-slot/service-* and the standard char-major-* module |
378 | aliases and allow turning off the pre-claiming selectively via | 378 | aliases and allow turning off the pre-claiming selectively via |
379 | CONFIG_SOUND_OSS_CORE_PRECLAIM and soundcore.preclaim_oss | 379 | CONFIG_SOUND_OSS_CORE_PRECLAIM and soundcore.preclaim_oss |
380 | kernel parameter. | 380 | kernel parameter. |
381 | 381 | ||
382 | After the transition phase is complete, both the custom module | 382 | After the transition phase is complete, both the custom module |
383 | aliases and switches to disable it will go away. This removal | 383 | aliases and switches to disable it will go away. This removal |
384 | will also allow making ALSA OSS emulation independent of | 384 | will also allow making ALSA OSS emulation independent of |
385 | sound_core. The dependency will be broken then too. | 385 | sound_core. The dependency will be broken then too. |
386 | Who: Tejun Heo <tj@kernel.org> | 386 | Who: Tejun Heo <tj@kernel.org> |
387 | 387 | ||
388 | ---------------------------- | 388 | ---------------------------- |
389 | 389 | ||
390 | What: sysfs-class-rfkill state file | 390 | What: sysfs-class-rfkill state file |
391 | When: Feb 2014 | 391 | When: Feb 2014 |
392 | Files: net/rfkill/core.c | 392 | Files: net/rfkill/core.c |
393 | Why: Documented as obsolete since Feb 2010. This file is limited to 3 | 393 | Why: Documented as obsolete since Feb 2010. This file is limited to 3 |
394 | states while the rfkill drivers can have 4 states. | 394 | states while the rfkill drivers can have 4 states. |
395 | Who: anybody or Florian Mickler <florian@mickler.org> | 395 | Who: anybody or Florian Mickler <florian@mickler.org> |
396 | 396 | ||
397 | ---------------------------- | 397 | ---------------------------- |
398 | 398 | ||
399 | What: sysfs-class-rfkill claim file | 399 | What: sysfs-class-rfkill claim file |
400 | When: Feb 2012 | 400 | When: Feb 2012 |
401 | Files: net/rfkill/core.c | 401 | Files: net/rfkill/core.c |
402 | Why: It is not possible to claim an rfkill driver since 2007. This is | 402 | Why: It is not possible to claim an rfkill driver since 2007. This is |
403 | Documented as obsolete since Feb 2010. | 403 | Documented as obsolete since Feb 2010. |
404 | Who: anybody or Florian Mickler <florian@mickler.org> | 404 | Who: anybody or Florian Mickler <florian@mickler.org> |
405 | 405 | ||
406 | ---------------------------- | 406 | ---------------------------- |
407 | 407 | ||
408 | What: capifs | 408 | What: capifs |
409 | When: February 2011 | 409 | When: February 2011 |
410 | Files: drivers/isdn/capi/capifs.* | 410 | Files: drivers/isdn/capi/capifs.* |
411 | Why: udev fully replaces this special file system that only contains CAPI | 411 | Why: udev fully replaces this special file system that only contains CAPI |
412 | NCCI TTY device nodes. User space (pppdcapiplugin) works without | 412 | NCCI TTY device nodes. User space (pppdcapiplugin) works without |
413 | noticing the difference. | 413 | noticing the difference. |
414 | Who: Jan Kiszka <jan.kiszka@web.de> | 414 | Who: Jan Kiszka <jan.kiszka@web.de> |
415 | 415 | ||
416 | ---------------------------- | 416 | ---------------------------- |
417 | 417 | ||
418 | What: KVM paravirt mmu host support | 418 | What: KVM paravirt mmu host support |
419 | When: January 2011 | 419 | When: January 2011 |
420 | Why: The paravirt mmu host support is slower than non-paravirt mmu, both | 420 | Why: The paravirt mmu host support is slower than non-paravirt mmu, both |
421 | on newer and older hardware. It is already not exposed to the guest, | 421 | on newer and older hardware. It is already not exposed to the guest, |
422 | and kept only for live migration purposes. | 422 | and kept only for live migration purposes. |
423 | Who: Avi Kivity <avi@redhat.com> | 423 | Who: Avi Kivity <avi@redhat.com> |
424 | 424 | ||
425 | ---------------------------- | 425 | ---------------------------- |
426 | 426 | ||
427 | What: iwlwifi 50XX module parameters | 427 | What: iwlwifi 50XX module parameters |
428 | When: 2.6.40 | 428 | When: 2.6.40 |
429 | Why: The "..50" modules parameters were used to configure 5000 series and | 429 | Why: The "..50" modules parameters were used to configure 5000 series and |
430 | up devices; different set of module parameters also available for 4965 | 430 | up devices; different set of module parameters also available for 4965 |
431 | with same functionalities. Consolidate both set into single place | 431 | with same functionalities. Consolidate both set into single place |
432 | in drivers/net/wireless/iwlwifi/iwl-agn.c | 432 | in drivers/net/wireless/iwlwifi/iwl-agn.c |
433 | 433 | ||
434 | Who: Wey-Yi Guy <wey-yi.w.guy@intel.com> | 434 | Who: Wey-Yi Guy <wey-yi.w.guy@intel.com> |
435 | 435 | ||
436 | ---------------------------- | 436 | ---------------------------- |
437 | 437 | ||
438 | What: iwl4965 alias support | 438 | What: iwl4965 alias support |
439 | When: 2.6.40 | 439 | When: 2.6.40 |
440 | Why: Internal alias support has been present in module-init-tools for some | 440 | Why: Internal alias support has been present in module-init-tools for some |
441 | time, the MODULE_ALIAS("iwl4965") boilerplate aliases can be removed | 441 | time, the MODULE_ALIAS("iwl4965") boilerplate aliases can be removed |
442 | with no impact. | 442 | with no impact. |
443 | 443 | ||
444 | Who: Wey-Yi Guy <wey-yi.w.guy@intel.com> | 444 | Who: Wey-Yi Guy <wey-yi.w.guy@intel.com> |
445 | 445 | ||
446 | --------------------------- | 446 | --------------------------- |
447 | 447 | ||
448 | What: xt_NOTRACK | 448 | What: xt_NOTRACK |
449 | Files: net/netfilter/xt_NOTRACK.c | 449 | Files: net/netfilter/xt_NOTRACK.c |
450 | When: April 2011 | 450 | When: April 2011 |
451 | Why: Superseded by xt_CT | 451 | Why: Superseded by xt_CT |
452 | Who: Netfilter developer team <netfilter-devel@vger.kernel.org> | 452 | Who: Netfilter developer team <netfilter-devel@vger.kernel.org> |
453 | 453 | ||
454 | ---------------------------- | 454 | ---------------------------- |
455 | 455 | ||
456 | What: IRQF_DISABLED | 456 | What: IRQF_DISABLED |
457 | When: 2.6.36 | 457 | When: 2.6.36 |
458 | Why: The flag is a NOOP as we run interrupt handlers with interrupts disabled | 458 | Why: The flag is a NOOP as we run interrupt handlers with interrupts disabled |
459 | Who: Thomas Gleixner <tglx@linutronix.de> | 459 | Who: Thomas Gleixner <tglx@linutronix.de> |
460 | 460 | ||
461 | ---------------------------- | 461 | ---------------------------- |
462 | 462 | ||
463 | What: PCI DMA unmap state API | 463 | What: PCI DMA unmap state API |
464 | When: August 2012 | 464 | When: August 2012 |
465 | Why: PCI DMA unmap state API (include/linux/pci-dma.h) was replaced | 465 | Why: PCI DMA unmap state API (include/linux/pci-dma.h) was replaced |
466 | with DMA unmap state API (DMA unmap state API can be used for | 466 | with DMA unmap state API (DMA unmap state API can be used for |
467 | any bus). | 467 | any bus). |
468 | Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 468 | Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> |
469 | 469 | ||
470 | ---------------------------- | 470 | ---------------------------- |
471 | 471 | ||
472 | What: DMA_xxBIT_MASK macros | 472 | What: DMA_xxBIT_MASK macros |
473 | When: Jun 2011 | 473 | When: Jun 2011 |
474 | Why: DMA_xxBIT_MASK macros were replaced with DMA_BIT_MASK() macros. | 474 | Why: DMA_xxBIT_MASK macros were replaced with DMA_BIT_MASK() macros. |
475 | Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 475 | Who: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> |
476 | 476 | ||
477 | ---------------------------- | 477 | ---------------------------- |
478 | 478 | ||
479 | What: namespace cgroup (ns_cgroup) | 479 | What: namespace cgroup (ns_cgroup) |
480 | When: 2.6.38 | 480 | When: 2.6.38 |
481 | Why: The ns_cgroup leads to some problems: | 481 | Why: The ns_cgroup leads to some problems: |
482 | * cgroup creation is out-of-control | 482 | * cgroup creation is out-of-control |
483 | * cgroup name can conflict when pids are looping | 483 | * cgroup name can conflict when pids are looping |
484 | * it is not possible to have a single process handling | 484 | * it is not possible to have a single process handling |
485 | a lot of namespaces without falling in a exponential creation time | 485 | a lot of namespaces without falling in a exponential creation time |
486 | * we may want to create a namespace without creating a cgroup | 486 | * we may want to create a namespace without creating a cgroup |
487 | 487 | ||
488 | The ns_cgroup is replaced by a compatibility flag 'clone_children', | 488 | The ns_cgroup is replaced by a compatibility flag 'clone_children', |
489 | where a newly created cgroup will copy the parent cgroup values. | 489 | where a newly created cgroup will copy the parent cgroup values. |
490 | The userspace has to manually create a cgroup and add a task to | 490 | The userspace has to manually create a cgroup and add a task to |
491 | the 'tasks' file. | 491 | the 'tasks' file. |
492 | Who: Daniel Lezcano <daniel.lezcano@free.fr> | 492 | Who: Daniel Lezcano <daniel.lezcano@free.fr> |
493 | 493 | ||
494 | ---------------------------- | 494 | ---------------------------- |
495 | 495 | ||
496 | What: iwlwifi disable_hw_scan module parameters | 496 | What: iwlwifi disable_hw_scan module parameters |
497 | When: 2.6.40 | 497 | When: 2.6.40 |
498 | Why: Hareware scan is the prefer method for iwlwifi devices for | 498 | Why: Hareware scan is the prefer method for iwlwifi devices for |
499 | scanning operation. Remove software scan support for all the | 499 | scanning operation. Remove software scan support for all the |
500 | iwlwifi devices. | 500 | iwlwifi devices. |
501 | 501 | ||
502 | Who: Wey-Yi Guy <wey-yi.w.guy@intel.com> | 502 | Who: Wey-Yi Guy <wey-yi.w.guy@intel.com> |
503 | 503 | ||
504 | ---------------------------- | 504 | ---------------------------- |
505 | 505 | ||
506 | What: access to nfsd auth cache through sys_nfsservctl or '.' files | 506 | What: access to nfsd auth cache through sys_nfsservctl or '.' files |
507 | in the 'nfsd' filesystem. | 507 | in the 'nfsd' filesystem. |
508 | When: 2.6.40 | 508 | When: 2.6.40 |
509 | Why: This is a legacy interface which have been replaced by a more | 509 | Why: This is a legacy interface which have been replaced by a more |
510 | dynamic cache. Continuing to maintain this interface is an | 510 | dynamic cache. Continuing to maintain this interface is an |
511 | unnecessary burden. | 511 | unnecessary burden. |
512 | Who: NeilBrown <neilb@suse.de> | 512 | Who: NeilBrown <neilb@suse.de> |
513 | 513 | ||
514 | ---------------------------- | 514 | ---------------------------- |
515 | 515 | ||
516 | What: cancel_rearming_delayed_work[queue]() | ||
517 | When: 2.6.39 | ||
518 | |||
519 | Why: The functions have been superceded by cancel_delayed_work_sync() | ||
520 | quite some time ago. The conversion is trivial and there is no | ||
521 | in-kernel user left. | ||
522 | Who: Tejun Heo <tj@kernel.org> | ||
523 | |||
524 | ---------------------------- | ||
525 | |||
526 | What: Legacy, non-standard chassis intrusion detection interface. | 516 | What: Legacy, non-standard chassis intrusion detection interface. |
527 | When: June 2011 | 517 | When: June 2011 |
528 | Why: The adm9240, w83792d and w83793 hardware monitoring drivers have | 518 | Why: The adm9240, w83792d and w83793 hardware monitoring drivers have |
529 | legacy interfaces for chassis intrusion detection. A standard | 519 | legacy interfaces for chassis intrusion detection. A standard |
530 | interface has been added to each driver, so the legacy interface | 520 | interface has been added to each driver, so the legacy interface |
531 | can be removed. | 521 | can be removed. |
532 | Who: Jean Delvare <khali@linux-fr.org> | 522 | Who: Jean Delvare <khali@linux-fr.org> |
533 | 523 | ||
534 | ---------------------------- | 524 | ---------------------------- |
535 | 525 | ||
536 | What: xt_connlimit rev 0 | 526 | What: xt_connlimit rev 0 |
537 | When: 2012 | 527 | When: 2012 |
538 | Who: Jan Engelhardt <jengelh@medozas.de> | 528 | Who: Jan Engelhardt <jengelh@medozas.de> |
539 | Files: net/netfilter/xt_connlimit.c | 529 | Files: net/netfilter/xt_connlimit.c |
540 | 530 | ||
541 | ---------------------------- | 531 | ---------------------------- |
542 | 532 | ||
543 | What: noswapaccount kernel command line parameter | 533 | What: noswapaccount kernel command line parameter |
544 | When: 2.6.40 | 534 | When: 2.6.40 |
545 | Why: The original implementation of memsw feature enabled by | 535 | Why: The original implementation of memsw feature enabled by |
546 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP could be disabled by the noswapaccount | 536 | CONFIG_CGROUP_MEM_RES_CTLR_SWAP could be disabled by the noswapaccount |
547 | kernel parameter (introduced in 2.6.29-rc1). Later on, this decision | 537 | kernel parameter (introduced in 2.6.29-rc1). Later on, this decision |
548 | turned out to be not ideal because we cannot have the feature compiled | 538 | turned out to be not ideal because we cannot have the feature compiled |
549 | in and disabled by default and let only interested to enable it | 539 | in and disabled by default and let only interested to enable it |
550 | (e.g. general distribution kernels might need it). Therefore we have | 540 | (e.g. general distribution kernels might need it). Therefore we have |
551 | added swapaccount[=0|1] parameter (introduced in 2.6.37) which provides | 541 | added swapaccount[=0|1] parameter (introduced in 2.6.37) which provides |
552 | the both possibilities. If we remove noswapaccount we will have | 542 | the both possibilities. If we remove noswapaccount we will have |
553 | less command line parameters with the same functionality and we | 543 | less command line parameters with the same functionality and we |
554 | can also cleanup the parameter handling a bit (). | 544 | can also cleanup the parameter handling a bit (). |
555 | Who: Michal Hocko <mhocko@suse.cz> | 545 | Who: Michal Hocko <mhocko@suse.cz> |
556 | 546 | ||
557 | ---------------------------- | 547 | ---------------------------- |
558 | 548 | ||
559 | What: ipt_addrtype match include file | 549 | What: ipt_addrtype match include file |
560 | When: 2012 | 550 | When: 2012 |
561 | Why: superseded by xt_addrtype | 551 | Why: superseded by xt_addrtype |
562 | Who: Florian Westphal <fw@strlen.de> | 552 | Who: Florian Westphal <fw@strlen.de> |
563 | Files: include/linux/netfilter_ipv4/ipt_addrtype.h | 553 | Files: include/linux/netfilter_ipv4/ipt_addrtype.h |
564 | 554 | ||
565 | ---------------------------- | 555 | ---------------------------- |
566 | 556 | ||
567 | What: i2c_driver.attach_adapter | 557 | What: i2c_driver.attach_adapter |
568 | i2c_driver.detach_adapter | 558 | i2c_driver.detach_adapter |
569 | When: September 2011 | 559 | When: September 2011 |
570 | Why: These legacy callbacks should no longer be used as i2c-core offers | 560 | Why: These legacy callbacks should no longer be used as i2c-core offers |
571 | a variety of preferable alternative ways to instantiate I2C devices. | 561 | a variety of preferable alternative ways to instantiate I2C devices. |
572 | Who: Jean Delvare <khali@linux-fr.org> | 562 | Who: Jean Delvare <khali@linux-fr.org> |
573 | 563 | ||
574 | ---------------------------- | 564 | ---------------------------- |
575 | 565 |
include/linux/workqueue.h
1 | /* | 1 | /* |
2 | * workqueue.h --- work queue handling for Linux. | 2 | * workqueue.h --- work queue handling for Linux. |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #ifndef _LINUX_WORKQUEUE_H | 5 | #ifndef _LINUX_WORKQUEUE_H |
6 | #define _LINUX_WORKQUEUE_H | 6 | #define _LINUX_WORKQUEUE_H |
7 | 7 | ||
8 | #include <linux/timer.h> | 8 | #include <linux/timer.h> |
9 | #include <linux/linkage.h> | 9 | #include <linux/linkage.h> |
10 | #include <linux/bitops.h> | 10 | #include <linux/bitops.h> |
11 | #include <linux/lockdep.h> | 11 | #include <linux/lockdep.h> |
12 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
13 | #include <asm/atomic.h> | 13 | #include <asm/atomic.h> |
14 | 14 | ||
15 | struct workqueue_struct; | 15 | struct workqueue_struct; |
16 | 16 | ||
17 | struct work_struct; | 17 | struct work_struct; |
18 | typedef void (*work_func_t)(struct work_struct *work); | 18 | typedef void (*work_func_t)(struct work_struct *work); |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * The first word is the work queue pointer and the flags rolled into | 21 | * The first word is the work queue pointer and the flags rolled into |
22 | * one | 22 | * one |
23 | */ | 23 | */ |
24 | #define work_data_bits(work) ((unsigned long *)(&(work)->data)) | 24 | #define work_data_bits(work) ((unsigned long *)(&(work)->data)) |
25 | 25 | ||
26 | enum { | 26 | enum { |
27 | WORK_STRUCT_PENDING_BIT = 0, /* work item is pending execution */ | 27 | WORK_STRUCT_PENDING_BIT = 0, /* work item is pending execution */ |
28 | WORK_STRUCT_DELAYED_BIT = 1, /* work item is delayed */ | 28 | WORK_STRUCT_DELAYED_BIT = 1, /* work item is delayed */ |
29 | WORK_STRUCT_CWQ_BIT = 2, /* data points to cwq */ | 29 | WORK_STRUCT_CWQ_BIT = 2, /* data points to cwq */ |
30 | WORK_STRUCT_LINKED_BIT = 3, /* next work is linked to this one */ | 30 | WORK_STRUCT_LINKED_BIT = 3, /* next work is linked to this one */ |
31 | #ifdef CONFIG_DEBUG_OBJECTS_WORK | 31 | #ifdef CONFIG_DEBUG_OBJECTS_WORK |
32 | WORK_STRUCT_STATIC_BIT = 4, /* static initializer (debugobjects) */ | 32 | WORK_STRUCT_STATIC_BIT = 4, /* static initializer (debugobjects) */ |
33 | WORK_STRUCT_COLOR_SHIFT = 5, /* color for workqueue flushing */ | 33 | WORK_STRUCT_COLOR_SHIFT = 5, /* color for workqueue flushing */ |
34 | #else | 34 | #else |
35 | WORK_STRUCT_COLOR_SHIFT = 4, /* color for workqueue flushing */ | 35 | WORK_STRUCT_COLOR_SHIFT = 4, /* color for workqueue flushing */ |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | WORK_STRUCT_COLOR_BITS = 4, | 38 | WORK_STRUCT_COLOR_BITS = 4, |
39 | 39 | ||
40 | WORK_STRUCT_PENDING = 1 << WORK_STRUCT_PENDING_BIT, | 40 | WORK_STRUCT_PENDING = 1 << WORK_STRUCT_PENDING_BIT, |
41 | WORK_STRUCT_DELAYED = 1 << WORK_STRUCT_DELAYED_BIT, | 41 | WORK_STRUCT_DELAYED = 1 << WORK_STRUCT_DELAYED_BIT, |
42 | WORK_STRUCT_CWQ = 1 << WORK_STRUCT_CWQ_BIT, | 42 | WORK_STRUCT_CWQ = 1 << WORK_STRUCT_CWQ_BIT, |
43 | WORK_STRUCT_LINKED = 1 << WORK_STRUCT_LINKED_BIT, | 43 | WORK_STRUCT_LINKED = 1 << WORK_STRUCT_LINKED_BIT, |
44 | #ifdef CONFIG_DEBUG_OBJECTS_WORK | 44 | #ifdef CONFIG_DEBUG_OBJECTS_WORK |
45 | WORK_STRUCT_STATIC = 1 << WORK_STRUCT_STATIC_BIT, | 45 | WORK_STRUCT_STATIC = 1 << WORK_STRUCT_STATIC_BIT, |
46 | #else | 46 | #else |
47 | WORK_STRUCT_STATIC = 0, | 47 | WORK_STRUCT_STATIC = 0, |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * The last color is no color used for works which don't | 51 | * The last color is no color used for works which don't |
52 | * participate in workqueue flushing. | 52 | * participate in workqueue flushing. |
53 | */ | 53 | */ |
54 | WORK_NR_COLORS = (1 << WORK_STRUCT_COLOR_BITS) - 1, | 54 | WORK_NR_COLORS = (1 << WORK_STRUCT_COLOR_BITS) - 1, |
55 | WORK_NO_COLOR = WORK_NR_COLORS, | 55 | WORK_NO_COLOR = WORK_NR_COLORS, |
56 | 56 | ||
57 | /* special cpu IDs */ | 57 | /* special cpu IDs */ |
58 | WORK_CPU_UNBOUND = NR_CPUS, | 58 | WORK_CPU_UNBOUND = NR_CPUS, |
59 | WORK_CPU_NONE = NR_CPUS + 1, | 59 | WORK_CPU_NONE = NR_CPUS + 1, |
60 | WORK_CPU_LAST = WORK_CPU_NONE, | 60 | WORK_CPU_LAST = WORK_CPU_NONE, |
61 | 61 | ||
62 | /* | 62 | /* |
63 | * Reserve 7 bits off of cwq pointer w/ debugobjects turned | 63 | * Reserve 7 bits off of cwq pointer w/ debugobjects turned |
64 | * off. This makes cwqs aligned to 256 bytes and allows 15 | 64 | * off. This makes cwqs aligned to 256 bytes and allows 15 |
65 | * workqueue flush colors. | 65 | * workqueue flush colors. |
66 | */ | 66 | */ |
67 | WORK_STRUCT_FLAG_BITS = WORK_STRUCT_COLOR_SHIFT + | 67 | WORK_STRUCT_FLAG_BITS = WORK_STRUCT_COLOR_SHIFT + |
68 | WORK_STRUCT_COLOR_BITS, | 68 | WORK_STRUCT_COLOR_BITS, |
69 | 69 | ||
70 | WORK_STRUCT_FLAG_MASK = (1UL << WORK_STRUCT_FLAG_BITS) - 1, | 70 | WORK_STRUCT_FLAG_MASK = (1UL << WORK_STRUCT_FLAG_BITS) - 1, |
71 | WORK_STRUCT_WQ_DATA_MASK = ~WORK_STRUCT_FLAG_MASK, | 71 | WORK_STRUCT_WQ_DATA_MASK = ~WORK_STRUCT_FLAG_MASK, |
72 | WORK_STRUCT_NO_CPU = WORK_CPU_NONE << WORK_STRUCT_FLAG_BITS, | 72 | WORK_STRUCT_NO_CPU = WORK_CPU_NONE << WORK_STRUCT_FLAG_BITS, |
73 | 73 | ||
74 | /* bit mask for work_busy() return values */ | 74 | /* bit mask for work_busy() return values */ |
75 | WORK_BUSY_PENDING = 1 << 0, | 75 | WORK_BUSY_PENDING = 1 << 0, |
76 | WORK_BUSY_RUNNING = 1 << 1, | 76 | WORK_BUSY_RUNNING = 1 << 1, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | struct work_struct { | 79 | struct work_struct { |
80 | atomic_long_t data; | 80 | atomic_long_t data; |
81 | struct list_head entry; | 81 | struct list_head entry; |
82 | work_func_t func; | 82 | work_func_t func; |
83 | #ifdef CONFIG_LOCKDEP | 83 | #ifdef CONFIG_LOCKDEP |
84 | struct lockdep_map lockdep_map; | 84 | struct lockdep_map lockdep_map; |
85 | #endif | 85 | #endif |
86 | }; | 86 | }; |
87 | 87 | ||
88 | #define WORK_DATA_INIT() ATOMIC_LONG_INIT(WORK_STRUCT_NO_CPU) | 88 | #define WORK_DATA_INIT() ATOMIC_LONG_INIT(WORK_STRUCT_NO_CPU) |
89 | #define WORK_DATA_STATIC_INIT() \ | 89 | #define WORK_DATA_STATIC_INIT() \ |
90 | ATOMIC_LONG_INIT(WORK_STRUCT_NO_CPU | WORK_STRUCT_STATIC) | 90 | ATOMIC_LONG_INIT(WORK_STRUCT_NO_CPU | WORK_STRUCT_STATIC) |
91 | 91 | ||
92 | struct delayed_work { | 92 | struct delayed_work { |
93 | struct work_struct work; | 93 | struct work_struct work; |
94 | struct timer_list timer; | 94 | struct timer_list timer; |
95 | }; | 95 | }; |
96 | 96 | ||
97 | static inline struct delayed_work *to_delayed_work(struct work_struct *work) | 97 | static inline struct delayed_work *to_delayed_work(struct work_struct *work) |
98 | { | 98 | { |
99 | return container_of(work, struct delayed_work, work); | 99 | return container_of(work, struct delayed_work, work); |
100 | } | 100 | } |
101 | 101 | ||
102 | struct execute_work { | 102 | struct execute_work { |
103 | struct work_struct work; | 103 | struct work_struct work; |
104 | }; | 104 | }; |
105 | 105 | ||
106 | #ifdef CONFIG_LOCKDEP | 106 | #ifdef CONFIG_LOCKDEP |
107 | /* | 107 | /* |
108 | * NB: because we have to copy the lockdep_map, setting _key | 108 | * NB: because we have to copy the lockdep_map, setting _key |
109 | * here is required, otherwise it could get initialised to the | 109 | * here is required, otherwise it could get initialised to the |
110 | * copy of the lockdep_map! | 110 | * copy of the lockdep_map! |
111 | */ | 111 | */ |
112 | #define __WORK_INIT_LOCKDEP_MAP(n, k) \ | 112 | #define __WORK_INIT_LOCKDEP_MAP(n, k) \ |
113 | .lockdep_map = STATIC_LOCKDEP_MAP_INIT(n, k), | 113 | .lockdep_map = STATIC_LOCKDEP_MAP_INIT(n, k), |
114 | #else | 114 | #else |
115 | #define __WORK_INIT_LOCKDEP_MAP(n, k) | 115 | #define __WORK_INIT_LOCKDEP_MAP(n, k) |
116 | #endif | 116 | #endif |
117 | 117 | ||
118 | #define __WORK_INITIALIZER(n, f) { \ | 118 | #define __WORK_INITIALIZER(n, f) { \ |
119 | .data = WORK_DATA_STATIC_INIT(), \ | 119 | .data = WORK_DATA_STATIC_INIT(), \ |
120 | .entry = { &(n).entry, &(n).entry }, \ | 120 | .entry = { &(n).entry, &(n).entry }, \ |
121 | .func = (f), \ | 121 | .func = (f), \ |
122 | __WORK_INIT_LOCKDEP_MAP(#n, &(n)) \ | 122 | __WORK_INIT_LOCKDEP_MAP(#n, &(n)) \ |
123 | } | 123 | } |
124 | 124 | ||
125 | #define __DELAYED_WORK_INITIALIZER(n, f) { \ | 125 | #define __DELAYED_WORK_INITIALIZER(n, f) { \ |
126 | .work = __WORK_INITIALIZER((n).work, (f)), \ | 126 | .work = __WORK_INITIALIZER((n).work, (f)), \ |
127 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ | 127 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ |
128 | } | 128 | } |
129 | 129 | ||
130 | #define __DEFERRED_WORK_INITIALIZER(n, f) { \ | 130 | #define __DEFERRED_WORK_INITIALIZER(n, f) { \ |
131 | .work = __WORK_INITIALIZER((n).work, (f)), \ | 131 | .work = __WORK_INITIALIZER((n).work, (f)), \ |
132 | .timer = TIMER_DEFERRED_INITIALIZER(NULL, 0, 0), \ | 132 | .timer = TIMER_DEFERRED_INITIALIZER(NULL, 0, 0), \ |
133 | } | 133 | } |
134 | 134 | ||
135 | #define DECLARE_WORK(n, f) \ | 135 | #define DECLARE_WORK(n, f) \ |
136 | struct work_struct n = __WORK_INITIALIZER(n, f) | 136 | struct work_struct n = __WORK_INITIALIZER(n, f) |
137 | 137 | ||
138 | #define DECLARE_DELAYED_WORK(n, f) \ | 138 | #define DECLARE_DELAYED_WORK(n, f) \ |
139 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) | 139 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) |
140 | 140 | ||
141 | #define DECLARE_DEFERRED_WORK(n, f) \ | 141 | #define DECLARE_DEFERRED_WORK(n, f) \ |
142 | struct delayed_work n = __DEFERRED_WORK_INITIALIZER(n, f) | 142 | struct delayed_work n = __DEFERRED_WORK_INITIALIZER(n, f) |
143 | 143 | ||
144 | /* | 144 | /* |
145 | * initialize a work item's function pointer | 145 | * initialize a work item's function pointer |
146 | */ | 146 | */ |
147 | #define PREPARE_WORK(_work, _func) \ | 147 | #define PREPARE_WORK(_work, _func) \ |
148 | do { \ | 148 | do { \ |
149 | (_work)->func = (_func); \ | 149 | (_work)->func = (_func); \ |
150 | } while (0) | 150 | } while (0) |
151 | 151 | ||
152 | #define PREPARE_DELAYED_WORK(_work, _func) \ | 152 | #define PREPARE_DELAYED_WORK(_work, _func) \ |
153 | PREPARE_WORK(&(_work)->work, (_func)) | 153 | PREPARE_WORK(&(_work)->work, (_func)) |
154 | 154 | ||
155 | #ifdef CONFIG_DEBUG_OBJECTS_WORK | 155 | #ifdef CONFIG_DEBUG_OBJECTS_WORK |
156 | extern void __init_work(struct work_struct *work, int onstack); | 156 | extern void __init_work(struct work_struct *work, int onstack); |
157 | extern void destroy_work_on_stack(struct work_struct *work); | 157 | extern void destroy_work_on_stack(struct work_struct *work); |
158 | static inline unsigned int work_static(struct work_struct *work) | 158 | static inline unsigned int work_static(struct work_struct *work) |
159 | { | 159 | { |
160 | return *work_data_bits(work) & WORK_STRUCT_STATIC; | 160 | return *work_data_bits(work) & WORK_STRUCT_STATIC; |
161 | } | 161 | } |
162 | #else | 162 | #else |
163 | static inline void __init_work(struct work_struct *work, int onstack) { } | 163 | static inline void __init_work(struct work_struct *work, int onstack) { } |
164 | static inline void destroy_work_on_stack(struct work_struct *work) { } | 164 | static inline void destroy_work_on_stack(struct work_struct *work) { } |
165 | static inline unsigned int work_static(struct work_struct *work) { return 0; } | 165 | static inline unsigned int work_static(struct work_struct *work) { return 0; } |
166 | #endif | 166 | #endif |
167 | 167 | ||
168 | /* | 168 | /* |
169 | * initialize all of a work item in one go | 169 | * initialize all of a work item in one go |
170 | * | 170 | * |
171 | * NOTE! No point in using "atomic_long_set()": using a direct | 171 | * NOTE! No point in using "atomic_long_set()": using a direct |
172 | * assignment of the work data initializer allows the compiler | 172 | * assignment of the work data initializer allows the compiler |
173 | * to generate better code. | 173 | * to generate better code. |
174 | */ | 174 | */ |
175 | #ifdef CONFIG_LOCKDEP | 175 | #ifdef CONFIG_LOCKDEP |
176 | #define __INIT_WORK(_work, _func, _onstack) \ | 176 | #define __INIT_WORK(_work, _func, _onstack) \ |
177 | do { \ | 177 | do { \ |
178 | static struct lock_class_key __key; \ | 178 | static struct lock_class_key __key; \ |
179 | \ | 179 | \ |
180 | __init_work((_work), _onstack); \ | 180 | __init_work((_work), _onstack); \ |
181 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ | 181 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ |
182 | lockdep_init_map(&(_work)->lockdep_map, #_work, &__key, 0);\ | 182 | lockdep_init_map(&(_work)->lockdep_map, #_work, &__key, 0);\ |
183 | INIT_LIST_HEAD(&(_work)->entry); \ | 183 | INIT_LIST_HEAD(&(_work)->entry); \ |
184 | PREPARE_WORK((_work), (_func)); \ | 184 | PREPARE_WORK((_work), (_func)); \ |
185 | } while (0) | 185 | } while (0) |
186 | #else | 186 | #else |
187 | #define __INIT_WORK(_work, _func, _onstack) \ | 187 | #define __INIT_WORK(_work, _func, _onstack) \ |
188 | do { \ | 188 | do { \ |
189 | __init_work((_work), _onstack); \ | 189 | __init_work((_work), _onstack); \ |
190 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ | 190 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \ |
191 | INIT_LIST_HEAD(&(_work)->entry); \ | 191 | INIT_LIST_HEAD(&(_work)->entry); \ |
192 | PREPARE_WORK((_work), (_func)); \ | 192 | PREPARE_WORK((_work), (_func)); \ |
193 | } while (0) | 193 | } while (0) |
194 | #endif | 194 | #endif |
195 | 195 | ||
196 | #define INIT_WORK(_work, _func) \ | 196 | #define INIT_WORK(_work, _func) \ |
197 | do { \ | 197 | do { \ |
198 | __INIT_WORK((_work), (_func), 0); \ | 198 | __INIT_WORK((_work), (_func), 0); \ |
199 | } while (0) | 199 | } while (0) |
200 | 200 | ||
201 | #define INIT_WORK_ONSTACK(_work, _func) \ | 201 | #define INIT_WORK_ONSTACK(_work, _func) \ |
202 | do { \ | 202 | do { \ |
203 | __INIT_WORK((_work), (_func), 1); \ | 203 | __INIT_WORK((_work), (_func), 1); \ |
204 | } while (0) | 204 | } while (0) |
205 | 205 | ||
206 | #define INIT_DELAYED_WORK(_work, _func) \ | 206 | #define INIT_DELAYED_WORK(_work, _func) \ |
207 | do { \ | 207 | do { \ |
208 | INIT_WORK(&(_work)->work, (_func)); \ | 208 | INIT_WORK(&(_work)->work, (_func)); \ |
209 | init_timer(&(_work)->timer); \ | 209 | init_timer(&(_work)->timer); \ |
210 | } while (0) | 210 | } while (0) |
211 | 211 | ||
212 | #define INIT_DELAYED_WORK_ONSTACK(_work, _func) \ | 212 | #define INIT_DELAYED_WORK_ONSTACK(_work, _func) \ |
213 | do { \ | 213 | do { \ |
214 | INIT_WORK_ONSTACK(&(_work)->work, (_func)); \ | 214 | INIT_WORK_ONSTACK(&(_work)->work, (_func)); \ |
215 | init_timer_on_stack(&(_work)->timer); \ | 215 | init_timer_on_stack(&(_work)->timer); \ |
216 | } while (0) | 216 | } while (0) |
217 | 217 | ||
218 | #define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ | 218 | #define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ |
219 | do { \ | 219 | do { \ |
220 | INIT_WORK(&(_work)->work, (_func)); \ | 220 | INIT_WORK(&(_work)->work, (_func)); \ |
221 | init_timer_deferrable(&(_work)->timer); \ | 221 | init_timer_deferrable(&(_work)->timer); \ |
222 | } while (0) | 222 | } while (0) |
223 | 223 | ||
224 | /** | 224 | /** |
225 | * work_pending - Find out whether a work item is currently pending | 225 | * work_pending - Find out whether a work item is currently pending |
226 | * @work: The work item in question | 226 | * @work: The work item in question |
227 | */ | 227 | */ |
228 | #define work_pending(work) \ | 228 | #define work_pending(work) \ |
229 | test_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work)) | 229 | test_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work)) |
230 | 230 | ||
231 | /** | 231 | /** |
232 | * delayed_work_pending - Find out whether a delayable work item is currently | 232 | * delayed_work_pending - Find out whether a delayable work item is currently |
233 | * pending | 233 | * pending |
234 | * @work: The work item in question | 234 | * @work: The work item in question |
235 | */ | 235 | */ |
236 | #define delayed_work_pending(w) \ | 236 | #define delayed_work_pending(w) \ |
237 | work_pending(&(w)->work) | 237 | work_pending(&(w)->work) |
238 | 238 | ||
239 | /** | 239 | /** |
240 | * work_clear_pending - for internal use only, mark a work item as not pending | 240 | * work_clear_pending - for internal use only, mark a work item as not pending |
241 | * @work: The work item in question | 241 | * @work: The work item in question |
242 | */ | 242 | */ |
243 | #define work_clear_pending(work) \ | 243 | #define work_clear_pending(work) \ |
244 | clear_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work)) | 244 | clear_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(work)) |
245 | 245 | ||
246 | /* | 246 | /* |
247 | * Workqueue flags and constants. For details, please refer to | 247 | * Workqueue flags and constants. For details, please refer to |
248 | * Documentation/workqueue.txt. | 248 | * Documentation/workqueue.txt. |
249 | */ | 249 | */ |
250 | enum { | 250 | enum { |
251 | WQ_NON_REENTRANT = 1 << 0, /* guarantee non-reentrance */ | 251 | WQ_NON_REENTRANT = 1 << 0, /* guarantee non-reentrance */ |
252 | WQ_UNBOUND = 1 << 1, /* not bound to any cpu */ | 252 | WQ_UNBOUND = 1 << 1, /* not bound to any cpu */ |
253 | WQ_FREEZABLE = 1 << 2, /* freeze during suspend */ | 253 | WQ_FREEZABLE = 1 << 2, /* freeze during suspend */ |
254 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ | 254 | WQ_MEM_RECLAIM = 1 << 3, /* may be used for memory reclaim */ |
255 | WQ_HIGHPRI = 1 << 4, /* high priority */ | 255 | WQ_HIGHPRI = 1 << 4, /* high priority */ |
256 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ | 256 | WQ_CPU_INTENSIVE = 1 << 5, /* cpu instensive workqueue */ |
257 | 257 | ||
258 | WQ_DYING = 1 << 6, /* internal: workqueue is dying */ | 258 | WQ_DYING = 1 << 6, /* internal: workqueue is dying */ |
259 | WQ_RESCUER = 1 << 7, /* internal: workqueue has rescuer */ | 259 | WQ_RESCUER = 1 << 7, /* internal: workqueue has rescuer */ |
260 | 260 | ||
261 | WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ | 261 | WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ |
262 | WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ | 262 | WQ_MAX_UNBOUND_PER_CPU = 4, /* 4 * #cpus for unbound wq */ |
263 | WQ_DFL_ACTIVE = WQ_MAX_ACTIVE / 2, | 263 | WQ_DFL_ACTIVE = WQ_MAX_ACTIVE / 2, |
264 | }; | 264 | }; |
265 | 265 | ||
266 | /* unbound wq's aren't per-cpu, scale max_active according to #cpus */ | 266 | /* unbound wq's aren't per-cpu, scale max_active according to #cpus */ |
267 | #define WQ_UNBOUND_MAX_ACTIVE \ | 267 | #define WQ_UNBOUND_MAX_ACTIVE \ |
268 | max_t(int, WQ_MAX_ACTIVE, num_possible_cpus() * WQ_MAX_UNBOUND_PER_CPU) | 268 | max_t(int, WQ_MAX_ACTIVE, num_possible_cpus() * WQ_MAX_UNBOUND_PER_CPU) |
269 | 269 | ||
270 | /* | 270 | /* |
271 | * System-wide workqueues which are always present. | 271 | * System-wide workqueues which are always present. |
272 | * | 272 | * |
273 | * system_wq is the one used by schedule[_delayed]_work[_on](). | 273 | * system_wq is the one used by schedule[_delayed]_work[_on](). |
274 | * Multi-CPU multi-threaded. There are users which expect relatively | 274 | * Multi-CPU multi-threaded. There are users which expect relatively |
275 | * short queue flush time. Don't queue works which can run for too | 275 | * short queue flush time. Don't queue works which can run for too |
276 | * long. | 276 | * long. |
277 | * | 277 | * |
278 | * system_long_wq is similar to system_wq but may host long running | 278 | * system_long_wq is similar to system_wq but may host long running |
279 | * works. Queue flushing might take relatively long. | 279 | * works. Queue flushing might take relatively long. |
280 | * | 280 | * |
281 | * system_nrt_wq is non-reentrant and guarantees that any given work | 281 | * system_nrt_wq is non-reentrant and guarantees that any given work |
282 | * item is never executed in parallel by multiple CPUs. Queue | 282 | * item is never executed in parallel by multiple CPUs. Queue |
283 | * flushing might take relatively long. | 283 | * flushing might take relatively long. |
284 | * | 284 | * |
285 | * system_unbound_wq is unbound workqueue. Workers are not bound to | 285 | * system_unbound_wq is unbound workqueue. Workers are not bound to |
286 | * any specific CPU, not concurrency managed, and all queued works are | 286 | * any specific CPU, not concurrency managed, and all queued works are |
287 | * executed immediately as long as max_active limit is not reached and | 287 | * executed immediately as long as max_active limit is not reached and |
288 | * resources are available. | 288 | * resources are available. |
289 | * | 289 | * |
290 | * system_freezable_wq is equivalent to system_wq except that it's | 290 | * system_freezable_wq is equivalent to system_wq except that it's |
291 | * freezable. | 291 | * freezable. |
292 | */ | 292 | */ |
293 | extern struct workqueue_struct *system_wq; | 293 | extern struct workqueue_struct *system_wq; |
294 | extern struct workqueue_struct *system_long_wq; | 294 | extern struct workqueue_struct *system_long_wq; |
295 | extern struct workqueue_struct *system_nrt_wq; | 295 | extern struct workqueue_struct *system_nrt_wq; |
296 | extern struct workqueue_struct *system_unbound_wq; | 296 | extern struct workqueue_struct *system_unbound_wq; |
297 | extern struct workqueue_struct *system_freezable_wq; | 297 | extern struct workqueue_struct *system_freezable_wq; |
298 | 298 | ||
299 | extern struct workqueue_struct * | 299 | extern struct workqueue_struct * |
300 | __alloc_workqueue_key(const char *name, unsigned int flags, int max_active, | 300 | __alloc_workqueue_key(const char *name, unsigned int flags, int max_active, |
301 | struct lock_class_key *key, const char *lock_name); | 301 | struct lock_class_key *key, const char *lock_name); |
302 | 302 | ||
303 | #ifdef CONFIG_LOCKDEP | 303 | #ifdef CONFIG_LOCKDEP |
304 | #define alloc_workqueue(name, flags, max_active) \ | 304 | #define alloc_workqueue(name, flags, max_active) \ |
305 | ({ \ | 305 | ({ \ |
306 | static struct lock_class_key __key; \ | 306 | static struct lock_class_key __key; \ |
307 | const char *__lock_name; \ | 307 | const char *__lock_name; \ |
308 | \ | 308 | \ |
309 | if (__builtin_constant_p(name)) \ | 309 | if (__builtin_constant_p(name)) \ |
310 | __lock_name = (name); \ | 310 | __lock_name = (name); \ |
311 | else \ | 311 | else \ |
312 | __lock_name = #name; \ | 312 | __lock_name = #name; \ |
313 | \ | 313 | \ |
314 | __alloc_workqueue_key((name), (flags), (max_active), \ | 314 | __alloc_workqueue_key((name), (flags), (max_active), \ |
315 | &__key, __lock_name); \ | 315 | &__key, __lock_name); \ |
316 | }) | 316 | }) |
317 | #else | 317 | #else |
318 | #define alloc_workqueue(name, flags, max_active) \ | 318 | #define alloc_workqueue(name, flags, max_active) \ |
319 | __alloc_workqueue_key((name), (flags), (max_active), NULL, NULL) | 319 | __alloc_workqueue_key((name), (flags), (max_active), NULL, NULL) |
320 | #endif | 320 | #endif |
321 | 321 | ||
322 | /** | 322 | /** |
323 | * alloc_ordered_workqueue - allocate an ordered workqueue | 323 | * alloc_ordered_workqueue - allocate an ordered workqueue |
324 | * @name: name of the workqueue | 324 | * @name: name of the workqueue |
325 | * @flags: WQ_* flags (only WQ_FREEZABLE and WQ_MEM_RECLAIM are meaningful) | 325 | * @flags: WQ_* flags (only WQ_FREEZABLE and WQ_MEM_RECLAIM are meaningful) |
326 | * | 326 | * |
327 | * Allocate an ordered workqueue. An ordered workqueue executes at | 327 | * Allocate an ordered workqueue. An ordered workqueue executes at |
328 | * most one work item at any given time in the queued order. They are | 328 | * most one work item at any given time in the queued order. They are |
329 | * implemented as unbound workqueues with @max_active of one. | 329 | * implemented as unbound workqueues with @max_active of one. |
330 | * | 330 | * |
331 | * RETURNS: | 331 | * RETURNS: |
332 | * Pointer to the allocated workqueue on success, %NULL on failure. | 332 | * Pointer to the allocated workqueue on success, %NULL on failure. |
333 | */ | 333 | */ |
334 | static inline struct workqueue_struct * | 334 | static inline struct workqueue_struct * |
335 | alloc_ordered_workqueue(const char *name, unsigned int flags) | 335 | alloc_ordered_workqueue(const char *name, unsigned int flags) |
336 | { | 336 | { |
337 | return alloc_workqueue(name, WQ_UNBOUND | flags, 1); | 337 | return alloc_workqueue(name, WQ_UNBOUND | flags, 1); |
338 | } | 338 | } |
339 | 339 | ||
340 | #define create_workqueue(name) \ | 340 | #define create_workqueue(name) \ |
341 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) | 341 | alloc_workqueue((name), WQ_MEM_RECLAIM, 1) |
342 | #define create_freezable_workqueue(name) \ | 342 | #define create_freezable_workqueue(name) \ |
343 | alloc_workqueue((name), WQ_FREEZABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1) | 343 | alloc_workqueue((name), WQ_FREEZABLE | WQ_UNBOUND | WQ_MEM_RECLAIM, 1) |
344 | #define create_singlethread_workqueue(name) \ | 344 | #define create_singlethread_workqueue(name) \ |
345 | alloc_workqueue((name), WQ_UNBOUND | WQ_MEM_RECLAIM, 1) | 345 | alloc_workqueue((name), WQ_UNBOUND | WQ_MEM_RECLAIM, 1) |
346 | 346 | ||
347 | extern void destroy_workqueue(struct workqueue_struct *wq); | 347 | extern void destroy_workqueue(struct workqueue_struct *wq); |
348 | 348 | ||
349 | extern int queue_work(struct workqueue_struct *wq, struct work_struct *work); | 349 | extern int queue_work(struct workqueue_struct *wq, struct work_struct *work); |
350 | extern int queue_work_on(int cpu, struct workqueue_struct *wq, | 350 | extern int queue_work_on(int cpu, struct workqueue_struct *wq, |
351 | struct work_struct *work); | 351 | struct work_struct *work); |
352 | extern int queue_delayed_work(struct workqueue_struct *wq, | 352 | extern int queue_delayed_work(struct workqueue_struct *wq, |
353 | struct delayed_work *work, unsigned long delay); | 353 | struct delayed_work *work, unsigned long delay); |
354 | extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, | 354 | extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, |
355 | struct delayed_work *work, unsigned long delay); | 355 | struct delayed_work *work, unsigned long delay); |
356 | 356 | ||
357 | extern void flush_workqueue(struct workqueue_struct *wq); | 357 | extern void flush_workqueue(struct workqueue_struct *wq); |
358 | extern void flush_scheduled_work(void); | 358 | extern void flush_scheduled_work(void); |
359 | 359 | ||
360 | extern int schedule_work(struct work_struct *work); | 360 | extern int schedule_work(struct work_struct *work); |
361 | extern int schedule_work_on(int cpu, struct work_struct *work); | 361 | extern int schedule_work_on(int cpu, struct work_struct *work); |
362 | extern int schedule_delayed_work(struct delayed_work *work, unsigned long delay); | 362 | extern int schedule_delayed_work(struct delayed_work *work, unsigned long delay); |
363 | extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, | 363 | extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, |
364 | unsigned long delay); | 364 | unsigned long delay); |
365 | extern int schedule_on_each_cpu(work_func_t func); | 365 | extern int schedule_on_each_cpu(work_func_t func); |
366 | extern int keventd_up(void); | 366 | extern int keventd_up(void); |
367 | 367 | ||
368 | int execute_in_process_context(work_func_t fn, struct execute_work *); | 368 | int execute_in_process_context(work_func_t fn, struct execute_work *); |
369 | 369 | ||
370 | extern bool flush_work(struct work_struct *work); | 370 | extern bool flush_work(struct work_struct *work); |
371 | extern bool flush_work_sync(struct work_struct *work); | 371 | extern bool flush_work_sync(struct work_struct *work); |
372 | extern bool cancel_work_sync(struct work_struct *work); | 372 | extern bool cancel_work_sync(struct work_struct *work); |
373 | 373 | ||
374 | extern bool flush_delayed_work(struct delayed_work *dwork); | 374 | extern bool flush_delayed_work(struct delayed_work *dwork); |
375 | extern bool flush_delayed_work_sync(struct delayed_work *work); | 375 | extern bool flush_delayed_work_sync(struct delayed_work *work); |
376 | extern bool cancel_delayed_work_sync(struct delayed_work *dwork); | 376 | extern bool cancel_delayed_work_sync(struct delayed_work *dwork); |
377 | 377 | ||
378 | extern void workqueue_set_max_active(struct workqueue_struct *wq, | 378 | extern void workqueue_set_max_active(struct workqueue_struct *wq, |
379 | int max_active); | 379 | int max_active); |
380 | extern bool workqueue_congested(unsigned int cpu, struct workqueue_struct *wq); | 380 | extern bool workqueue_congested(unsigned int cpu, struct workqueue_struct *wq); |
381 | extern unsigned int work_cpu(struct work_struct *work); | 381 | extern unsigned int work_cpu(struct work_struct *work); |
382 | extern unsigned int work_busy(struct work_struct *work); | 382 | extern unsigned int work_busy(struct work_struct *work); |
383 | 383 | ||
384 | /* | 384 | /* |
385 | * Kill off a pending schedule_delayed_work(). Note that the work callback | 385 | * Kill off a pending schedule_delayed_work(). Note that the work callback |
386 | * function may still be running on return from cancel_delayed_work(), unless | 386 | * function may still be running on return from cancel_delayed_work(), unless |
387 | * it returns 1 and the work doesn't re-arm itself. Run flush_workqueue() or | 387 | * it returns 1 and the work doesn't re-arm itself. Run flush_workqueue() or |
388 | * cancel_work_sync() to wait on it. | 388 | * cancel_work_sync() to wait on it. |
389 | */ | 389 | */ |
390 | static inline bool cancel_delayed_work(struct delayed_work *work) | 390 | static inline bool cancel_delayed_work(struct delayed_work *work) |
391 | { | 391 | { |
392 | bool ret; | 392 | bool ret; |
393 | 393 | ||
394 | ret = del_timer_sync(&work->timer); | 394 | ret = del_timer_sync(&work->timer); |
395 | if (ret) | 395 | if (ret) |
396 | work_clear_pending(&work->work); | 396 | work_clear_pending(&work->work); |
397 | return ret; | 397 | return ret; |
398 | } | 398 | } |
399 | 399 | ||
400 | /* | 400 | /* |
401 | * Like above, but uses del_timer() instead of del_timer_sync(). This means, | 401 | * Like above, but uses del_timer() instead of del_timer_sync(). This means, |
402 | * if it returns 0 the timer function may be running and the queueing is in | 402 | * if it returns 0 the timer function may be running and the queueing is in |
403 | * progress. | 403 | * progress. |
404 | */ | 404 | */ |
405 | static inline bool __cancel_delayed_work(struct delayed_work *work) | 405 | static inline bool __cancel_delayed_work(struct delayed_work *work) |
406 | { | 406 | { |
407 | bool ret; | 407 | bool ret; |
408 | 408 | ||
409 | ret = del_timer(&work->timer); | 409 | ret = del_timer(&work->timer); |
410 | if (ret) | 410 | if (ret) |
411 | work_clear_pending(&work->work); | 411 | work_clear_pending(&work->work); |
412 | return ret; | 412 | return ret; |
413 | } | 413 | } |
414 | 414 | ||
415 | /* Obsolete. use cancel_delayed_work_sync() */ | ||
416 | static inline __deprecated | ||
417 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, | ||
418 | struct delayed_work *work) | ||
419 | { | ||
420 | cancel_delayed_work_sync(work); | ||
421 | } | ||
422 | |||
423 | /* Obsolete. use cancel_delayed_work_sync() */ | ||
424 | static inline __deprecated | ||
425 | void cancel_rearming_delayed_work(struct delayed_work *work) | ||
426 | { | ||
427 | cancel_delayed_work_sync(work); | ||
428 | } | ||
429 | |||
430 | #ifndef CONFIG_SMP | 415 | #ifndef CONFIG_SMP |
431 | static inline long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg) | 416 | static inline long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg) |
432 | { | 417 | { |
433 | return fn(arg); | 418 | return fn(arg); |
434 | } | 419 | } |
435 | #else | 420 | #else |
436 | long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg); | 421 | long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg); |
437 | #endif /* CONFIG_SMP */ | 422 | #endif /* CONFIG_SMP */ |
438 | 423 | ||
439 | #ifdef CONFIG_FREEZER | 424 | #ifdef CONFIG_FREEZER |
440 | extern void freeze_workqueues_begin(void); | 425 | extern void freeze_workqueues_begin(void); |
441 | extern bool freeze_workqueues_busy(void); | 426 | extern bool freeze_workqueues_busy(void); |
442 | extern void thaw_workqueues(void); | 427 | extern void thaw_workqueues(void); |
443 | #endif /* CONFIG_FREEZER */ | 428 | #endif /* CONFIG_FREEZER */ |
444 | 429 | ||
445 | #endif | 430 | #endif |
446 | 431 |