mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
mm: add link from struct lruvec to struct zone
This is the first stage of struct mem_cgroup_zone removal. Further patches replace struct mem_cgroup_zone with a pointer to struct lruvec. If CONFIG_CGROUP_MEM_RES_CTLR=n lruvec_zone() is just container_of(). Signed-off-by: Konstantin Khlebnikov <[email protected]> Cc: Mel Gorman <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Acked-by: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
9e3b2f8cd3
commit
7f5e86c2cc
4 changed files with 30 additions and 10 deletions
14
mm/mmzone.c
14
mm/mmzone.c
|
|
@ -86,3 +86,17 @@ int memmap_valid_within(unsigned long pfn,
|
|||
return 1;
|
||||
}
|
||||
#endif /* CONFIG_ARCH_HAS_HOLES_MEMORYMODEL */
|
||||
|
||||
void lruvec_init(struct lruvec *lruvec, struct zone *zone)
|
||||
{
|
||||
enum lru_list lru;
|
||||
|
||||
memset(lruvec, 0, sizeof(struct lruvec));
|
||||
|
||||
for_each_lru(lru)
|
||||
INIT_LIST_HEAD(&lruvec->lists[lru]);
|
||||
|
||||
#ifdef CONFIG_CGROUP_MEM_RES_CTLR
|
||||
lruvec->zone = zone;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue