ANDROID: mm: Export kswapd function

To support multiple kswap threads vendor modules need
access to kswapd function. So, export it.

Bug: 201263306
Change-Id: I442612710835f39836a295e9d1936f86826ab960
Signed-off-by: Vijayanand Jitta <quic_vjitta@quicinc.com>
This commit is contained in:
Vijayanand Jitta
2022-03-23 12:37:28 +05:30
committed by Suren Baghdasaryan
parent 162cbdd807
commit 12972dd7bf
2 changed files with 4 additions and 1 deletions

View File

@@ -34,6 +34,8 @@ struct pagevec;
SWAP_FLAG_DISCARD_PAGES)
#define SWAP_BATCH 64
int kswapd (void *p);
static inline int current_is_kswapd(void)
{
return current->flags & PF_KSWAPD;

View File

@@ -4296,7 +4296,7 @@ static void kswapd_try_to_sleep(pg_data_t *pgdat, int alloc_order, int reclaim_o
* If there are applications that are active memory-allocators
* (most normal use), this basically shouldn't matter.
*/
static int kswapd(void *p)
int kswapd(void *p)
{
unsigned int alloc_order, reclaim_order;
unsigned int highest_zoneidx = MAX_NR_ZONES - 1;
@@ -4373,6 +4373,7 @@ kswapd_try_sleep:
return 0;
}
EXPORT_SYMBOL_GPL(kswapd);
/*
* A zone is low on free memory or too fragmented for high-order memory. If