annotate Documentation/applying-patches.txt @ 897:329ea0ccb344

balloon: try harder to balloon up under memory pressure.

Currently if the balloon driver is unable to increase the guest's
reservation it assumes the failure was due to reaching its full
allocation, gives up on the ballooning operation and records the limit
it reached as the "hard limit". The driver will not try again until
the target is set again (even to the same value).

However it is possible that ballooning has in fact failed due to
memory pressure in the host and therefore it is desirable to keep
attempting to reach the target in case memory becomes available. The
most likely scenario is that some guests are ballooning down while
others are ballooning up and therefore there is temporary memory
pressure while things stabilise. You would not expect a well behaved
toolstack to ask a domain to balloon to more than its allocation nor
would you expect it to deliberately over-commit memory by setting
balloon targets which exceed the total host memory.

This patch drops the concept of a hard limit and causes the balloon
driver to retry increasing the reservation on a timer in the same
manner as when decreasing the reservation.

Also if we partially succeed in increasing the reservation
(i.e. receive less pages than we asked for) then we may as well keep
those pages rather than returning them to Xen.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 05 14:01:20 2009 +0100 (2009-06-05)
parents 831230e53067
rev   line source
ian@0 1
ian@0 2 Applying Patches To The Linux Kernel
ian@0 3 ------------------------------------
ian@0 4
ian@0 5 Original by: Jesper Juhl, August 2005
ian@0 6 Last update: 2006-01-05
ian@0 7
ian@0 8
ian@0 9 A frequently asked question on the Linux Kernel Mailing List is how to apply
ian@0 10 a patch to the kernel or, more specifically, what base kernel a patch for
ian@0 11 one of the many trees/branches should be applied to. Hopefully this document
ian@0 12 will explain this to you.
ian@0 13
ian@0 14 In addition to explaining how to apply and revert patches, a brief
ian@0 15 description of the different kernel trees (and examples of how to apply
ian@0 16 their specific patches) is also provided.
ian@0 17
ian@0 18
ian@0 19 What is a patch?
ian@0 20 ---
ian@0 21 A patch is a small text document containing a delta of changes between two
ian@0 22 different versions of a source tree. Patches are created with the `diff'
ian@0 23 program.
ian@0 24 To correctly apply a patch you need to know what base it was generated from
ian@0 25 and what new version the patch will change the source tree into. These
ian@0 26 should both be present in the patch file metadata or be possible to deduce
ian@0 27 from the filename.
ian@0 28
ian@0 29
ian@0 30 How do I apply or revert a patch?
ian@0 31 ---
ian@0 32 You apply a patch with the `patch' program. The patch program reads a diff
ian@0 33 (or patch) file and makes the changes to the source tree described in it.
ian@0 34
ian@0 35 Patches for the Linux kernel are generated relative to the parent directory
ian@0 36 holding the kernel source dir.
ian@0 37
ian@0 38 This means that paths to files inside the patch file contain the name of the
ian@0 39 kernel source directories it was generated against (or some other directory
ian@0 40 names like "a/" and "b/").
ian@0 41 Since this is unlikely to match the name of the kernel source dir on your
ian@0 42 local machine (but is often useful info to see what version an otherwise
ian@0 43 unlabeled patch was generated against) you should change into your kernel
ian@0 44 source directory and then strip the first element of the path from filenames
ian@0 45 in the patch file when applying it (the -p1 argument to `patch' does this).
ian@0 46
ian@0 47 To revert a previously applied patch, use the -R argument to patch.
ian@0 48 So, if you applied a patch like this:
ian@0 49 patch -p1 < ../patch-x.y.z
ian@0 50
ian@0 51 You can revert (undo) it like this:
ian@0 52 patch -R -p1 < ../patch-x.y.z
ian@0 53
ian@0 54
ian@0 55 How do I feed a patch/diff file to `patch'?
ian@0 56 ---
ian@0 57 This (as usual with Linux and other UNIX like operating systems) can be
ian@0 58 done in several different ways.
ian@0 59 In all the examples below I feed the file (in uncompressed form) to patch
ian@0 60 via stdin using the following syntax:
ian@0 61 patch -p1 < path/to/patch-x.y.z
ian@0 62
ian@0 63 If you just want to be able to follow the examples below and don't want to
ian@0 64 know of more than one way to use patch, then you can stop reading this
ian@0 65 section here.
ian@0 66
ian@0 67 Patch can also get the name of the file to use via the -i argument, like
ian@0 68 this:
ian@0 69 patch -p1 -i path/to/patch-x.y.z
ian@0 70
ian@0 71 If your patch file is compressed with gzip or bzip2 and you don't want to
ian@0 72 uncompress it before applying it, then you can feed it to patch like this
ian@0 73 instead:
ian@0 74 zcat path/to/patch-x.y.z.gz | patch -p1
ian@0 75 bzcat path/to/patch-x.y.z.bz2 | patch -p1
ian@0 76
ian@0 77 If you wish to uncompress the patch file by hand first before applying it
ian@0 78 (what I assume you've done in the examples below), then you simply run
ian@0 79 gunzip or bunzip2 on the file -- like this:
ian@0 80 gunzip patch-x.y.z.gz
ian@0 81 bunzip2 patch-x.y.z.bz2
ian@0 82
ian@0 83 Which will leave you with a plain text patch-x.y.z file that you can feed to
ian@0 84 patch via stdin or the -i argument, as you prefer.
ian@0 85
ian@0 86 A few other nice arguments for patch are -s which causes patch to be silent
ian@0 87 except for errors which is nice to prevent errors from scrolling out of the
ian@0 88 screen too fast, and --dry-run which causes patch to just print a listing of
ian@0 89 what would happen, but doesn't actually make any changes. Finally --verbose
ian@0 90 tells patch to print more information about the work being done.
ian@0 91
ian@0 92
ian@0 93 Common errors when patching
ian@0 94 ---
ian@0 95 When patch applies a patch file it attempts to verify the sanity of the
ian@0 96 file in different ways.
ian@0 97 Checking that the file looks like a valid patch file & checking the code
ian@0 98 around the bits being modified matches the context provided in the patch are
ian@0 99 just two of the basic sanity checks patch does.
ian@0 100
ian@0 101 If patch encounters something that doesn't look quite right it has two
ian@0 102 options. It can either refuse to apply the changes and abort or it can try
ian@0 103 to find a way to make the patch apply with a few minor changes.
ian@0 104
ian@0 105 One example of something that's not 'quite right' that patch will attempt to
ian@0 106 fix up is if all the context matches, the lines being changed match, but the
ian@0 107 line numbers are different. This can happen, for example, if the patch makes
ian@0 108 a change in the middle of the file but for some reasons a few lines have
ian@0 109 been added or removed near the beginning of the file. In that case
ian@0 110 everything looks good it has just moved up or down a bit, and patch will
ian@0 111 usually adjust the line numbers and apply the patch.
ian@0 112
ian@0 113 Whenever patch applies a patch that it had to modify a bit to make it fit
ian@0 114 it'll tell you about it by saying the patch applied with 'fuzz'.
ian@0 115 You should be wary of such changes since even though patch probably got it
ian@0 116 right it doesn't /always/ get it right, and the result will sometimes be
ian@0 117 wrong.
ian@0 118
ian@0 119 When patch encounters a change that it can't fix up with fuzz it rejects it
ian@0 120 outright and leaves a file with a .rej extension (a reject file). You can
ian@0 121 read this file to see exactly what change couldn't be applied, so you can
ian@0 122 go fix it up by hand if you wish.
ian@0 123
ian@0 124 If you don't have any third-party patches applied to your kernel source, but
ian@0 125 only patches from kernel.org and you apply the patches in the correct order,
ian@0 126 and have made no modifications yourself to the source files, then you should
ian@0 127 never see a fuzz or reject message from patch. If you do see such messages
ian@0 128 anyway, then there's a high risk that either your local source tree or the
ian@0 129 patch file is corrupted in some way. In that case you should probably try
ian@0 130 re-downloading the patch and if things are still not OK then you'd be advised
ian@0 131 to start with a fresh tree downloaded in full from kernel.org.
ian@0 132
ian@0 133 Let's look a bit more at some of the messages patch can produce.
ian@0 134
ian@0 135 If patch stops and presents a "File to patch:" prompt, then patch could not
ian@0 136 find a file to be patched. Most likely you forgot to specify -p1 or you are
ian@0 137 in the wrong directory. Less often, you'll find patches that need to be
ian@0 138 applied with -p0 instead of -p1 (reading the patch file should reveal if
ian@0 139 this is the case -- if so, then this is an error by the person who created
ian@0 140 the patch but is not fatal).
ian@0 141
ian@0 142 If you get "Hunk #2 succeeded at 1887 with fuzz 2 (offset 7 lines)." or a
ian@0 143 message similar to that, then it means that patch had to adjust the location
ian@0 144 of the change (in this example it needed to move 7 lines from where it
ian@0 145 expected to make the change to make it fit).
ian@0 146 The resulting file may or may not be OK, depending on the reason the file
ian@0 147 was different than expected.
ian@0 148 This often happens if you try to apply a patch that was generated against a
ian@0 149 different kernel version than the one you are trying to patch.
ian@0 150
ian@0 151 If you get a message like "Hunk #3 FAILED at 2387.", then it means that the
ian@0 152 patch could not be applied correctly and the patch program was unable to
ian@0 153 fuzz its way through. This will generate a .rej file with the change that
ian@0 154 caused the patch to fail and also a .orig file showing you the original
ian@0 155 content that couldn't be changed.
ian@0 156
ian@0 157 If you get "Reversed (or previously applied) patch detected! Assume -R? [n]"
ian@0 158 then patch detected that the change contained in the patch seems to have
ian@0 159 already been made.
ian@0 160 If you actually did apply this patch previously and you just re-applied it
ian@0 161 in error, then just say [n]o and abort this patch. If you applied this patch
ian@0 162 previously and actually intended to revert it, but forgot to specify -R,
ian@0 163 then you can say [y]es here to make patch revert it for you.
ian@0 164 This can also happen if the creator of the patch reversed the source and
ian@0 165 destination directories when creating the patch, and in that case reverting
ian@0 166 the patch will in fact apply it.
ian@0 167
ian@0 168 A message similar to "patch: **** unexpected end of file in patch" or "patch
ian@0 169 unexpectedly ends in middle of line" means that patch could make no sense of
ian@0 170 the file you fed to it. Either your download is broken, you tried to feed
ian@0 171 patch a compressed patch file without uncompressing it first, or the patch
ian@0 172 file that you are using has been mangled by a mail client or mail transfer
ian@0 173 agent along the way somewhere, e.g., by splitting a long line into two lines.
ian@0 174 Often these warnings can easily be fixed by joining (concatenating) the
ian@0 175 two lines that had been split.
ian@0 176
ian@0 177 As I already mentioned above, these errors should never happen if you apply
ian@0 178 a patch from kernel.org to the correct version of an unmodified source tree.
ian@0 179 So if you get these errors with kernel.org patches then you should probably
ian@0 180 assume that either your patch file or your tree is broken and I'd advise you
ian@0 181 to start over with a fresh download of a full kernel tree and the patch you
ian@0 182 wish to apply.
ian@0 183
ian@0 184
ian@0 185 Are there any alternatives to `patch'?
ian@0 186 ---
ian@0 187 Yes there are alternatives.
ian@0 188
ian@0 189 You can use the `interdiff' program (http://cyberelk.net/tim/patchutils/) to
ian@0 190 generate a patch representing the differences between two patches and then
ian@0 191 apply the result.
ian@0 192 This will let you move from something like to in a single
ian@0 193 step. The -z flag to interdiff will even let you feed it patches in gzip or
ian@0 194 bzip2 compressed form directly without the use of zcat or bzcat or manual
ian@0 195 decompression.
ian@0 196
ian@0 197 Here's how you'd go from to in a single step:
ian@0 198 interdiff -z ../patch- ../patch- | patch -p1
ian@0 199
ian@0 200 Although interdiff may save you a step or two you are generally advised to
ian@0 201 do the additional steps since interdiff can get things wrong in some cases.
ian@0 202
ian@0 203 Another alternative is `ketchup', which is a python script for automatic
ian@0 204 downloading and applying of patches (http://www.selenic.com/ketchup/).
ian@0 205
ian@0 206 Other nice tools are diffstat, which shows a summary of changes made by a
ian@0 207 patch; lsdiff, which displays a short listing of affected files in a patch
ian@0 208 file, along with (optionally) the line numbers of the start of each patch;
ian@0 209 and grepdiff, which displays a list of the files modified by a patch where
ian@0 210 the patch contains a given regular expression.
ian@0 211
ian@0 212
ian@0 213 Where can I download the patches?
ian@0 214 ---
ian@0 215 The patches are available at http://kernel.org/
ian@0 216 Most recent patches are linked from the front page, but they also have
ian@0 217 specific homes.
ian@0 218
ian@0 219 The 2.6.x.y (-stable) and 2.6.x patches live at
ian@0 220 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/
ian@0 221
ian@0 222 The -rc patches live at
ian@0 223 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing/
ian@0 224
ian@0 225 The -git patches live at
ian@0 226 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/snapshots/
ian@0 227
ian@0 228 The -mm kernels live at
ian@0 229 ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/
ian@0 230
ian@0 231 In place of ftp.kernel.org you can use ftp.cc.kernel.org, where cc is a
ian@0 232 country code. This way you'll be downloading from a mirror site that's most
ian@0 233 likely geographically closer to you, resulting in faster downloads for you,
ian@0 234 less bandwidth used globally and less load on the main kernel.org servers --
ian@0 235 these are good things, so do use mirrors when possible.
ian@0 236
ian@0 237
ian@0 238 The 2.6.x kernels
ian@0 239 ---
ian@0 240 These are the base stable releases released by Linus. The highest numbered
ian@0 241 release is the most recent.
ian@0 242
ian@0 243 If regressions or other serious flaws are found, then a -stable fix patch
ian@0 244 will be released (see below) on top of this base. Once a new 2.6.x base
ian@0 245 kernel is released, a patch is made available that is a delta between the
ian@0 246 previous 2.6.x kernel and the new one.
ian@0 247
ian@0 248 To apply a patch moving from 2.6.11 to 2.6.12, you'd do the following (note
ian@0 249 that such patches do *NOT* apply on top of 2.6.x.y kernels but on top of the
ian@0 250 base 2.6.x kernel -- if you need to move from 2.6.x.y to 2.6.x+1 you need to
ian@0 251 first revert the 2.6.x.y patch).
ian@0 252
ian@0 253 Here are some examples:
ian@0 254
ian@0 255 # moving from 2.6.11 to 2.6.12
ian@0 256 $ cd ~/linux-2.6.11 # change to kernel source dir
ian@0 257 $ patch -p1 < ../patch-2.6.12 # apply the 2.6.12 patch
ian@0 258 $ cd ..
ian@0 259 $ mv linux-2.6.11 linux-2.6.12 # rename source dir
ian@0 260
ian@0 261 # moving from to 2.6.12
ian@0 262 $ cd ~/linux- # change to kernel source dir
ian@0 263 $ patch -p1 -R < ../patch- # revert the patch
ian@0 264 # source dir is now 2.6.11
ian@0 265 $ patch -p1 < ../patch-2.6.12 # apply new 2.6.12 patch
ian@0 266 $ cd ..
ian@0 267 $ mv linux- linux-2.6.12 # rename source dir
ian@0 268
ian@0 269
ian@0 270 The 2.6.x.y kernels
ian@0 271 ---
ian@0 272 Kernels with 4-digit versions are -stable kernels. They contain small(ish)
ian@0 273 critical fixes for security problems or significant regressions discovered
ian@0 274 in a given 2.6.x kernel.
ian@0 275
ian@0 276 This is the recommended branch for users who want the most recent stable
ian@0 277 kernel and are not interested in helping test development/experimental
ian@0 278 versions.
ian@0 279
ian@0 280 If no 2.6.x.y kernel is available, then the highest numbered 2.6.x kernel is
ian@0 281 the current stable kernel.
ian@0 282
ian@0 283 note: the -stable team usually do make incremental patches available as well
ian@0 284 as patches against the latest mainline release, but I only cover the
ian@0 285 non-incremental ones below. The incremental ones can be found at
ian@0 286 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/incr/
ian@0 287
ian@0 288 These patches are not incremental, meaning that for example the
ian@0 289 patch does not apply on top of the kernel source, but rather on top
ian@0 290 of the base 2.6.12 kernel source .
ian@0 291 So, in order to apply the patch to your existing kernel
ian@0 292 source you have to first back out the patch (so you are left with a
ian@0 293 base 2.6.12 kernel source) and then apply the new patch.
ian@0 294
ian@0 295 Here's a small example:
ian@0 296
ian@0 297 $ cd ~/linux- # change into the kernel source dir
ian@0 298 $ patch -p1 -R < ../patch- # revert the patch
ian@0 299 $ patch -p1 < ../patch- # apply the new patch
ian@0 300 $ cd ..
ian@0 301 $ mv linux- linux- # rename the kernel source dir
ian@0 302
ian@0 303
ian@0 304 The -rc kernels
ian@0 305 ---
ian@0 306 These are release-candidate kernels. These are development kernels released
ian@0 307 by Linus whenever he deems the current git (the kernel's source management
ian@0 308 tool) tree to be in a reasonably sane state adequate for testing.
ian@0 309
ian@0 310 These kernels are not stable and you should expect occasional breakage if
ian@0 311 you intend to run them. This is however the most stable of the main
ian@0 312 development branches and is also what will eventually turn into the next
ian@0 313 stable kernel, so it is important that it be tested by as many people as
ian@0 314 possible.
ian@0 315
ian@0 316 This is a good branch to run for people who want to help out testing
ian@0 317 development kernels but do not want to run some of the really experimental
ian@0 318 stuff (such people should see the sections about -git and -mm kernels below).
ian@0 319
ian@0 320 The -rc patches are not incremental, they apply to a base 2.6.x kernel, just
ian@0 321 like the 2.6.x.y patches described above. The kernel version before the -rcN
ian@0 322 suffix denotes the version of the kernel that this -rc kernel will eventually
ian@0 323 turn into.
ian@0 324 So, 2.6.13-rc5 means that this is the fifth release candidate for the 2.6.13
ian@0 325 kernel and the patch should be applied on top of the 2.6.12 kernel source.
ian@0 326
ian@0 327 Here are 3 examples of how to apply these patches:
ian@0 328
ian@0 329 # first an example of moving from 2.6.12 to 2.6.13-rc3
ian@0 330 $ cd ~/linux-2.6.12 # change into the 2.6.12 source dir
ian@0 331 $ patch -p1 < ../patch-2.6.13-rc3 # apply the 2.6.13-rc3 patch
ian@0 332 $ cd ..
ian@0 333 $ mv linux-2.6.12 linux-2.6.13-rc3 # rename the source dir
ian@0 334
ian@0 335 # now let's move from 2.6.13-rc3 to 2.6.13-rc5
ian@0 336 $ cd ~/linux-2.6.13-rc3 # change into the 2.6.13-rc3 dir
ian@0 337 $ patch -p1 -R < ../patch-2.6.13-rc3 # revert the 2.6.13-rc3 patch
ian@0 338 $ patch -p1 < ../patch-2.6.13-rc5 # apply the new 2.6.13-rc5 patch
ian@0 339 $ cd ..
ian@0 340 $ mv linux-2.6.13-rc3 linux-2.6.13-rc5 # rename the source dir
ian@0 341
ian@0 342 # finally let's try and move from to 2.6.13-rc5
ian@0 343 $ cd ~/linux- # change to the kernel source dir
ian@0 344 $ patch -p1 -R < ../patch- # revert the patch
ian@0 345 $ patch -p1 < ../patch-2.6.13-rc5 # apply new 2.6.13-rc5 patch
ian@0 346 $ cd ..
ian@0 347 $ mv linux- linux-2.6.13-rc5 # rename the kernel source dir
ian@0 348
ian@0 349
ian@0 350 The -git kernels
ian@0 351 ---
ian@0 352 These are daily snapshots of Linus' kernel tree (managed in a git
ian@0 353 repository, hence the name).
ian@0 354
ian@0 355 These patches are usually released daily and represent the current state of
ian@0 356 Linus's tree. They are more experimental than -rc kernels since they are
ian@0 357 generated automatically without even a cursory glance to see if they are
ian@0 358 sane.
ian@0 359
ian@0 360 -git patches are not incremental and apply either to a base 2.6.x kernel or
ian@0 361 a base 2.6.x-rc kernel -- you can see which from their name.
ian@0 362 A patch named 2.6.12-git1 applies to the 2.6.12 kernel source and a patch
ian@0 363 named 2.6.13-rc3-git2 applies to the source of the 2.6.13-rc3 kernel.
ian@0 364
ian@0 365 Here are some examples of how to apply these patches:
ian@0 366
ian@0 367 # moving from 2.6.12 to 2.6.12-git1
ian@0 368 $ cd ~/linux-2.6.12 # change to the kernel source dir
ian@0 369 $ patch -p1 < ../patch-2.6.12-git1 # apply the 2.6.12-git1 patch
ian@0 370 $ cd ..
ian@0 371 $ mv linux-2.6.12 linux-2.6.12-git1 # rename the kernel source dir
ian@0 372
ian@0 373 # moving from 2.6.12-git1 to 2.6.13-rc2-git3
ian@0 374 $ cd ~/linux-2.6.12-git1 # change to the kernel source dir
ian@0 375 $ patch -p1 -R < ../patch-2.6.12-git1 # revert the 2.6.12-git1 patch
ian@0 376 # we now have a 2.6.12 kernel
ian@0 377 $ patch -p1 < ../patch-2.6.13-rc2 # apply the 2.6.13-rc2 patch
ian@0 378 # the kernel is now 2.6.13-rc2
ian@0 379 $ patch -p1 < ../patch-2.6.13-rc2-git3 # apply the 2.6.13-rc2-git3 patch
ian@0 380 # the kernel is now 2.6.13-rc2-git3
ian@0 381 $ cd ..
ian@0 382 $ mv linux-2.6.12-git1 linux-2.6.13-rc2-git3 # rename source dir
ian@0 383
ian@0 384
ian@0 385 The -mm kernels
ian@0 386 ---
ian@0 387 These are experimental kernels released by Andrew Morton.
ian@0 388
ian@0 389 The -mm tree serves as a sort of proving ground for new features and other
ian@0 390 experimental patches.
ian@0 391 Once a patch has proved its worth in -mm for a while Andrew pushes it on to
ian@0 392 Linus for inclusion in mainline.
ian@0 393
ian@0 394 Although it's encouraged that patches flow to Linus via the -mm tree, this
ian@0 395 is not always enforced.
ian@0 396 Subsystem maintainers (or individuals) sometimes push their patches directly
ian@0 397 to Linus, even though (or after) they have been merged and tested in -mm (or
ian@0 398 sometimes even without prior testing in -mm).
ian@0 399
ian@0 400 You should generally strive to get your patches into mainline via -mm to
ian@0 401 ensure maximum testing.
ian@0 402
ian@0 403 This branch is in constant flux and contains many experimental features, a
ian@0 404 lot of debugging patches not appropriate for mainline etc., and is the most
ian@0 405 experimental of the branches described in this document.
ian@0 406
ian@0 407 These kernels are not appropriate for use on systems that are supposed to be
ian@0 408 stable and they are more risky to run than any of the other branches (make
ian@0 409 sure you have up-to-date backups -- that goes for any experimental kernel but
ian@0 410 even more so for -mm kernels).
ian@0 411
ian@0 412 These kernels in addition to all the other experimental patches they contain
ian@0 413 usually also contain any changes in the mainline -git kernels available at
ian@0 414 the time of release.
ian@0 415
ian@0 416 Testing of -mm kernels is greatly appreciated since the whole point of the
ian@0 417 tree is to weed out regressions, crashes, data corruption bugs, build
ian@0 418 breakage (and any other bug in general) before changes are merged into the
ian@0 419 more stable mainline Linus tree.
ian@0 420 But testers of -mm should be aware that breakage in this tree is more common
ian@0 421 than in any other tree.
ian@0 422
ian@0 423 The -mm kernels are not released on a fixed schedule, but usually a few -mm
ian@0 424 kernels are released in between each -rc kernel (1 to 3 is common).
ian@0 425 The -mm kernels apply to either a base 2.6.x kernel (when no -rc kernels
ian@0 426 have been released yet) or to a Linus -rc kernel.
ian@0 427
ian@0 428 Here are some examples of applying the -mm patches:
ian@0 429
ian@0 430 # moving from 2.6.12 to 2.6.12-mm1
ian@0 431 $ cd ~/linux-2.6.12 # change to the 2.6.12 source dir
ian@0 432 $ patch -p1 < ../2.6.12-mm1 # apply the 2.6.12-mm1 patch
ian@0 433 $ cd ..
ian@0 434 $ mv linux-2.6.12 linux-2.6.12-mm1 # rename the source appropriately
ian@0 435
ian@0 436 # moving from 2.6.12-mm1 to 2.6.13-rc3-mm3
ian@0 437 $ cd ~/linux-2.6.12-mm1
ian@0 438 $ patch -p1 -R < ../2.6.12-mm1 # revert the 2.6.12-mm1 patch
ian@0 439 # we now have a 2.6.12 source
ian@0 440 $ patch -p1 < ../patch-2.6.13-rc3 # apply the 2.6.13-rc3 patch
ian@0 441 # we now have a 2.6.13-rc3 source
ian@0 442 $ patch -p1 < ../2.6.13-rc3-mm3 # apply the 2.6.13-rc3-mm3 patch
ian@0 443 $ cd ..
ian@0 444 $ mv linux-2.6.12-mm1 linux-2.6.13-rc3-mm3 # rename the source dir
ian@0 445
ian@0 446
ian@0 447 This concludes this list of explanations of the various kernel trees.
ian@0 448 I hope you are now clear on how to apply the various patches and help testing
ian@0 449 the kernel.
ian@0 450
ian@0 451 Thank you's to Randy Dunlap, Rolf Eike Beer, Linus Torvalds, Bodo Eggert,
ian@0 452 Johannes Stezenbach, Grant Coady, Pavel Machek and others that I may have
ian@0 453 forgotten for their reviews and contributions to this document.
ian@0 454