Date: Thu, 13 Sep 2001 18:30:28 -0500 From: Alfred Perlstein <bright@mu.org> To: mike varga <mike.varga@cavium.com> Cc: freebsd-arch@freebsd.org Subject: Re: FD_LOCK, pthreads and drivers Message-ID: <20010913183028.P968@elvis.mu.org> In-Reply-To: <010e01c13ca3$6e12b4a0$4a10a8c0@stcla1.sfba.home.com>; from mike.varga@cavium.com on Thu, Sep 13, 2001 at 03:28:35PM -0700 References: <010e01c13ca3$6e12b4a0$4a10a8c0@stcla1.sfba.home.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* mike varga <mike.varga@cavium.com> [010913 17:41] wrote: > I noticed that while testing the driver I wrote > for a crypto device, that only one thread > can be executing within the context of > my driver at a time. > > The problem is that the pthreads library > replaces the ioctl with another that exclusively > locks the file descriptor with calls to FD_LOCK/ > FD_UNLOCK. > > Why? > > I went to extremes to make sure that it > would be fully reentrant. > The driver/crypto accelerator now suffers > from slow performance. Under the native FreeBSD threading model there is only one process context. You'll want to use the linuxthreads port to do this. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010913183028.P968>