login
Header Space

 
 

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

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <balbir@...>
Cc: Pavel Emelianov <xemul@...>, Hugh Dickins <hugh@...>, Sudhir Kumar <skumar@...>, YAMAMOTO Takashi <yamamoto@...>, <lizf@...>, <linux-kernel@...>, <taka@...>, <linux-mm@...>, David Rientjes <rientjes@...>, Andrew Morton <akpm@...>, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...>
Date: Friday, April 4, 2008 - 4:50 am

On Fri, Apr 4, 2008 at 1:28 AM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:

Right, I realise that the memory controller is OK because of the ref counts.


That sounds like a nightmare ...


Can you test the overhead?

As long as we find someone to pass the mm to quickly, it shouldn't be
too bad - I think we're already optimized for that case. Generally the
group leader's first child will be the new owner, and any subsequent
times the owner exits, they're unlikely to have any children so
they'll go straight to the sibling check and pass the mm to the
parent's first child.

Unless they all exit in strict sibling order and hence pass the mm
along the chain one by one, we should be fine. And if that exit
ordering does turn out to be common, then simply walking the child and
sibling lists in reverse order to find a victim will minimize the
amount of passing.

One other thing occurred to me - what lock protects the child and
sibling links? I don't see any documentation anywhere, but from the
code it looks as though it's tasklist_lock rather than RCU - so maybe
we should be holding that with a read_lock(), at least for the first
two parts of the search? (The full thread search is RCU-safe).

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

Messages in current thread:
[-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Fri Apr 4, 4:05 am)
Re: [-mm] Add an owner to the mm_struct (v8), KAMEZAWA Hiroyuki, (Tue Apr 8, 8:42 pm)
Re: [-mm] Add an owner to the mm_struct (v8), Andrew Morton, (Mon Apr 7, 6:09 pm)
Re: [-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Mon Apr 7, 10:39 pm)
Re: [-mm] Add an owner to the mm_struct (v8), Andrew Morton, (Mon Apr 7, 10:55 pm)
Re: [-mm] Add an owner to the mm_struct (v8), Paul Menage, (Fri Apr 4, 4:12 am)
Re: [-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Fri Apr 4, 4:28 am)
Re: [-mm] Add an owner to the mm_struct (v8), Paul Menage, (Fri Apr 4, 4:50 am)
Re: [-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Fri Apr 4, 5:25 am)
Re: [-mm] Add an owner to the mm_struct (v8), Paul Menage, (Fri Apr 4, 3:11 pm)
Re: [-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Sat Apr 5, 10:47 am)
Re: [-mm] Add an owner to the mm_struct (v8), Paul Menage, (Sat Apr 5, 1:23 pm)
Re: [-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Sat Apr 5, 1:48 pm)
Re: [-mm] Add an owner to the mm_struct (v8), Paul Menage, (Sat Apr 5, 1:57 pm)
Re: [-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Sat Apr 5, 2:59 pm)
Re: [-mm] Add an owner to the mm_struct (v8), Paul Menage, (Sat Apr 5, 7:31 pm)
Re: [-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Sun Apr 6, 2:31 am)
Re: [-mm] Add an owner to the mm_struct (v8), Paul Menage, (Tue Apr 8, 2:32 am)
Re: [-mm] Add an owner to the mm_struct (v8), Paul Menage, (Sat Apr 5, 7:29 pm)
Re: [-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Sun Apr 6, 1:38 am)
Re: [-mm] Add an owner to the mm_struct (v8), Paul Menage, (Tue Apr 8, 2:37 am)
Re: [-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Tue Apr 8, 2:52 am)
Re: [-mm] Add an owner to the mm_struct (v8), Paul Menage, (Tue Apr 8, 2:57 am)
Re: [-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Tue Apr 8, 3:05 am)
Re: [-mm] Add an owner to the mm_struct (v8), Paul Menage, (Tue Apr 8, 3:29 am)
Re: [-mm] Add an owner to the mm_struct (v8), Balbir Singh, (Thu Apr 10, 5:09 am)
speck-geostationary