|
|
Log in / Subscribe / Register

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

> With an external flag, this is much more difficult to determine, because one needs to look not only at all the call chains leading to the allocation, but also at all the possible histories of the thread.

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().


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds