lkml.org 
[lkml]   [2022]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v10 08/14] mm: multi-gen LRU: support page table walks
On Fri, Apr 29, 2022 at 7:10 AM zhong jiang
<zhongjiang-ali@linux.alibaba.com> wrote:
>
> On 2022/4/7 11:15 上午, Yu Zhao wrote:
...
> > + while (!mm && mm_state->head != &mm_list->fifo) {
> > + mm = list_entry(mm_state->head, struct mm_struct, lru_gen.list);
> > +
> > + mm_state->head = mm_state->head->next;
> > +
> > + /* full scan for those added after the last iteration */
> > + if (!mm_state->tail || mm_state->tail == &mm->lru_gen.list) {
> > + mm_state->tail = mm_state->head;
> > + walk->full_scan = true;
> > + }
> > +
>
> The full_scan seems to be alway true. because mm_state->tail points to
> the first item in mm_list, hence the walker's
>
> condition mm_state->tail == &mm->lru_gen.list alway equal. Am I missing
> something?

mm_state->tail points to the first item *added after the last
iteration*. If no new items, mm_state->tail parks at mm_list->fifo.

\
 
 \ /
  Last update: 2022-04-30 10:37    [W:0.174 / U:38.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site