Skip to content

Instantly share code, notes, and snippets.

@skottler skottler/patch-it.md
Last active Aug 29, 2015

Embed
What would you like to do?

Before:

samkottler@ubuntu:~$ cat /proc/meminfo
MemTotal:        2042728 kB
MemFree:          599932 kB
Buffers:           33268 kB
Cached:          1240816 kB
SwapCached:         3396 kB
Active:          1051100 kB
Inactive:         238268 kB

sudo kpatch load kpatch-available-mem.ko

After:

samkottler@ubuntu:~$ cat /proc/meminfo
MemTotal:        2042728 kB
MemFree:          599576 kB
MemAvailable:    1798976 kB
Buffers:           33272 kB
Cached:          1240816 kB
SwapCached:         3396 kB
Active:          1051320 kB
Inactive:         238168 kB
@agh

This comment has been minimized.

Copy link

agh commented Dec 11, 2014

@jake-minted

This comment has been minimized.

Copy link

jake-minted commented Dec 12, 2014

Reboot-less kernel patches?

@skottler

This comment has been minimized.

Copy link
Owner Author

skottler commented Dec 12, 2014

@jake-minted yep! we have been testing it and this was a pretty simple test (adding MemAvailable).

@jake-minted

This comment has been minimized.

Copy link

jake-minted commented Dec 12, 2014

@skottler Nice! Was looking at that for kernel updates of legacy metal servers the other day. Assuming same process wouldn't work for binary kernels though?

@skottler

This comment has been minimized.

Copy link
Owner Author

skottler commented Dec 12, 2014

@jake-minted it works with any kernel with loadable module support enabled at build time, this example runs it against the stock 3.13 kernel shipped with ubuntu. There are some limitations - ping me on freenode (samkottler) and we can chat more about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.