Context information in memory-allocation requests
Context information in memory-allocation requests
Posted Jan 5, 2017 22:51 UTC (Thu) by nybble41 (subscriber, #55106)In reply to: Context information in memory-allocation requests by rghetta
Parent article: Context information in memory-allocation requests
In principle all the functions that set the flag should also clear it before returning, so the thread flag follows the same "dynamic scope" as the current flag arguments. The history of the thread should not be a factor, apart from the call stack. Of course it's possible to get this protocol wrong, but provided the flag is used as intended I don't see how checking for a GPF_NOFS argument and following the call tree down to the allocation site is simpler or easier than checking for and similarly tracing any calls which occur between memalloc_nofs_save() and memalloc_nofs_restore().
