From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758216AbYEVEVj (ORCPT ); Thu, 22 May 2008 00:21:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750850AbYEVEVb (ORCPT ); Thu, 22 May 2008 00:21:31 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35370 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750754AbYEVEVa (ORCPT ); Thu, 22 May 2008 00:21:30 -0400 Date: Wed, 21 May 2008 21:19:58 -0700 From: Andrew Morton To: Balbir Singh Cc: linux-mm@kvack.org, Sudhir Kumar , YAMAMOTO Takashi , Paul Menage , lizf@cn.fujitsu.com, linux-kernel@vger.kernel.org, Pavel Emelianov , KAMEZAWA Hiroyuki Subject: Re: [-mm][PATCH 3/4] cgroup mm owner callback changes to add task info (v5) Message-Id: <20080521211958.ca4f733c.akpm@linux-foundation.org> In-Reply-To: <20080521152959.15001.14495.sendpatchset@localhost.localdomain> References: <20080521152921.15001.65968.sendpatchset@localhost.localdomain> <20080521152959.15001.14495.sendpatchset@localhost.localdomain> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.5; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 May 2008 20:59:59 +0530 Balbir Singh wrote: > > This patch adds an additional field to the mm_owner callbacks. This field > is required to get to the mm that changed. Hold mmap_sem in write mode > before calling the mm_owner_changed callback > > ... > > + * The callbacks are invoked with mmap_sem held in read mode. Is that true? > + down_write(&mm->mmap_sem); > ... > cgroup_mm_owner_callbacks(mm->owner, c); Looks like write-mode to me?