Igor Redko
65dd14f28b
mm/page_alloc.c: calculate 'available' memory in a separate function
...
commit d02bd27bd33dd7e8d22594cd568b81be0cb584cd upstream.
Add a new field, VIRTIO_BALLOON_S_AVAIL, to virtio_balloon memory
statistics protocol, corresponding to 'Available' in /proc/meminfo.
It indicates to the hypervisor how big the balloon can be inflated
without pushing the guest system to swap. This metric would be very
useful in VM orchestration software to improve memory management of
different VMs under overcommit.
This patch (of 2):
Factor out calculation of the available memory counter into a separate
exportable function, in order to be able to use it in other parts of the
kernel.
In particular, it appears a relevant metric to report to the hypervisor
via virtio-balloon statistics interface (in a followup patch).
Signed-off-by: Igor Redko <redkoi@virtuozzo.com >
Signed-off-by: Denis V. Lunev <den@openvz.org >
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com >
Cc: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
[bwh: Backported to 4.4 as dependency of commit a1078e821b60
"xen: let alloc_xenballooned_pages() fail if not enough memory free"]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Signed-off-by: Lee Jones <lee.jones@linaro.org >
Change-Id: Ib8cae94ddd9742752ecc795129be642c57f8cc15
2020-09-23 18:05:05 +02:00
..
2019-08-06 12:33:17 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:22:45 +02:00
2019-08-02 15:14:10 +02:00
2019-08-08 15:00:19 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-09 09:14:19 +02:00
2019-08-09 09:13:49 +02:00
2019-08-09 09:14:12 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 11:41:21 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 17:28:13 +02:00
2020-09-23 18:05:04 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 11:41:21 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:22:29 +02:00
2019-08-05 14:20:47 +02:00
2014-10-30 22:27:18 -07:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-23 13:20:00 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 15:09:54 +02:00
2020-09-23 18:05:05 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:21:54 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:22:44 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 17:28:13 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 10:44:47 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-08-08 14:52:26 +02:00
2015-08-31 11:08:11 -07:00
2014-08-18 10:34:41 -07:00
2019-08-08 12:19:52 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-08 15:09:54 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 12:31:21 +02:00
2019-08-02 15:14:10 +02:00
2020-09-23 17:37:32 +02:00
2019-08-08 15:08:49 +02:00
2019-08-05 14:21:58 +02:00
2014-07-10 14:09:27 -07:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2020-09-23 17:37:30 +02:00
2019-08-06 12:26:38 +02:00
2019-08-08 15:28:37 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 10:44:15 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-08 12:42:04 +02:00
2019-08-08 16:37:24 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 12:26:30 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2020-08-08 16:42:50 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 09:12:32 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 11:41:21 +02:00
2020-08-08 16:42:41 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2020-03-07 17:53:58 +01:00
2019-08-02 15:14:10 +02:00
2014-05-04 17:58:19 -07:00
2020-08-08 16:42:41 +02:00
2015-09-15 15:39:48 +05:30
2019-08-05 14:20:47 +02:00
2020-09-23 17:28:13 +02:00
2020-08-08 16:42:40 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2020-09-23 17:38:55 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 12:31:22 +02:00
2020-09-23 17:28:13 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 10:41:58 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 12:42:04 +02:00
2015-06-30 12:52:32 +05:30
2019-08-05 14:22:45 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 10:44:38 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 18:05:05 +02:00
2020-09-23 17:38:52 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2014-09-24 12:31:25 +05:30
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 18:05:05 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 18:05:05 +02:00
2019-08-06 11:41:21 +02:00
2019-08-08 16:37:23 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 10:44:40 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2015-09-13 06:52:56 -07:00
2015-09-08 17:05:31 +05:30
2019-08-02 15:14:10 +02:00
2014-05-26 14:03:44 +03:00
2016-01-05 17:20:05 +05:30
2014-11-11 14:48:15 +05:30
2014-08-13 14:35:04 +05:30
2014-05-04 20:17:00 -07:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 10:44:34 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-09 09:14:03 +02:00
2019-08-09 09:13:53 +02:00
2019-08-09 09:14:03 +02:00
2019-08-09 09:13:49 +02:00
2020-09-23 17:28:13 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 17:28:13 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 15:08:48 +02:00
2019-08-06 11:41:21 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 12:09:23 +02:00
2020-09-23 18:05:05 +02:00
2019-08-06 08:16:29 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 09:12:33 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2020-03-07 14:01:44 +01:00
2014-06-22 16:43:52 +03:00
2015-09-11 14:44:24 +05:30
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 11:41:21 +02:00
2019-08-06 11:41:21 +02:00
2019-08-06 11:41:21 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2020-09-23 17:32:09 +02:00
2020-09-23 17:32:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 15:08:07 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 09:13:24 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:22:31 +02:00
2014-07-10 14:09:27 -07:00
2015-06-08 03:45:59 -07:00
2014-03-18 16:33:15 -07:00
2014-03-25 13:24:56 -07:00
2020-09-23 17:28:13 +02:00
2020-09-23 17:32:07 +02:00
2019-08-08 15:09:49 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 12:42:04 +02:00
2014-07-21 21:46:54 +05:30
2014-07-21 21:46:54 +05:30
2014-07-21 21:44:54 +05:30
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2015-09-15 15:39:48 +05:30
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-08 15:08:49 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 11:41:21 +02:00
2020-09-23 18:05:05 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:22:41 +02:00
2019-08-02 15:14:10 +02:00
2019-08-08 15:03:06 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 17:37:32 +02:00
2019-08-08 12:09:25 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 09:13:25 +02:00
2020-05-20 09:44:20 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-09 12:04:49 +02:00
2019-08-05 09:12:31 +02:00
2019-08-05 14:20:47 +02:00
2014-07-22 14:33:44 -06:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2020-09-23 17:28:13 +02:00
2019-08-08 12:09:30 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2020-09-23 18:05:05 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2014-11-13 14:53:50 +05:30
2020-09-23 17:38:52 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 12:24:29 +02:00
2019-08-09 12:04:26 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2019-08-06 12:26:30 +02:00
2019-08-05 14:20:47 +02:00
2019-08-08 15:08:48 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-03-07 14:01:44 +01:00
2015-09-11 14:44:24 +05:30
2015-09-11 14:44:24 +05:30
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 18:05:05 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-08 15:00:18 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-04 19:49:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-05 14:20:47 +02:00
2020-09-23 17:32:06 +02:00
2019-08-05 14:20:47 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-02 15:14:10 +02:00
2019-08-06 08:16:29 +02:00
2019-08-06 08:16:29 +02:00
2019-08-06 08:17:38 +02:00