Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Sep 2001 09:06:42 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Warner Losh <imp@harmony.village.org>
Cc:        Julian Elischer <julian@elischer.org>, <current@FreeBSD.ORG>, <FreeBSD98-testers@jp.freebsd.org>
Subject:   Re: KSE usage, and one forgotten item (PC98) 
Message-ID:  <20010914085205.Q14510-100000@delplex.bde.org>
In-Reply-To: <200109130731.f8D7Vut96075@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 13 Sep 2001, Warner Losh wrote:

> In message <3BA05949.1CCB2D82@elischer.org> Julian Elischer writes:
> : All looks good.. obviously the logic of what was going on was easy
> : enough to pick up :-)
> :
> : the only bit I didn't see so easily was:
> : ...
> : @@ -2860,7 +2861,7 @@
> :         /*
> :          * keep the process from being swapped
> :          */
> : -       PHOLD(p);
> : +       PROC_LOCK(p);
> :         bzero((void *)bp, sizeof(*bp));
> :         bp->bio_cmd = BIO_FORMAT;
> : ...
> : the replacement of PHOLD with PROC_LOCK().. I'm not sure of what this actualy
> : means..

This means that this version of fd.c has been broken :-).

> Since I don't know what either PHOLD or PROC_LOCK are, I don't know if
> I did this right.  Maybe it is bogus.

PHOLD() used to hold the user pages in core while the process waited for
i/o to complete.  The pc98 version of fd.c is rather out of date, so it
still rather bogusly does DMA from the address where sys_generic.c:ioctl()
copied the user data.  This address may be on the kernel stack, so the
driver needs to lock down the user pages until the DMA completes.  I'm
not sure if PROC_LOCK() does this accidentally.  It gives a lock that is
too strong in most ways.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010914085205.Q14510-100000>