cvs commit: src/sys/ia64/ia64 machdep.c
John Baldwin
jhb at FreeBSD.org
Mon Jun 2 14:58:28 UTC 2008
On Sunday 01 June 2008 02:04:29 pm Marcel Moolenaar wrote:
> marcel 2008-06-01 18:04:43 UTC
>
> FreeBSD src repository
>
> Modified files: (Branch: RELENG_7)
> sys/ia64/ia64 machdep.c
> Log:
> SVN rev 179479 on 2008-06-01 18:04:29Z by marcel
>
> Merge rev 179173:
>
> We can call ia64_flush_dirty() when the corresponding process is
> locked or not. As such, use PROC_LOCKED() to determine which case
> it is and lock the process when not.
>
> This is a manual merge. No merge history is created.
proc_rwmem() can sleep (if it has to fault a page back in from swap), so you
can't call it with the process locked. I think the only place where you have
to worry about this is during a core dump from ia64/elf_machdep.c?
In that case it should be fine to just drop the lock. You do still need to do
PHOLD/PRELE to avoid an assertion failure and to prevent the process from
being swapped out while it is sleeping. So maybe something more like:
locked = PROC_LOCKED();
if (!locked)
PROC_LOCK();
_PHOLD();
PROC_UNLOCK();
... (proc_rwmem())
PROC_LOCK();
_PRELE();
if (!locked)
PROC_UNLOCK();
--
John Baldwin
More information about the cvs-src
mailing list