From 672eca4c069302d354f04c3179ddd7cd088b4d0a Mon Sep 17 00:00:00 2001 From: Bing Han Date: Fri, 15 Apr 2022 08:21:49 +0000 Subject: [PATCH] ANDROID: add vendor fields to swap_slots_cache to support multiple swap devices struct swap_slots_cache :: ANDROID_VENDOR_DATA(1) 1) Multiple swap devices can be supported; 2) There are different kinds of data; 3) During data reclamation, different types of data are exchanged to different swap devices; 4) Each swap device has corresponding arrays of slots and slots_ret; 5) Each swap device has corresponding indexes of nr, cur and n_ret; 6) This field is a pointer, it points to a struct which contains all the other arrays and indexes; Bug: 225795494 Change-Id: Icf116135926be98449a2d96fc458e58e5ad3b7e9 Signed-off-by: Bing Han (cherry picked from commit a034320a6855af99fe1ec1dfe6cafa4c2a15ecce) (cherry picked from commit 2fd1f19d555cb63bdf2f810f9b944feabf836dff) --- include/linux/swap_slots.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/swap_slots.h b/include/linux/swap_slots.h index 15adfb8c813a..7c57bc9ad53a 100644 --- a/include/linux/swap_slots.h +++ b/include/linux/swap_slots.h @@ -19,6 +19,7 @@ struct swap_slots_cache { spinlock_t free_lock; /* protects slots_ret, n_ret */ swp_entry_t *slots_ret; int n_ret; + ANDROID_VENDOR_DATA(1); }; void disable_swap_slots_cache_lock(void);