https://lkml.kernel.org/r/20241025012304.2473312-3-shakeel.butt@xxxxxxxxx
So I wonder ... as a quick fix should we simply handle it like the code
further down where we refuse PTE-mapped large folios completely?
(I went through the same anxiety attack as you did, wondering what
happens to the large-but-not-PMD-large folios: then noticed it's safe
as you did. The v1 commit message had a paragraph pondering whether
the deprecated code will need a patch to extend it for the new feature:
but once Shakeel posted the ripout, I ripped out that paragraph -
no longer any need for an answer.)
Ah, missed that.
"ignore such a partial THP and keep it in original memcg"
...
and simply skip this folio similarly? I mean, it's a corner case either way.
I certainly considered that option: it's known to give up like that
for many reasons. But my thinking (in the commit message) was "Not ideal,
but moving charge has been requested, and khugepaged should repair the THP
later" - if someone is still using move_charge_at_immigrate, I thought
this change would generate fewer surprises - that huge charge likely
to be moved as it used to be.
Fair enough, I'd have kept it simpler for this almost-dead code :)
Looks good to me, thanks!
Acked-by: David Hildenbrand <david@xxxxxxxxxx>
--
Cheers,
David / dhildenb