[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6599ad830803280706j54376243if56ccca0281f685d@mail.gmail.com>
Date: Fri, 28 Mar 2008 07:06:52 -0700
From: "Paul Menage" <menage@...gle.com>
To: balbir@...ux.vnet.ibm.com
Cc: "Pavel Emelianov" <xemul@...nvz.org>,
"Hugh Dickins" <hugh@...itas.com>,
"Sudhir Kumar" <skumar@...ux.vnet.ibm.com>,
"YAMAMOTO Takashi" <yamamoto@...inux.co.jp>, lizf@...fujitsu.com,
linux-kernel@...r.kernel.org, taka@...inux.co.jp,
linux-mm@...ck.org, "David Rientjes" <rientjes@...gle.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [-mm] Add an owner to the mm_struct (v2)
On Fri, Mar 28, 2008 at 5:54 AM, Balbir Singh <balbir@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists