Date: Fri, 3 Feb 2017 21:29:33 -0800 From: Jason Harmening <jason.harmening@gmail.com> To: Alexander Kabaev <kabaev@gmail.com> Cc: "Jason A. Harmening" <jah@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313037 - in head/sys: amd64/include kern mips/include net powerpc/include sparc64/include Message-ID: <CAM=8qa=h3=sfro02hCQyzqkDnLO7TnQJ8ugCoa5=MfNE_OCgZg@mail.gmail.com> In-Reply-To: <20170203231238.0675c289@kan> References: <201702010332.v113WnYf041362@repo.freebsd.org> <20170203231238.0675c289@kan>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, I'm a bit confused as to how this change breaks MIPS. The new function, get_pcpu() is intended to be used only to access the per-cpu data pointer locally. It returns pcpup, which is the per-cpu pointer wired into the local TLB to translate to the local CPU's physical data region, correct? This is the same value used by the per-CPU accessors such as PCPU_ADD and PCPU_GET. The MI portions of this change only use get_pcpu() to access the local CPU's data, e.g. under a critical section in the rmlock. It is not intended to be used for iterating all CPUs. If I've missed something and MIPS is truly broken by this, then I'll gladly revert, but (maybe because it's late) I'm not seeing where this goes wrong on MIPS. Thanks, Jason On Fri, Feb 3, 2017 at 8:12 PM, Alexander Kabaev <kabaev@gmail.com> wrote: > On Wed, 1 Feb 2017 03:32:49 +0000 (UTC) > "Jason A. Harmening" <jah@FreeBSD.org> wrote: > > > Author: jah > > Date: Wed Feb 1 03:32:49 2017 > > New Revision: 313037 > > URL: https://svnweb.freebsd.org/changeset/base/313037 > > > > Log: > > Implement get_pcpu() for the remaining architectures and use it to > > replace pcpu_find(curcpu) in MI code. > > > > Modified: > > head/sys/amd64/include/pcpu.h > > head/sys/kern/kern_rmlock.c > > head/sys/mips/include/pcpu.h > > head/sys/net/netisr.c > > head/sys/powerpc/include/cpufunc.h > > head/sys/powerpc/include/pcpu.h > > head/sys/sparc64/include/pcpu.h > > > > Hi, > > this change was not reviewed nor testing was thought for all > architectures it touches. The change happens to break MIPS quite > thoroughly, since MIPS is using different pointers when accessing PCPU > area locally and when doing iterations using cpu_to_cpuid array. I > therefore officially am requesting this change to be reverted until > reasonable solution is found to unbreak architectures that use wired > TLBs to access local per-CPU data. > > -- > Alexander Kabaev >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAM=8qa=h3=sfro02hCQyzqkDnLO7TnQJ8ugCoa5=MfNE_OCgZg>