x86-8/linux-3.7

CONFIG_MM_OWNER의 정체를 밝혀라

Opened this issue · 1 comments

Minq commented
#ifdef CONFIG_MM_OWNER                                                                             
        /*                                                                                         
         * "owner" points to a task that is regarded as the canonical                              
         * user/owner of this mm. All of the following must be true in                             
         * order for it to be changed:                                                             
         *                                                                                         
         * current == mm->owner                                                                    
         * current->mm != mm                                                                       
         * new_owner->mm == mm                                                                     
         * new_owner->alloc_lock is held                                                           
         */                                                                                        
        struct task_struct __rcu *owner;                                                           
#endif

뭐 owner가 바뀔 때 이런 순서로 되어야 한다는 이야기 같기는 한데 정확히 이해하진 못하겠네요.

start_kernel() / mm_init()에 일단 owner(mm_init_owner())를 봐꿔주는 부분이랑.
kernel/exit.c mm_update_next_owner()가 그 순서를 나타내는듯하네요 (예상입니다.)