ANDROID: Configure out the macros in android_kabi and android_vendor
Add one CONFIG to control removing the macros or not. On some platform, configureing out the macros removes the associated members from the structs, this reduces the object size of the slabs related with the structs, therefore reduces the total slab memory consumption of system. Besides, this also reduces vmlinux size a bit, therefore the total kernel memory size increses a bit. The macros are ANDROID_KABI_RESERVE, ANDROID_VENDOR_DATA, ANDROID_VENDOR_DATA_ARRAY, ANDROID_OEM_DATA, ANDROID_OEM_DATA_ARRAY. Bug: 206561931 Signed-off-by: Qingqing Zhou <quic_qqzhou@quicinc.com> Change-Id: I0868d299ccce3c4b39f42af17916828500be6cc4
This commit is contained in:
@@ -978,8 +978,10 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
|
||||
#ifdef CONFIG_MEMCG
|
||||
tsk->active_memcg = NULL;
|
||||
#endif
|
||||
memset(&tsk->android_vendor_data1, 0, sizeof(tsk->android_vendor_data1));
|
||||
memset(&tsk->android_oem_data1, 0, sizeof(tsk->android_oem_data1));
|
||||
|
||||
android_init_vendor_data(tsk, 1);
|
||||
android_init_oem_data(tsk, 1);
|
||||
|
||||
trace_android_vh_dup_task_struct(tsk, orig);
|
||||
return tsk;
|
||||
|
||||
|
Reference in New Issue
Block a user