[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100521130808.919ecb35.akpm@linux-foundation.org>
Date: Fri, 21 May 2010 13:08:08 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Haicheng Li <haicheng.li@...ux.intel.com>
Cc: "linux-mm@...ck.org" <linux-mm@...ck.org>, andi.kleen@...el.com,
cl@...ux-foundation.org, fengguang.wu@...el.com, mel@....ul.ie,
tj@...nel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
minskey guo <chaohong.guo@...el.com>
Subject: Re: [PATCH] cpu_up: hold zonelists_mutex when build_all_zonelists
On Thu, 20 May 2010 11:23:16 +0800
Haicheng Li <haicheng.li@...ux.intel.com> wrote:
>
> Here is another issue, we should always hold zonelists_mutex when calling build_all_zonelists
> unless system_state == SYSTEM_BOOTING.
Taking a global mutex in the cpu-hotplug code is worrisome. Perhaps
because of the two years spent weeding out strange deadlocks between
cpu-hotplug and cpufreq.
Has this change been carefully and fully tested with lockdep enabled
(please)?
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -357,8 +357,11 @@ int __cpuinit cpu_up(unsigned int cpu)
> return -ENOMEM;
> }
>
> - if (pgdat->node_zonelists->_zonerefs->zone == NULL)
> + if (pgdat->node_zonelists->_zonerefs->zone == NULL) {
> + mutex_lock(&zonelists_mutex);
> build_all_zonelists(NULL);
> + mutex_unlock(&zonelists_mutex);
> + }
Your email client is performing space-stuffing and it replaces tabs
with spaces. This requires me to edit the patches rather a lot,
which is dull.
--
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