[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHGf_=r8Goe6EEC1eS_Azxc1nQcEq4txRMDPGRLVLoyF3xFriA@mail.gmail.com>
Date: Fri, 22 Jun 2012 23:37:54 -0400
From: KOSAKI Motohiro <kosaki.motohiro@...il.com>
To: Aaditya Kumar <aaditya.kumar.30@...il.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org,
rostedt@...dmis.org, mingo@...nel.org, C.Emde@...dl.org,
jkacur@...hat.com, frank.rowand@...sony.com, tim.bird@...sony.com,
takuzo.ohara@...sony.com, kan.iibuchi@...sony.com,
kosaki.motohiro@...il.com,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [RFC][RT][PATCH] mm: Do not use stop_machine() for
__zone_pcp_udpate() for CONFIG_PREEMPT_RT_FULL
(6/19/12 2:32 PM), Aaditya Kumar wrote:
> The code path of __zone_pcp_update() has following locks, which in
> CONFIG_PREEMPT_RT_FULL=y are rt-mutex.
> - pa_lock locked by cpu_lock_irqsave()
> - zone->lock locked by free_pcppages_bulk()
>
> Since __zone_pcp_update() is called from stop_machine(), so with
> CONFIG_PREEMPT_RT_FULL=y
> we get following backtrace when __zone_pcp_update() is called during
> memory hot plugging while
> doing heavy file I/O.
>
> I think stop_machine() may not be required for calling __zone_pcp_update()
> in case of CONFIG_PREEMPT_RT_FULL=y as acquiring pa_lock in __zone_pcp_update()
> should be sufficient to isolate pcp pages and to setup per cpu pagesets.
>
> Can someone please let me know if am missing anything here?
First off, you should cc memory hotplug experts when discussing memory
hotplug topic.
Second, stop_machine() is required because usually zone->pageset is
per-cpu variable.
the regular access rule is, 1) owner cpu can always access their own
pcp, 2) offlined cpu's
pcp can be accessed from any cpus because is has no race chance 3)
otherwise caller must
use stop_machine for preventing owner cpu accesses pcp.
stop_machine and send ipi are common technique for per-cpu area hack.
--
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