summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_mem_pool.c
AgeCommit message (Collapse)Author
2024-01-05Merge branch 'upstream' into HEADVamsidhar reddy Gaddam
Update KMD to R47P0 Bug: 315267052 Test: Outlined in go/pixel-gpu-kmd-r47p0 Change-Id: I89454c4c862033fe330b260a9bc6cc777a3ca231 Signed-off-by: Vamsidhar reddy Gaddam <gvamsi@google.com>
2023-12-14Update KMD to r47p0Jörg Wagner
Provenance: ipdelivery@ad01e50d640910a99224382bb227e6d4de627657 Change-Id: I19ac9bce34a5c5a319c1b4a388e8b037b3dfe6e7
2023-09-01Merge r44p1-00dev3 from partner/upstream into android13-gs-pixel-5.10-udc-qpr1Jörg Wagner
Bug: 290882327 Change-Id: I90723cbaa3f294431087587fd8025f0688e51bf2
2023-08-03Update KMD to 'mini release: update r44p1-01bet1 to r44p1-00dev2'Jörg Wagner
Provenance: ipdelivery@d10c137c7691a470b8b33786aec4965315db4561 Change-Id: I4fbcc669d3b8e36c8288c91fdddd8b79258b6635
2023-07-12Merge upstream DDK R43P0 KMDDebarshi Dutta
Merge DDK version R43P0 from upstream branch Provenance: 48a9c7e25986318c8475bc245de51e7bec2606e8 (ipdelivery/EAC/v_r43p0) VX504X08X-BU-00000-r43p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r43p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r43p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r43p0-01eac0 - Valhall Android Renderscript AOSP parts Bug 278174418 Commit-Topic: R43P0_KMD Signed-off-by: Debarshi Dutta <debarshid@google.com> Change-Id: I84fb19e7ce5f28e735d44a4993d51bd985aac80b
2023-07-11Mali allocations: unconditionally check for pending kill signalsJörg Wagner
Remove differentiation between kernel thread and ioctl triggered allocations - if the owner has a kill signal pending, stop requesting pages. Bug: 265224675 Change-Id: I70acfc9f3e6dc07dc040c456f11e3ddac5d49494
2023-05-09[Official] MIDCET-4458, GPUCORE-36402: Check for process exit before page ↵Suzanne Candanedo
alloc from kthread The backing pages for native GPU allocations aren't always allocated in the ioctl context. A JIT_ALLOC softjob or KCPU command can get processed in the kernel worker thread. GPU page fault handling is anyways done in a kernel thread. Userspace can make Kbase allocate large number of backing pages from the kernel thread to cause out of memory situation, which would eventually lead to a kernel panic as OoM killer would run out of suitable processes to kill. Though Kbase will account for the backing pages and OoM killer will try to kill the culprit process, the memory already allocated by the process won't get freed as context termination would remain blocked or won't kick-in until kernel thread keeps trying to allocate the backing pages. For the allocation that is done from the context of kernel thread, OoM killer won't consider the kernel thread for killing and kernel would keep retrying to allocate physical page as long as the OoM killer is able to kill processes. For the memory allocation done from the ioctl context, kernel would eventually stop retrying when it sees that process has been marked for killing by the OoM killer. This commit adds a check for process exit in the page allocation loop. The check allows kernel thread to swiftly exit the page allocation loop once OoM killer has initiated the killing of culprit process (for which kernel thread is trying to allocate pages) thereby unblocking context termination and freeing of GPU memory already allocated by the process. This helps in preventing the kernel panic and also limits the number of innocent processes that gets killed. The use of __GFP_RETRY_MAYFAIL flag didn't help in all the scenarios. The flag ensures that OoM killer is not invoked directly and kernel doesn't keep retrying to allocate the page. But when system is running low on memory, other threads can invoke the OoM killer and the page allocation request from kthread could continue to get satisfied due to the killing of other processes and so the kthread may not always timely exit the page allocation loop. (cherry picked from commit 3c5c9328a7fc552e61972c1bbff4b56696682d30) GPUCORE-36402: Fix potential memleak and NULL ptr deref issue in Kbase The commit 3c5c9328a7fc552e61972c1bbff4b56696682d30 updated Kbase to check for the process exit in every iteration of the page allocation loop when the allocation is done from the context of kernel worker thread. The commit introduced a potential memleak and NULL pointer dereference issue (which was reported by Coverity). This commit adds the required fix for the 2 issues and also sets the task pointer only for the Userspace created contexts and not for the contexts created by Kbase i.e. privileged context created for the HW counter dumping and for the WA of HW issue TRYM-3485. Bug: 275614526 Change-Id: I8107edce09a2cb52d8586fc9f7990a25166f590e Signed-off-by: Guus Sliepen <gsliepen@google.com> Provenance: https://code.ipdelivery.arm.com/c/GPU/mali-ddk/+/5169 (cherry picked from commit 8294169160ebb0d11d7d22b11311ddf887fb0b63)
2023-05-01Mali Valhall Android DDK r43p0-01eac0 KMDToby Sunrise
Provenance: 48a9c7e25986318c8475bc245de51e7bec2606e8 (ipdelivery/EAC/v_r43p0) VX504X08X-BU-00000-r43p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r43p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r43p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r43p0-01eac0 - Valhall Android Renderscript AOSP parts Change-Id: I5df1914eba386e0bf507d4951240e1744f666a29
2023-05-01Mali Valhall Android DDK r42p0-01eac0 KMDToby Sunrise
Provenance: 300534375857cb2963042df7b788b1ab5616c500 (ipdelivery/EAC/v_r42p0) VX504X08X-BU-00000-r42p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r42p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r42p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r42p0-01eac0 - Valhall Android Renderscript AOSP parts Change-Id: I3b15e01574f03706574a8edaf50dae4ba16e30c0
2022-12-15Mali Valhall Android DDK r41p0-01eac0 KMDJörg Wagner
Provenance 7bb206ede984968bd1014b29529e94763b043202 (ipdelivery/EAC/v_r41p0) VX504X08X-BU-00000-r41p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r41p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r41p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r41p0-01eac0 - Valhall Android Renderscript AOSP parts Change-Id: I95f741ffe0ec4ee4c8f2c0338778294f1a2a2836
2022-12-15Mali Valhall Android DDK r40p0-01eac0 KMDJörg Wagner
Provenance: 056ded72d351d1bf6319f7b2b925496dd6ad304f (ipdelivery/EAC/v_r40p0) VX504X08X-BU-00000-r40p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r40p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r40p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r40p0-01eac0 - Valhall Android Renderscript AOSP parts Change-Id: I6db6b45c73c5447dd246533246e65b5ef2c8872f
2022-04-28Add option for ordered Mali kbase memory pools.Erik Staats
Bug: 173450654 Test: Verified gpubw throughput is reduced without enabling ordered memory pools. Test: Verified gpubw throughput is not reduced with ordered memory pools enabled. Test: See details in testing done comment in https://partner-android-review.googlesource.com/2205477 . Change-Id: Iffd4809c3e99619e056ca0092ac623b72f909b8c
2022-03-02Mali Valhall Android DDK r36p0 KMDSiddharth Kapoor
Provenance: 9f72c118d9 (ipdelivery/EAC/v_r36p0) VX504X08X-BU-00000-r36p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r36p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r36p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r36p0-01eac0 - Valhall Android Renderscript AOSP parts Signed-off-by: Siddharth Kapoor <ksiddharth@google.com> Change-Id: I4a63b707fedc68d7b7d046596c7098da47a139cb
2021-07-19Mali Valhall DDK r32p1 BETA 2 KMDSidath Senanayake
Provenance: 83a91db27 (collaborate/google/android/v_r32p1-00bet0) VX504X08X-BU-00000-r32p1-00bet2 - Valhall Android DDK VX504X08X-BU-60000-r32p1-00bet2 - Valhall Android Document Bundle VX504X08X-DC-11001-r32p1-00bet2 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r32p1-00bet2 - Valhall Android Renderscript AOSP parts Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ib171e2ed076c1f60b38f4cc9d99848489d4d1459
2021-06-15Mali Valhall DDK r31p0 KMDSidath Senanayake
Provenance: 2ea0ef9bd (collaborate/EAC/v_r31p0) VX504X08X-BU-00000-r31p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r31p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r31p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r31p0-01eac0 - Valhall Android Renderscript AOSP parts Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ide9d5fdc6d9c95fa66a3546b01f619b43c09496d
2021-04-14Mali Valhall DDK r30p0 KMDSidath Senanayake
Provenance 4a09e9e58 (collaborate/EAC/v_r30p0) VX504X08X-BU-00000-r30p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r30p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r30p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r30p0-01eac0 - Valhall Android Renderscript AOSP parts Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ie30d6ece7ebe221c8e4c736af05ad05dcfc15127
2021-01-29Mali Valhall DDK r29p0 KMDSidath Senanayake
Provenance: afaca8da1 (collaborate/EAC/v_r29p0) VX504X08X-BU-00000-r29p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r29p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r29p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r29p0-01eac0 - Valhall Android Renderscript AOSP parts Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ie0904c9223b7ec9311b848a52d3159ac2b07530e
2019-04-10Mali Bifrost DDK r17p0 KMDSidath Senanayake
Provenance: 789dfe7c7 (collaborate/EAC/b_r17p0) BX304L01B-BU-00000-r17p0-01rel0 BX304L06A-BU-00000-r17p0-01rel0 BX304X07X-BU-00000-r17p0-01rel0 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Iff5bea2d96207a6e72d5e533e772c24a7adbdc31
2018-07-31Mali Bifrost DDK r14p0 KMDSidath Senanayake
Provenance: 37fe8262c (collaborate/EAC/b_r14p0) BX304L01B-BU-00000-r14p0-01rel0 BX304L06A-BU-00000-r14p0-01rel0 BX304X07X-BU-00000-r14p0-01rel0 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I0eb3b666045d72d33e2953954de5b416f909da0f
2018-03-19Mali Bifrost DDK r11p0 KMDSidath Senanayake
Provenance: b1581ebda (collaborate/EAC/b_r11p0) BX304L01B-BU-00000-r11p0-01rel0 BX304L06A-BU-00000-r11p0-01rel0 BX304X07X-BU-00000-r11p0-01rel0 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ia590e1eb21778d33cacbefba83598ee56790ca85
2018-01-22Mali Bifrost DDK r10p0 KMDSidath Senanayake
Provenance: 27ee08eb4 (collaborate/EAC/b_r10p0) BX304L01B-BU-00000-r10p0-01rel0 BX304L06A-BU-00000-r10p0-01rel0 BX304X07X-BU-00000-r10p0-01rel0 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I31c8d66dad91c5b998f3e07757054c37c6aea963
2017-07-11Mali Bifrost DDK r7p0 KMDSidath Senanayake
Provenance: cbfad67c8 (collaborate/EAC/b_r7p0) BX304L01B-BU-00000-r7p0-01rel0 BX304L06A-BU-00000-r7p0-01rel0 BX304X07X-BU-00000-r7p0-01rel0 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Icdf8b47a48b829cc228f4df3035f7b539da58104
2017-05-18Mali Bifrost DDK r6p0 KMDSidath Senanayake
Provenance: b67d8663a (collaborate/EAC/b_r6p0) BX304L01B-BU-00000-r6p0-01rel0 BX304L06A-BU-00000-r6p0-01rel0 BX304X07X-BU-00000-r6p0-01rel0 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I6b19113374d523be9a75a252d672731600e991d6
2020-08-14Mali Bifrost DDK r4p0 KMDSidath Senanayake
Provenance: e126eb313 (collaborate/EAC/b_r4p0) BX304L01B-BU-00000-r4p0-01rel0 BX304L06A-BU-00000-r4p0-01rel0 BX304X07X-BU-00000-r4p0-01rel0 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ibcec32b4736e66dab9ee6ba68704336354e9a1f3
2016-11-09Mali Bifrost DDK r2p0 KMDSidath Senanayake
Provenance: 6aec14e96 (collaborate/EAC/b_r2p0) BX304L01B-BU-00000-r2p0-03rel0 BX304L06A-BU-00000-r2p0-03rel0 BX304X07X-BU-00000-r2p0-03bet0 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ic7007d25551bd1478b491ec5a0fc9ecb400aa25d
2020-08-14Mali Bifrost DDK r0p0 KMDSidath Senanayake
Provenance: 6fe4d9f9a (collaborate/EAC/b_r0p0) BX304L01B-BU-00000-r0p0-06rel0 BX304L06A-BU-00000-r0p0-06rel0 Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I128cfe0586d31f83f3158a7ab98fa40dca4b4349