Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jul 2003 14:17:47 +0800
From:      "David Xu" <davidxu@viatech.com.cn>
To:        "David Schultz" <das@FreeBSD.ORG>
Cc:        cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/lib/libpthread/thread thr_attr_get_np.c thr_cancel.c thr_getschedparam.c thr_join.c thr_mutex_prioceiling.c thr_sigaction.c thr_sigmask.c thr_sigpending.c thr_sigsuspend.c
Message-ID:  <001c01c3444f$7c904280$f001a8c0@davidw2k>
References:  <200307070428.h674SNfq092785@repoman.freebsd.org> <20030707060318.GA28281@HAL9000.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message -----=20
From: "David Schultz" <das@FreeBSD.ORG>
To: "David Xu" <davidxu@FreeBSD.ORG>
Cc: <src-committers@FreeBSD.ORG>; <cvs-src@FreeBSD.ORG>; =
<cvs-all@FreeBSD.ORG>
Sent: Monday, July 07, 2003 2:03 PM
Subject: Re: cvs commit: src/lib/libpthread/thread thr_attr_get_np.c =
thr_cancel.c thr_getschedparam.c thr_join.c thr_mutex_prioceiling.c =
thr_sigaction.c thr_sigmask.c thr_sigpending.c thr_sigsuspend.c


> On Sun, Jul 06, 2003, David Xu wrote:
> > davidxu     2003/07/06 21:28:23 PDT
> >=20
> >   FreeBSD src repository
> >=20
> >   Modified files:
> >     lib/libpthread/thread thr_attr_get_np.c thr_cancel.c=20
> >                           thr_getschedparam.c thr_join.c=20
> >                           thr_mutex_prioceiling.c thr_sigaction.c=20
> >                           thr_sigmask.c thr_sigpending.c=20
> >                           thr_sigsuspend.c=20
> >   Log:
> >   Avoid accessing user provided parameters in critical region.
>=20
> Cool.  What happens if a page fault is taken in a critical region?
> Does this merely make the KSE unusable by other threads until the
> page is faulted in, or does it deadlock the UTS?  (If the latter
> is true, you'd need to wire a stack page or two to ensure
> correctness, or do soemthing differently.)
>

The change is nothing to do with page fault, also page fault
shouldn't cause deadlock. It is true the kse can not be used
by other threads if page fault occurs while in critical region.
For normal page fault not in critical region, kernel KSE codes
still does not call thread_user_enter(), but I want to insert
such call in trap.c, so when a page fault occurs, and thread
is blocked in paging, other threads still can run in userland,
if a user thread is in kernel mode, it is not affected.

David Xu



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001c01c3444f$7c904280$f001a8c0>