page migration patchset
Andi,
Under the topic of modifying a processes's mems_allowed bitmask, Paul Jackson has been telling me that this is hard, in general. This is unfortunate, as part of the page migration work I am doing, it seems that part of the necessary work is to change the NUMA memory policy so newly allocated pages go onto the new nodes.
Now I know there is no locking protection around the mems_allowed bitmask, so changing this while the process is still running sounds hard. But part of the plan I am working under assumes that the process is stopped before it is migrated. (Shared pages that are only shared among processes all of whom are to be moved would similarly be handled; pages shsared among migrated and non-migrated processes, e. g. glibc pages, would not typically need to be moved at all, since they likely reside somewhere outside the set of nodes to be migrated from.)
But if the process is suspended, isn't all that is needed just to do the obvious translation on the mems_allowed vector? (Similarly for the dedicated node stuff, I forget the name for that at the moment...)
Am I missing something big here that makes this task harder than I am thinking it is?
Signature · 14 lines
Best Regards,
Ray
-----------------------------------------------
Ray Bryant
512-453-9679 (work) 512-507-7807 (cell)
[email protected] [email protected]
The box said: "Requires Windows 98 or better",
so I installed Linux.
-----------------------------------------------
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>Quoted 10 lines · Ray Bryant
Now I know there is no locking protection around the
mems_allowedbitmask, so changing this while the process is still running sounds hard. But part of the plan I am working under assumes that the process is stopped before it is migrated. (Shared pages that are only shared among processes all of whom are to be moved would similarly be handled; pages shsared among migrated and non-migrated processes, e. g. glibc pages, would not typically need to be moved at all, since they likely reside somewhere outside the set of nodes to be migrated from.)
Quoted 2 lines
But if the process is suspended, isn't all that is needed just to do the obvious translation on the
mems_allowedvector?
Probably yes. But I can't say for sure since I haven't followed the design and code of mems_allowed very closely
(it's not in mainline and seems to be only added with the cpumemset patches). I would take Paul's word more seriously than mine on that.
I assume you stop the process while doing page migration, and while a process is stopped it should be safe to touch task_struct fields as long as you lock against yourself.
Quoted 2 lines
(Similarly for the dedicated node stuff, I forget the name for that at the moment...)
You mean NUMA API? You would need to modify all the mempolicy data structures.
They can be safely changed when the mm semaphore is hold. However such policies can be attached to files too (e.g. in tmpfs) with no association with a process. There are plans to allow them at arbitary files.
-Andi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>