Messages in this thread | | | From | "Huang, Ying" <> | Subject | Re: [PATCH -v2 0/9] migrate_pages(): batch TLB flushing | Date | Mon, 16 Jan 2023 14:05:44 +0800 |
| |
Matthew Wilcox <willy@infradead.org> writes:
> On Fri, Jan 13, 2023 at 10:42:08AM +0800, Huang, Ying wrote: >> +++ b/mm/migrate.c >> @@ -1187,10 +1187,13 @@ static int __migrate_folio_move(struct folio *src, struct folio *dst, >> int rc; >> int page_was_mapped = 0; >> struct anon_vma *anon_vma = NULL; >> + bool is_lru = !__PageMovable(&src->page); >> >> __migrate_folio_extract(dst, &page_was_mapped, &anon_vma); >> >> rc = move_to_new_folio(dst, src, mode); >> + if (!unlikely(is_lru)) >> + goto out_unlock_both; > > This reads a little awkwardly. Could it be: > > if (likely(!is_lru)) > > ... but honestly, I think the polarity here is wrong. LRU pages tend to > outnumber !LRU pages, so shouldn't this be: > > if (unlikely(!is_lru)) { > > just like it is in migrate_folio_unmap()?
Yes. Thank you very much for pointing this out. Will fix it for the next version.
Best Regards, Huang, Ying
| |