mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
LUR: Revert "BACKPORT: mm: use self-explanatory macros rather than "2""
The LRU function is not compatible with GKI, causing GKI to fail to start, so revert. This reverts commit 4e6324f47996243c54f49591465a0743d586127d. Change-Id: Iae8f79f63d50424acce595fedcd6ccc01df02d21 Reviewed-on: https://gerrit.mot.com/2609773 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
30837c89d8
commit
0850000858
2 changed files with 7 additions and 9 deletions
|
|
@ -293,8 +293,6 @@ static inline int is_active_lru(enum lru_list lru)
|
|||
return (lru == LRU_ACTIVE_ANON || lru == LRU_ACTIVE_FILE);
|
||||
}
|
||||
|
||||
#define ANON_AND_FILE 2
|
||||
|
||||
struct zone_reclaim_stat {
|
||||
/*
|
||||
* The pageout code in vmscan.c keeps track of how many of the
|
||||
|
|
@ -304,8 +302,8 @@ struct zone_reclaim_stat {
|
|||
*
|
||||
* The anon LRU stats live in [0], file LRU stats in [1]
|
||||
*/
|
||||
unsigned long recent_rotated[ANON_AND_FILE];
|
||||
unsigned long recent_scanned[ANON_AND_FILE];
|
||||
unsigned long recent_rotated[2];
|
||||
unsigned long recent_scanned[2];
|
||||
};
|
||||
|
||||
struct lruvec {
|
||||
|
|
@ -427,8 +425,6 @@ enum zone_type {
|
|||
|
||||
#ifndef __GENERATING_BOUNDS_H
|
||||
|
||||
#define ASYNC_AND_SYNC 2
|
||||
|
||||
struct zone {
|
||||
/* Read-mostly fields */
|
||||
|
||||
|
|
@ -552,8 +548,8 @@ struct zone {
|
|||
#if defined CONFIG_COMPACTION || defined CONFIG_CMA
|
||||
/* pfn where compaction free scanner should start */
|
||||
unsigned long compact_cached_free_pfn;
|
||||
/* pfn where compaction migration scanner should start */
|
||||
unsigned long compact_cached_migrate_pfn[ASYNC_AND_SYNC];
|
||||
/* pfn where async and sync compaction migration scanner should start */
|
||||
unsigned long compact_cached_migrate_pfn[2];
|
||||
unsigned long compact_init_migrate_pfn;
|
||||
unsigned long compact_init_free_pfn;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2375,7 +2375,7 @@ static void get_scan_count(struct lruvec *lruvec, struct mem_cgroup *memcg,
|
|||
{
|
||||
int swappiness = mem_cgroup_swappiness(memcg);
|
||||
struct zone_reclaim_stat *reclaim_stat = &lruvec->reclaim_stat;
|
||||
u64 fraction[ANON_AND_FILE];
|
||||
u64 fraction[2];
|
||||
u64 denominator = 0; /* gcc */
|
||||
struct pglist_data *pgdat = lruvec_pgdat(lruvec);
|
||||
unsigned long anon_prio, file_prio;
|
||||
|
|
@ -2487,6 +2487,8 @@ static void get_scan_count(struct lruvec *lruvec, struct mem_cgroup *memcg,
|
|||
* Because workloads change over time (and to avoid overflow)
|
||||
* we keep these statistics as a floating average, which ends
|
||||
* up weighing recent references more than old ones.
|
||||
*
|
||||
* anon in [0], file in [1]
|
||||
*/
|
||||
|
||||
anon = lruvec_lru_size(lruvec, LRU_ACTIVE_ANON, MAX_NR_ZONES) +
|
||||
|
|
|
|||
Loading…
Reference in a new issue