From patchwork Fri Apr 28 22:15:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 98377 Delivered-To: patches@linaro.org Received: by 10.140.109.52 with SMTP id k49csp470510qgf; Fri, 28 Apr 2017 15:15:47 -0700 (PDT) X-Received: by 10.84.229.71 with SMTP id d7mr18120565pln.92.1493417747316; Fri, 28 Apr 2017 15:15:47 -0700 (PDT) Return-Path: Received: from mail-pg0-x233.google.com (mail-pg0-x233.google.com. [2607:f8b0:400e:c05::233]) by mx.google.com with ESMTPS id t6si860419pgo.208.2017.04.28.15.15.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Apr 2017 15:15:47 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::233 as permitted sender) client-ip=2607:f8b0:400e:c05::233; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::233 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-pg0-x233.google.com with SMTP id t7so20862370pgt.3 for ; Fri, 28 Apr 2017 15:15:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Pk+C1GNNDw9rc01KF5hvL2KV+78OS199rt63o+x4hNE=; b=J5wNA8/JIZI0wHByLBVYnm/xrxrZyyaVFfW7Nhgk4wyo2TNNE9wBAzk4EDajn8XEuE t8hiWthjaf+qwhUMxCydb+DtmGY10OvvMri3PxurVcJQeI0R5/3/jvYRuamhoOn4/gcj 7RRVGR/X/qsDRcbVeN+IuLytn1B/l9c4hLF5g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Pk+C1GNNDw9rc01KF5hvL2KV+78OS199rt63o+x4hNE=; b=aMbESkShO9c7a+1BG0osSRySoJ8X1f04pg03ksGSk3EpMALbpSKNrDUelMR9WWKISm XZaNdNegL+Y5xc0eUhNQTnU71/ZfSZMXEv35R9EAqhPdJYSAfZs2a42DgVJLLPAB8WOl Cn3RxiYZAeSqgW1iCyhS1tCVOhl2dCpiAGw/EnMI1T7q7B6xR8k8AJS4x63oj2uozVFw KvCsRLmhGrDIYLXvIaGywx2RkYFVtogl2hKxG1nQ2IIXTVYgGbFy4rEUl/DzwikfwZAQ hW0AiTxzPntAR36HSJSk18Rpha2Ez5ahilFe+rh3fDi6tt2zMG3NouvHVcW0+3onkzXt eaSg== X-Gm-Message-State: AN3rC/5A9pEVSNAe3sKUp7lYP3boQKTcP5cfVFZZqJuNBEdrWL6QLbQv RyNEuAvIv52+Vbyb3Ic= X-Received: by 10.99.0.3 with SMTP id 3mr655898pga.57.1493417746897; Fri, 28 Apr 2017 15:15:46 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id r131sm11091834pgr.67.2017.04.28.15.15.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Apr 2017 15:15:45 -0700 (PDT) From: John Stultz To: Cc: John Stultz , Rob Herring , Sumit Semwal , Vishal Bhoj , Amit Pundir Subject: [PATCH] device.mk: Add options to make things perform a bit better in lowmemory situations Date: Fri, 28 Apr 2017 15:15:43 -0700 Message-Id: <1493417743-19617-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 With the db410c especially, the memory constraints are very tight, so try to eek out a bit more memory by setting some options suggested by Bero. Cc: Rob Herring Cc: Sumit Semwal Cc: Vishal Bhoj Cc: Amit Pundir Signed-off-by: John Stultz --- Kconfig | 7 +++++++ configs/db410c_defconfig | 1 + device.mk | 8 ++++++++ 3 files changed, 16 insertions(+) -- 2.7.4 diff --git a/Kconfig b/Kconfig index 555127a..b0b48f3 100644 --- a/Kconfig +++ b/Kconfig @@ -143,6 +143,13 @@ config DALVIK_VM_HEAPGROWTHLIMIT help Typically this is less than half the heap size. +config LOWMEM_CONFIG + bool "Enable Lowmem Configuration" + default false + help + Enables some of the reccomended low-memory options for devices + with 1GB or less RAM. + endmenu menu "Image Configuration" diff --git a/configs/db410c_defconfig b/configs/db410c_defconfig index 2923287..e13ad04 100644 --- a/configs/db410c_defconfig +++ b/configs/db410c_defconfig @@ -1,5 +1,6 @@ CONFIG_PRODUCT_DEVICE="db410c" CONFIG_DALVIK_VM_HEAPSIZE=32 +CONFIG_LOWMEM_CONFIG=y CONFIG_BOARD_SYSTEMIMAGE_PARTITION_SIZE=1288491008 CONFIG_BOARD_USERDATAIMAGE_PARTITION_SIZE=5653544960 CONFIG_KERNEL=y diff --git a/device.mk b/device.mk index 1071301..85a74d9 100644 --- a/device.mk +++ b/device.mk @@ -75,6 +75,14 @@ PRODUCT_PROPERTY_OVERRIDES += \ dalvik.vm.heapminfree=512k \ dalvik.vm.heapmaxfree=$(CONFIG_DALVIK_VM_HEAPMAXFREE)m + +ifneq ($(CONFIG_LOWRAM_CONFIG),) +PRODUCT_PROPERTY_OVERRIDES += \ + ro.config.low_ram=true \ + dalvik.vm.jit.codecachesize=0 \ +endif + + subdirs-true := lights graphics subdirs-$(CONFIG_WIFI) += wifi subdirs-$(CONFIG_ETHERNET) += ethernet