summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhang Nguyen <khang.nguyen.xv@rvc.renesas.com>2017-12-22 15:44:41 +0700
committerThuy Tran <thuy.tran.xh@rvc.renesas.com>2018-01-30 10:07:59 +0700
commit4f9d2b579a600b4fd32f2a92b83378d488a82bff (patch)
treea114fe45e03d82dc7c733def22d96397e77466ba
parent4f50fe1d6f208f535d663325288e34fce4f0c358 (diff)
rcar-gen3: dbus: WORKAROUND to fix memory leak issue
In Yocto v3.4.0, memory leak occurs when restarting Weston: | root@salvator-x:~# cat /proc/meminfo | grep Cma | CmaTotal: 671744 kB | CmaFree: 629788 kB | root@salvator-x:~# | root@salvator-x:~# systemctl restart weston | root@salvator-x:~# | root@salvator-x:~# cat /proc/meminfo | grep Cma | CmaTotal: 671744 kB | CmaFree: 599404 kB It will make Weston crash because out of memory if restarting many times. This patch is a WORKAROUND to avoid the issue, it restarts dbus depend on Weston and memory will be released properly. Signed-off-by: Thao Nguyen <thao.nguyen.yb@renesas.com> Signed-off-by: Khang Nguyen <khang.nguyen.xv@rvc.renesas.com> Signed-off-by: Takamitsu Honda <takamitsu.honda.pv@renesas.com>
-rw-r--r--meta-rcar-gen3/recipes-core/dbus/dbus_1.10.20.bbappend12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta-rcar-gen3/recipes-core/dbus/dbus_1.10.20.bbappend b/meta-rcar-gen3/recipes-core/dbus/dbus_1.10.20.bbappend
new file mode 100644
index 0000000..66183b1
--- /dev/null
+++ b/meta-rcar-gen3/recipes-core/dbus/dbus_1.10.20.bbappend
@@ -0,0 +1,12 @@
+# WORKAROUND for memory leak issue when restart weston
+
+# Make sure the WORKAROUND only effect with GFX and MMP config
+ENABLE_FIX = "${@'1' if 'gsx' in '${MACHINE_FEATURES}' else '0'}"
+
+# Modify dbus.service to make dbus restarts depend on weston
+do_install_prepend() {
+ if [ "X${ENABLE_FIX}" = "X1" ]; then
+ sed -e "/Requires=dbus.socket/a PartOf=weston.service" \
+ -i ${B}/bus/dbus.service
+ fi
+}