mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
mm: multi-gen LRU: section for memcg LRU
Move memcg LRU code into a dedicated section. Improve the design doc to outline its architecture. Link: https://lkml.kernel.org/r/20230118001827.1040870-5-talumbau@google.com Signed-off-by: T.J. Alumbaugh <talumbau@google.com> Cc: Yu Zhao <yuzhao@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
ccbbbb8594
commit
36c7b4db7c
@@ -122,18 +122,6 @@ static inline bool lru_gen_in_fault(void)
|
||||
return current->in_lru_fault;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MEMCG
|
||||
static inline int lru_gen_memcg_seg(struct lruvec *lruvec)
|
||||
{
|
||||
return READ_ONCE(lruvec->lrugen.seg);
|
||||
}
|
||||
#else
|
||||
static inline int lru_gen_memcg_seg(struct lruvec *lruvec)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int lru_gen_from_seq(unsigned long seq)
|
||||
{
|
||||
return seq % MAX_NR_GENS;
|
||||
@@ -309,11 +297,6 @@ static inline bool lru_gen_in_fault(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline int lru_gen_memcg_seg(struct lruvec *lruvec)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool lru_gen_add_folio(struct lruvec *lruvec, struct folio *folio, bool reclaiming)
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user