Skip to content

Instantly share code, notes, and snippets.

@skottler
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skottler/4a831d1587772789c169 to your computer and use it in GitHub Desktop.
Save skottler/4a831d1587772789c169 to your computer and use it in GitHub Desktop.

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
Copy link

agh commented Dec 11, 2014

@jake-minted
Copy link

Reboot-less kernel patches?

@skottler
Copy link
Author

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

@jake-minted
Copy link

@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
Copy link
Author

@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