Re: summarize all information again at bottom//reply: reply: [PATCH] mm: fix a race scenario in folio_isolate_lru

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

 



On Thu, Mar 28, 2024 at 09:27:31AM +0800, Zhaoyang Huang wrote:
> ok, I missed the refcnt from alloc_pages. However, I still think it is
> a bug to call readahead_folio in read_pages as the refcnt obtained by
> alloc_pages should be its final guard which is paired to the one which
> checked in shrink_folio_list->__remove_mapping->folio_ref_freeze(2)(this
> 2 represent alloc_pages & page cache). If we removed this one without

__remove_mapping()  requires that the caller holds the folio locked.
Since the readahead code unlocks the folio, __remove_mapping() cannot
be run because the caller of __remove_mapping() will wait for the folio
lock.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux