public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabio Rossi" <rossi.f@inwind.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/vmware:master commit in: app-emulation/vmware-modules/files/, app-emulation/vmware-modules/
Date: Thu,  9 Nov 2017 21:56:42 +0000 (UTC)	[thread overview]
Message-ID: <1509750987.f1e55c55662305fc41f64d9bbb074a28ed5a462c.fabio@gentoo> (raw)

commit:     f1e55c55662305fc41f64d9bbb074a28ed5a462c
Author:     Fabio Rossi <rossi.f <AT> inwind <DOT> it>
AuthorDate: Fri Nov  3 23:16:27 2017 +0000
Commit:     Fabio Rossi <rossi.f <AT> inwind <DOT> net>
CommitDate: Fri Nov  3 23:16:27 2017 +0000
URL:        https://gitweb.gentoo.org/proj/vmware.git/commit/?id=f1e55c55

app-emulation/vmware-modules: fix page accounting

Found a possibile problem with future vmware v14 products, at a certain point a
virtual machine remains without memory. See for example:

https://communities.vmware.com/thread/573281
https://superuser.com/questions/1255099/vmware-workstation-not-enough-physical-memory-since-last-update/1255963

To solve the issue I have inserted three of the patches available from
https://github.com/mkubecek/vmware-host-modules/commit/b50848c985f1
Thanks to mkubecek.

 .../files/308-4.08-00-vmmon-fix-page-accounting.patch | 19 +++++++++++++++++++
 .../files/308-4.13-01-vmmon-fix-page-accounting.patch | 14 ++++++++++++++
 .../vmware-modules/vmware-modules-308.5.7.ebuild      |  2 ++
 3 files changed, 35 insertions(+)

diff --git a/app-emulation/vmware-modules/files/308-4.08-00-vmmon-fix-page-accounting.patch b/app-emulation/vmware-modules/files/308-4.08-00-vmmon-fix-page-accounting.patch
new file mode 100644
index 0000000..7d653f4
--- /dev/null
+++ b/app-emulation/vmware-modules/files/308-4.08-00-vmmon-fix-page-accounting.patch
@@ -0,0 +1,19 @@
+--- vmmon-only/linux/hostif.c	2017-10-26 00:01:58.466448868 +0200
++++ vmmon-only/linux/hostif.c.new	2017-10-26 00:10:42.874478191 +0200
+@@ -1597,11 +1597,15 @@
+       BYTES_2_PAGES(vm->memInfo.hugePageBytes);
+    unsigned int lockedPages = global_page_state(NR_PAGETABLE) +
+                               global_page_state(NR_SLAB_UNRECLAIMABLE) +
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++                              global_node_page_state(NR_UNEVICTABLE) +
++#else
+                               global_page_state(NR_UNEVICTABLE) +
++#endif
+                               hugePages + reservedPages;
+    unsigned int anonPages =
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+-      global_page_state(NR_ANON_MAPPED);
++      global_node_page_state(NR_ANON_MAPPED);
+ #else
+       global_page_state(NR_ANON_PAGES);
+ #endif

diff --git a/app-emulation/vmware-modules/files/308-4.13-01-vmmon-fix-page-accounting.patch b/app-emulation/vmware-modules/files/308-4.13-01-vmmon-fix-page-accounting.patch
new file mode 100644
index 0000000..050a828
--- /dev/null
+++ b/app-emulation/vmware-modules/files/308-4.13-01-vmmon-fix-page-accounting.patch
@@ -0,0 +1,14 @@
+--- vmmon-only/linux/hostif.c	2017-10-26 00:16:39.496498131 +0200
++++ vmmon-only/linux/hostif.c.new	2017-10-26 00:20:35.154511309 +0200
+@@ -1596,7 +1596,11 @@
+    unsigned int hugePages = (vm == NULL) ? 0 :
+       BYTES_2_PAGES(vm->memInfo.hugePageBytes);
+    unsigned int lockedPages = global_page_state(NR_PAGETABLE) +
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
++                              global_node_page_state(NR_SLAB_UNRECLAIMABLE) +
++#else
+                               global_page_state(NR_SLAB_UNRECLAIMABLE) +
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+                               global_node_page_state(NR_UNEVICTABLE) +
+ #else

diff --git a/app-emulation/vmware-modules/vmware-modules-308.5.7.ebuild b/app-emulation/vmware-modules/vmware-modules-308.5.7.ebuild
index d7ebd9f..8987a1d 100644
--- a/app-emulation/vmware-modules/vmware-modules-308.5.7.ebuild
+++ b/app-emulation/vmware-modules/vmware-modules-308.5.7.ebuild
@@ -102,6 +102,7 @@ src_prepare() {
 	kernel_is ge 4 5 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.05-00-vmblock-follow_link.patch"
 	kernel_is ge 4 6 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.06-00-user-pages.patch"
 	kernel_is ge 4 7 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.07-01-readlink_copy.patch"
+	kernel_is ge 4 8 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.08-00-vmmon-fix-page-accounting.patch"
 	kernel_is ge 4 9 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.09-00-user-pages.patch"
 	kernel_is ge 4 10 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.10-00-generic_readlink.patch"
 	kernel_is ge 4 11 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.11-00-missing-headers.patch"
@@ -110,6 +111,7 @@ src_prepare() {
 	kernel_is ge 4 12 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.12-01-vmci-do_once.patch"
 	kernel_is ge 4 12 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.12-02-vmci-pci_enable_msix.patch"
 	kernel_is ge 4 13 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.13-00-vmnet-refcount.patch"
+	kernel_is ge 4 13 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.13-01-vmmon-fix-page-accounting.patch"
 
 	# Allow user patches so they can support RC kernels and whatever else
 	epatch_user


             reply	other threads:[~2017-11-09 21:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 21:56 Fabio Rossi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-12-05  0:16 [gentoo-commits] proj/vmware:master commit in: app-emulation/vmware-modules/files/, app-emulation/vmware-modules/ Fabio Rossi
2017-11-09 21:56 Fabio Rossi
2017-11-09 21:56 Fabio Rossi
2017-08-22 10:02 Fabio Rossi
2016-08-05  7:29 Fabio Rossi
2016-05-30 21:52 Fabio Rossi
2016-03-18 23:33 Andreas Hüttel
2016-03-18  3:16 Evan Teran
2016-03-17  2:03 Evan Teran
2016-03-17  1:44 Evan Teran
2015-07-10 23:42 Evan Teran
2015-07-10 23:17 Evan Teran
2014-10-11 21:54 Evan Teran
2014-10-11 15:52 Evan Teran
2014-10-11 15:52 Evan Teran
2014-10-10 13:55 Evan Teran
2014-10-10 13:55 Evan Teran
2014-10-10 13:55 Evan Teran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1509750987.f1e55c55662305fc41f64d9bbb074a28ed5a462c.fabio@gentoo \
    --to=rossi.f@inwind.net \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox