On 06.02.23 17:33, Matthew Wilcox wrote:
On Mon, Feb 06, 2023 at 04:13:44PM +0100, David Hildenbrand wrote:
The handling of cow pages is still very clunky.
folio_add_new_anon_rmap() handles anonymous large folios just fine. I
think David was looking at current code, not the code in mm-next.
OK. Let's wait for further comment from David.
As I raised, page_add_new_anon_rmap() -> folio_add_new_anon_rmap() can be
used to add a fresh (a) PMD-mapped THP or (b) order-0 folio.
folio_add_new_anon_rmap() is not suitable for PTE-mapping a large folio.
Which is what we are intending to do here unless I am completely off.
I think you are. While the infrastructure here handles large folios
which are not PMDs, there's nobody who will allocate such a thing, so
there is no problem. Right>
And that's precisely what I want to have fenced off here. I want that
function to complain instead of silently doing the wrong thing.
--
Thanks,
David / dhildenb