Skip to content

RFC low memory notify

Minchan Kim linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 58 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3/dev/low_mem_notifydrivers/char/mem.c include/linux/low_mem_notify.h mm/Kconfig +2 more+82 -045 replies
2/3vmscan hookmm/vmscan.c+28 -09 replies
3/3test programpoll.c+121 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/3] low memory notify

As you can see, it's respin of mem_notify core of KOSAKI and Marcelo. (Of course, KOSAKI's original patchset includes more logics but I didn't include all things intentionally because I want to start from beginning again) Recently, there are some requirements of notification of system memory pressure. It would be very useful for various cases.
For example, QEMU/JVM/Firefox like big memory hogger can release their memory when memory pressure happens. Another example in embedded side, they can close background application. For this, there are some trial but we need more general one and not-hacked alloc/free hot path.

I think most big problem of system slowness is swap-in operation. Swap-in is a synchronous operation so application's latency would be big. Solution for that is prevent swap-out itself. We couldn't prevent swapout totally but could reduce it with this patch.

In case of swapless system, code page is very important for system response. So we have to keep code page, too. I used very naive heuristic in this patch but welcome to any idea.

I want to make kernel logic simple if possible and just notify to user space. Of course, there are lots of thing we have to consider but for discussion this simple patch would be a good start point.

This version is totally RFC so any comments are welcome.

Minchan Kim (3):
[RFC 1/3] /dev/low_mem_notify
[RFC 2/3] vmscan hook
[RFC 3/3] test program

 drivers/char/mem.c             |    7 ++
 include/linux/low_mem_notify.h |    6 ++
 mm/Kconfig                     |    7 ++
 mm/Makefile                    |    1 +
 mm/low_mem_notify.c            |   61 ++++++++++++++++++++
 mm/vmscan.c                    |   28 +++++++++
 poll.c                         |  121 ++++++++++++++++++++++++++++++++++++++++
 7 files changed, 231 insertions(+), 0 deletions(-)
 create mode 100644 include/linux/low_mem_notify.h
 create mode 100644 mm/low_mem_notify.c
 create mode 100644 poll.c
Signature · 8 lines
1.7.7.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>