Date: Thu, 20 Nov 2008 08:55:50 -0800 From: Marcel Moolenaar <xcllnt@mac.com> To: =?ISO-8859-1?Q?Marc_L=F6rner?= <marc.loerner@hob.de> Cc: freebsd-ia64@freebsd.org Subject: Re: sys/ia64/include/pcpu.h patch proposal Message-ID: <B7E040CC-12B1-4C7B-AF34-7D8C1BE3C0B9@mac.com> In-Reply-To: <200811200943.40672.marc.loerner@hob.de> References: <200811200943.40672.marc.loerner@hob.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Nov 20, 2008, at 12:43 AM, Marc L=F6rner wrote: > Hello, > attached is a patch of pcpu.h against current to make access of > pcpu-structures preemption-ready (like in amd64). I thought that only curthread() is critical. All other PCPU accesses are sufficiently protected by context. Is that not the case? In other words, wouldn't it be enough to declare pcpup as volatile? Besides that: yes there's an atomicity problem getting to the PCPU. I'm not sure your patch fixes that because a thread can move to another CPU after obtaining the address of some field in the PCPU and before reading from that address. Unless all accesses are protected by context, in which case there's no problem now I think... --=20 Marcel Moolenaar xcllnt@mac.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B7E040CC-12B1-4C7B-AF34-7D8C1BE3C0B9>