ANDROID: mm/shmem: fix trace hook used to get the shmem folio
Before mTHP for shmem is added, there used different API for huge and order-0 folios. With mTHP, shmem_alloc_folio() is used for both and is differentiated at the order passed. To make better decission at the client, pass the order. Bug: 397599006 Change-Id: Idfc0fc82a8c6443fc6259d8b2f05a2d91d60ab38 Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
This commit is contained in:
committed by
Suren Baghdasaryan
parent
5b08d2d9e2
commit
fac8fe3f78
@@ -14,8 +14,8 @@ struct folio;
|
||||
struct folio_batch;
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_shmem_get_folio,
|
||||
TP_PROTO(struct shmem_inode_info *info, struct folio **folio),
|
||||
TP_ARGS(info, folio), 2);
|
||||
TP_PROTO(struct shmem_inode_info *info, struct folio **folio, int order),
|
||||
TP_ARGS(info, folio, order), 3);
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_try_alloc_pages_gfp,
|
||||
TP_PROTO(struct page **page, unsigned int order,
|
||||
gfp_t gfp, enum zone_type highest_zoneidx),
|
||||
|
||||
+1
-1
@@ -1776,7 +1776,7 @@ static struct folio *shmem_alloc_folio(gfp_t gfp, int order,
|
||||
struct folio *folio = NULL;
|
||||
|
||||
mpol = shmem_get_pgoff_policy(info, index, order, &ilx);
|
||||
trace_android_rvh_shmem_get_folio(info, &folio);
|
||||
trace_android_rvh_shmem_get_folio(info, &folio, order);
|
||||
if (folio)
|
||||
goto done;
|
||||
folio = folio_alloc_mpol(gfp, order, mpol, ilx, numa_node_id());
|
||||
|
||||
Reference in New Issue
Block a user