From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 829E61396D9 for ; Thu, 9 Nov 2017 21:56:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E816AE0E1A; Thu, 9 Nov 2017 21:56:45 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B4477E0E1A for ; Thu, 9 Nov 2017 21:56:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 23FE733BF0F for ; Thu, 9 Nov 2017 21:56:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BBEF0988A for ; Thu, 9 Nov 2017 21:56:42 +0000 (UTC) From: "Fabio Rossi" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabio Rossi" Message-ID: <1509750987.f1e55c55662305fc41f64d9bbb074a28ed5a462c.fabio@gentoo> Subject: [gentoo-commits] proj/vmware:master commit in: app-emulation/vmware-modules/files/, app-emulation/vmware-modules/ X-VCS-Repository: proj/vmware X-VCS-Files: app-emulation/vmware-modules/files/308-4.08-00-vmmon-fix-page-accounting.patch app-emulation/vmware-modules/files/308-4.13-01-vmmon-fix-page-accounting.patch app-emulation/vmware-modules/vmware-modules-308.5.7.ebuild X-VCS-Directories: app-emulation/vmware-modules/files/ app-emulation/vmware-modules/ X-VCS-Committer: fabio X-VCS-Committer-Name: Fabio Rossi X-VCS-Revision: f1e55c55662305fc41f64d9bbb074a28ed5a462c X-VCS-Branch: master Date: Thu, 9 Nov 2017 21:56:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c648b7a1-c687-4e40-97de-3c91ce5d36eb X-Archives-Hash: 3c8bf03e76b6b2b4de1f8bbbb473360a commit: f1e55c55662305fc41f64d9bbb074a28ed5a462c Author: Fabio Rossi inwind it> AuthorDate: Fri Nov 3 23:16:27 2017 +0000 Commit: Fabio Rossi inwind 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