Context information in memory-allocation requests
Context information in memory-allocation requests
Posted Jan 5, 2017 12:54 UTC (Thu) by willy (subscriber, #9762)Parent article: Context information in memory-allocation requests
I've had occasion to think about GFP_NOFS over the last week, and I think there's a simpler solution to removing it. Rather than setting/clearing a per-process flag like Michael's proposal, why not a per-superblock flag? A filesystem would set the SUPER_NO_RECLAIM flag when starting a transaction, and clear it after ending the transaction. Upon entry to the shrinker, check to see if SUPER_NO_RECLAIM is set, and if it is, return SHRINK_STOP.
This seems too obvious for everybody else to have missed, so what's the problem with this?
(It also allows one filesystem to shrink in order to make space for an unrelated filesystem to make progress. And filesystems can migrate to it on an individual basis; no giant flag day)
