mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suresh Siddha <suresh.b.siddha@intel.com>
To: Tejun Heo <tj@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	"x86@kernel.org" <x86@kernel.org>,
	"mingo@elte.hu" <mingo@elte.hu>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHSET] stop_machine: implement stop_machine_from_offline_cpu()
Date: Thu, 16 Jun 2011 10:21:04 -0700	[thread overview]
Message-ID: <1308244864.2682.361.camel@sbsiddha-MOBL3.sc.intel.com> (raw)
In-Reply-To: <20110616121505.GB2611@htj.dyndns.org>

On Thu, 2011-06-16 at 05:15 -0700, Tejun Heo wrote:
> Hello, Peter.
> 
> On Thu, Jun 16, 2011 at 02:10:19PM +0200, Peter Zijlstra wrote:
> > Maybe a silly question, but why does mtrr need all this? Surely mtrr can
> > serialize state by other means than stopping all cpus. A simple mutex
> > around the shared state blocking other cpus from updating the mtrr state
> > while we're copying the state to our newly born cpu should cure things.
> 
> Hmmm... good question.  I don't know mtrr too well either but the
> stop-machine requirement seems to directly come from intel's
> specification.  I suppose Suresh can fill us in better.

Yes, It is coming from SDM guidelines of updating MTRR's. MTRR/PAT
change the memory attributes and to ensure that no one else is
simultaneously accessing memory while a cpu is changing the attributes
of that memory, we need system wide rendezvous. MTRR/PAT is not only
updated during cpu online, we allow MTRR's to be changed (and all the
cpu's need to be in sync) at runtime too.

For example, change log for the commit
d0af9eed5aa91b6b7b5049cae69e5ea956fd85c3 explains a recent issue we
encountered.

thanks,
suresh


      reply	other threads:[~2011-06-16 17:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14 17:06 Tejun Heo
2011-06-14 17:06 ` [PATCH 1/3] stop_machine: kill __stop_machine() Tejun Heo
2011-06-16 12:12   ` Peter Zijlstra
2011-06-16 12:44     ` Tejun Heo
2011-06-16 17:37     ` Suresh Siddha
2011-06-16 17:55       ` Peter Zijlstra
2011-06-16 18:17         ` Suresh Siddha
2011-06-16 18:28           ` Tejun Heo
2011-06-16 18:36             ` Peter Zijlstra
2011-06-16 18:44               ` Suresh Siddha
2011-06-16 18:28           ` Peter Zijlstra
2011-06-14 17:06 ` [PATCH 2/3] stop_machine: reorganize stop_cpus() implementation Tejun Heo
2011-06-14 17:06 ` [PATCH 3/3] stop_machine: implement stop_machine_from_offline_cpu() Tejun Heo
2011-06-16 12:10 ` [PATCHSET] " Peter Zijlstra
2011-06-16 12:15   ` Tejun Heo
2011-06-16 17:21     ` Suresh Siddha [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1308244864.2682.361.camel@sbsiddha-MOBL3.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®