Re: [PATCH v1 05/18] mm: improve folio_likely_mapped_shared() using the mapcount of large folios

2024-04-16 Thread Lance Yang
Hey David, Maybe I spotted a bug below. [...] static inline bool folio_likely_mapped_shared(struct folio *folio) { - return page_mapcount(folio_page(folio, 0)) > 1; + int mapcount = folio_mapcount(folio); + + /* Only partially-mappable folios require more care. */ + if (

Re: [PATCH v1 05/18] mm: improve folio_likely_mapped_shared() using the mapcount of large folios

2024-04-16 Thread David Hildenbrand
On 16.04.24 12:40, Lance Yang wrote: Hey David, Maybe I spotted a bug below. Thanks for the review! [...] static inline bool folio_likely_mapped_shared(struct folio *folio) { - return page_mapcount(folio_page(folio, 0)) > 1; + int mapcount = folio_mapcount(folio); + +

Re: [PATCH v1 05/18] mm: improve folio_likely_mapped_shared() using the mapcount of large folios

2024-04-16 Thread Lance Yang
On Tue, Apr 16, 2024 at 6:47 PM David Hildenbrand wrote: > > On 16.04.24 12:40, Lance Yang wrote: > > Hey David, > > > > Maybe I spotted a bug below. > > Thanks for the review! > > > > > [...] > > static inline bool folio_likely_mapped_shared(struct folio *folio) > > { > > - return page_ma

Re: [PATCH v1 05/18] mm: improve folio_likely_mapped_shared() using the mapcount of large folios

2024-04-16 Thread David Hildenbrand
On 16.04.24 12:52, Lance Yang wrote: On Tue, Apr 16, 2024 at 6:47 PM David Hildenbrand wrote: On 16.04.24 12:40, Lance Yang wrote: Hey David, Maybe I spotted a bug below. Thanks for the review! [...] static inline bool folio_likely_mapped_shared(struct folio *folio) { - return