Re: svn commit: r213648 - head/sys/kern

2010-10-13 Thread John Baldwin
On Wednesday, October 13, 2010 12:21:44 pm Gennady Proskurin wrote: > Thank you and Bruce for explanation. > The key point here (which I did not understand) is that > "something == PCPU_GET(cpuid))" may be true only if "something" is set by the > current cpu, in which case its value is not stale.

Re: svn commit: r213648 - head/sys/kern

2010-10-13 Thread Gennady Proskurin
Thank you and Bruce for explanation. The key point here (which I did not understand) is that "something == PCPU_GET(cpuid))" may be true only if "something" is set by the current cpu, in which case its value is not stale. On Wed, Oct 13, 2010 at 09:05:04AM -0400, John Baldwin wrote: > On Tuesday,

Re: svn commit: r213648 - head/sys/kern

2010-10-13 Thread John Baldwin
On Tuesday, October 12, 2010 5:08:04 pm Gennady Proskurin wrote: > On Sat, Oct 09, 2010 at 12:48:50PM +0300, Andriy Gapon wrote: > > on 09/10/2010 12:33 Bruce Evans said the following: > > > On Sat, 9 Oct 2010, Andriy Gapon wrote: > > > > > >> Log: > > >> panic_cpu variable should be volatile > >

Re: svn commit: r213648 - head/sys/kern

2010-10-13 Thread Gennady Proskurin
On Sat, Oct 09, 2010 at 12:48:50PM +0300, Andriy Gapon wrote: > on 09/10/2010 12:33 Bruce Evans said the following: > > On Sat, 9 Oct 2010, Andriy Gapon wrote: > > > >> Log: > >> panic_cpu variable should be volatile > >> > >> This is to prevent caching of its value in a register when it is chec

Re: svn commit: r213648 - head/sys/kern

2010-10-12 Thread Bruce Evans
On Wed, 13 Oct 2010, Gennady Proskurin wrote: On Sat, Oct 09, 2010 at 12:48:50PM +0300, Andriy Gapon wrote: on 09/10/2010 12:33 Bruce Evans said the following: On Sat, 9 Oct 2010, Andriy Gapon wrote: [>]*... Now, why don't the partial memory barriers prevent caching the variable? % if (

Re: svn commit: r213648 - head/sys/kern

2010-10-09 Thread Andriy Gapon
on 09/10/2010 12:33 Bruce Evans said the following: > On Sat, 9 Oct 2010, Andriy Gapon wrote: > >> Log: >> panic_cpu variable should be volatile >> >> This is to prevent caching of its value in a register when it is checked >> and modified by multiple CPUs in parallel. >> Also, move the variab

Re: svn commit: r213648 - head/sys/kern

2010-10-09 Thread Bruce Evans
On Sat, 9 Oct 2010, Andriy Gapon wrote: Log: panic_cpu variable should be volatile This is to prevent caching of its value in a register when it is checked and modified by multiple CPUs in parallel. Also, move the variable into the scope of the only function that uses it. Reviewed by:

svn commit: r213648 - head/sys/kern

2010-10-09 Thread Andriy Gapon
Author: avg Date: Sat Oct 9 08:07:49 2010 New Revision: 213648 URL: http://svn.freebsd.org/changeset/base/213648 Log: panic_cpu variable should be volatile This is to prevent caching of its value in a register when it is checked and modified by multiple CPUs in parallel. Also, move the