Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio update from Michael Tsirkin:
"This adds reporting hugepage stats to virtio-balloon"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
virtio_balloon: export hugetlb page allocation counts

+9 -1
+6
drivers/virtio/virtio_balloon.c
··· 272 272 pages_to_bytes(events[PSWPOUT])); 273 273 update_stat(vb, idx++, VIRTIO_BALLOON_S_MAJFLT, events[PGMAJFAULT]); 274 274 update_stat(vb, idx++, VIRTIO_BALLOON_S_MINFLT, events[PGFAULT]); 275 + #ifdef CONFIG_HUGETLB_PAGE 276 + update_stat(vb, idx++, VIRTIO_BALLOON_S_HTLB_PGALLOC, 277 + events[HTLB_BUDDY_PGALLOC]); 278 + update_stat(vb, idx++, VIRTIO_BALLOON_S_HTLB_PGFAIL, 279 + events[HTLB_BUDDY_PGALLOC_FAIL]); 280 + #endif 275 281 #endif 276 282 update_stat(vb, idx++, VIRTIO_BALLOON_S_MEMFREE, 277 283 pages_to_bytes(i.freeram));
+3 -1
include/uapi/linux/virtio_balloon.h
··· 53 53 #define VIRTIO_BALLOON_S_MEMTOT 5 /* Total amount of memory */ 54 54 #define VIRTIO_BALLOON_S_AVAIL 6 /* Available memory as in /proc */ 55 55 #define VIRTIO_BALLOON_S_CACHES 7 /* Disk caches */ 56 - #define VIRTIO_BALLOON_S_NR 8 56 + #define VIRTIO_BALLOON_S_HTLB_PGALLOC 8 /* Hugetlb page allocations */ 57 + #define VIRTIO_BALLOON_S_HTLB_PGFAIL 9 /* Hugetlb page allocation failures */ 58 + #define VIRTIO_BALLOON_S_NR 10 57 59 58 60 /* 59 61 * Memory statistics structure.