lkml.org 
[lkml]   [2008]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [-mm] Add an owner to the mm_struct (v2)
On Fri, Mar 28, 2008 at 5:54 AM, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>
> Thinking more, I don't think it makes sense for us to overload task_lock() to do
> the mm->owner handling (we don't want to mix lock domains). task_lock() is used
> for several things
>
> 1. We don't want to make task_lock() rules more complicated by having it protect
> an mm member to save space
> 2. We don't want more contention on task_lock()
>

This isn't to save space, it's to provide correctness. We *have* to
hold task_lock(new_owner) before setting mm->owner = new_owner,
otherwise we have no guarantee that new_owner is still a user of mm.

Paul


\
 
 \ /
  Last update: 2008-03-28 15:09    [W:0.069 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site