Re: [RFC][-mm] Add an owner to the mm_struct (v4)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: KAMEZAWA Hiroyuki
Date: Tuesday, April 1, 2008 - 5:31 pm

On Tue, 01 Apr 2008 18:13:12 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
This finds new owner when "current" is multi-threaded and
"current" called pthread_create(), right ?

This finds new owner when "current" is multi-threaded and
"current" is just a child (means it doesn't call pthread_create()) ?



Doing above in synchronized manner seems too heavy.
When this happen ? or Can this be done in lazy "on-demand" manner ?

+assign_new_owner:
+	rcu_read_unlock();
+	BUG_ON(c == p);
+	task_lock(c);
+	if (c->mm != mm) {
+		task_unlock(c);
+		goto retry;
+	}
+	cgroup_mm_owner_callbacks(mm->owner, c);
+	mm->owner = c;
+	task_unlock(c);
+}
Why rcu_read_unlock() before changing owner ? Is it safe ?

Thanks,
-Kame

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][-mm] Add an owner to the mm_struct (v4), Balbir Singh, (Tue Apr 1, 5:43 am)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), Pekka Enberg, (Tue Apr 1, 9:00 am)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), Balbir Singh, (Tue Apr 1, 9:15 am)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), KAMEZAWA Hiroyuki, (Tue Apr 1, 5:31 pm)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), Balbir Singh, (Tue Apr 1, 8:25 pm)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), KAMEZAWA Hiroyuki, (Tue Apr 1, 9:53 pm)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), Balbir Singh, (Tue Apr 1, 11:40 pm)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), Balbir Singh, (Wed Apr 2, 11:53 am)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), Paul Menage, (Wed Apr 2, 12:27 pm)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), Paul Menage, (Wed Apr 2, 12:53 pm)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), Balbir Singh, (Wed Apr 2, 9:05 pm)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), Paul Menage, (Wed Apr 2, 9:10 pm)
Re: [RFC][-mm] Add an owner to the mm_struct (v4), Balbir Singh, (Wed Apr 2, 9:32 pm)