Re: [PATCH v10 08/14] mm: multi-gen LRU: support page table walks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 29, 2022 at 7:10 AM zhong jiang
<zhongjiang-ali@xxxxxxxxxxxxxxxxx> 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.




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux