Commit Graph

16 Commits

Author SHA1 Message Date
Tao Zeng 12ef9a846e zram: add a mixed zram compressor [1/1]
PD#SWPL-145324

Problem:
zstd is high compress ratio but low speed, lz4 is fast but low
compress ratio. Need balance them.

Solution:
Add a mixed crypto layer and can set ratio of lz4/zstd

Verify:
t5m

Change-Id: I4fbe930d05ef66336acacaae640fa47855d4b47b
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
2023-11-27 18:59:13 +08:00
xinli.gao 70482b1592 gpu: remove fixed-area [1/1]
PD#SWPL-120307

Problem:
GPU no longer uses fixed-area

Solution:
Remove fixed-ared

Verify:
t5m

Change-Id: If7634558ebf89078dc2d1eb9256f382227a2f7f5
Signed-off-by: xinli.gao <xinli.gao@amlogic.com>
2023-04-19 22:11:36 -07:00
qiankun.wang 23002feac1 mem_debug: The printk is missing some content [1/1]
PD#SWPL-113705

Problem:
In the boot log, characters are missing when printing
due to long strings

Solution:
Print the string in some parts.

Verify:
SC2

Change-Id: I2989ac089598d3f2b97eaa98fcf923ff4c7963c8
Signed-off-by: qiankun.wang <qiankun.wang@amlogic.com>
2023-03-16 02:22:13 -07:00
Jianxiong Pan 4155373e45 mm: add dma_pcie_ops for pcie whitelist. [1/1]
PD#SWPL-103303

Problem:
restrict pcie access to fixed area memory.

Solution:
add dma_pcie_ops for pcie whitelist.

Verify:
t3_ar321.

Change-Id: I1a2f8146359e403a706d640eb4674f959c35b839
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2023-01-07 06:19:05 -08:00
xinli.gao c4bd10f808 GPU: provide an api to allocate memory from a fixed area [1/1]
PD#SWPL-106500

Problem:
want to allocate memory from a fixed area in asymmetric system.

Solution:
declare cma area in asymmetric memory, and provide api

Verify:
t5m

Change-Id: I785e95a7f01ceff3a135b65c012ddb0b94be92da
Signed-off-by: xinli.gao <xinli.gao@amlogic.com>
2023-01-04 22:24:58 -08:00
Wanwei Jiang c780df0b08 memory: combine memory_ext addr_tool and reg_access modules [1/1]
PD#SWPL-95684

Problem:
combine memory_ext addr_tool and reg_access modules

Solution:
result: amlogic-memory-debug.ko
original:
	file_cache.ko
	watch_point.ko
	amlogic-reg.ko
	amlogic-ddr.ko

Verify:
sc2/s4d

Change-Id: Id143e085dd26c0b57631dbab4c003534905d0661
Signed-off-by: Wanwei Jiang <wanwei.jiang@amlogic.com>
2022-11-05 12:31:14 +08:00
Jianxiong Pan 2271989942 mm: pin locked file after fault. [2/2]
PD#SWPL-95400

Problem:
If we pin a file in android, the whole data of this file
will be loaded to DDR, but most of these data may not be
used, this caused memory waste.

Solution:
delay mark mlocked flags for unevictable pages until
it has been faulted.
You can use following command to disable this function:
echo 0 > /proc/sys/vm/shrink_unevictable

Verify:
sc2_ah212.

Change-Id: I3981b36114ab331c558198b80140aaa91fe7e7df
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2022-10-18 13:46:23 +08:00
Jianxiong Pan eda3eea39c mm: add watch point module. [2/2]
PD#SWPL-76021

Problem:
need add watch point driver.

Solution:
porting watch point driver.

Verify:
s4_ap222.

Change-Id: Ie4220735d607c8b865209d43f314eaad41a29a9a
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2022-03-25 03:49:06 -07:00
Jianxiong Pan 1100e5c44e mm: add user fault debug support. [2/2]
PD#SWPL-73676

Problem:
need user fault debug support.

Solution:
add user fault debug support.

Verify:
local.

Change-Id: I3741ef675c174b8e30f352f8d193aab0318cff9a
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2022-03-07 09:50:41 +08:00
Jianxiong Pan 5ff1e95368 mm: forward memory reclaim process. [1/2]
PD#SWPL-73189

Problem:
memory reclaim process is usually do when first allocate failed from buddy.
This will cause some process crash especially when memory is low, because
there is not enough time to do reclaim process.

Solution:
try to wake up kswapd process to reclaim memory if free memory is less
than high water mark. After apply this change, free memory is usually
keeps high than high_water mark.

Verify:
local.

Change-Id: I9c5f90bba778aacfe21aacb332ed19ad162b048b
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
2022-02-27 23:18:43 -07:00
Jianxiong Pan ac2fc01c28 mm: add file cache statistic support. [1/1]
PD#SWPL-72350

Problem:
add a tool to list how many memory cache files used in file
cache.
console:/ # cat /proc/filecache

Solution:
porting file cache from 5.4.

Verify:
local.

Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
Change-Id: I92420acab7333b75bbb5bca1075d3e401b027fb2
2022-02-22 23:03:03 -07:00
Tao Zeng d31b9dd061 mm: add vmap stack support [2/2]
PD#SWPL-70022

Problem:
No vmap stack support on 5.15

Solution:
Porting it from 5.4

Verify:
local

Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Change-Id: Ie75bedb3072dfd90a5d74b64684c233186aada81

Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Change-Id: I78552ad490938c455178e56395ff63e60b62a320
2022-02-22 21:39:53 -07:00
Jianxiong Pan d07381ec22 mm: add mem debug support. [1/1]
PD#SWPL-72254

Problem:
no mem debug on kernel5.15.

Solution:
porting mem debug from 5.4.

Verify:
local.

Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
Change-Id: Ie625011e90df9203686acbe52997149527a38daa
2022-02-21 22:15:47 -07:00
Tao Zeng f39397f1ec mm: add cma optimization from 5.4 [2/2]
PD#SWPL-70022

Problem:
No cma optimization on 5.15

Solution:
1, add aml optimized cma driver, including use multi-core cma allocation
   and quick cma free code;
2, add some interfaces for kernel mm logic change and porting some
   interface to other driver usage.

Verify:
local

Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Change-Id: I81cba90b1493f0dd81b61e5d24bc5eb455cdccc7
2022-02-15 15:51:02 +08:00
Tao Zeng 406bb47837 mm: add slab trace support [2/2]
PD#SWPL-70022

Problem:
No slab trace on 5.15 kernel

Solution:
Porting it from 5.4

Verify:
local

Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Change-Id: I25b732530f1253df24fbb2cd7d8d87c11fedccce
2022-02-15 00:29:08 -07:00
Tao Zeng 0a649a2a65 mm: add pagetrace driver [2/2]
PD#SWPL-70022

Problem:
No pagetrace function on 5.15 kernel

Solution:
porting it from 5.4

Verify:
local

Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>
Change-Id: I16874164b9238a5ee8f0449ecda05377d6761a2a
2022-02-15 00:24:39 -07:00