Date: Thu, 13 Sep 2001 17:00:07 -0700 From: "mike varga" <mike.varga@cavium.com> To: "Alfred Perlstein" <bright@mu.org>, <freebsd-arch@freebsd.org> Subject: Re: FD_LOCK, pthreads and drivers Message-ID: <014001c13cb0$36eb5e70$4a10a8c0@stcla1.sfba.home.com> References: <010e01c13ca3$6e12b4a0$4a10a8c0@stcla1.sfba.home.com> <20010913183028.P968@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Are both of the threading models posix complient? Can I replace one with the other, without affecting the operation of the applications using them? This seems to indicate that it is not a kernel requirement; only someone decided to force locking on the file descriptors regardless of whether they where actually needed. Is this true? ----- Original Message ----- From: "Alfred Perlstein" <bright@mu.org> To: "mike varga" <mike.varga@cavium.com> Cc: <freebsd-arch@freebsd.org> Sent: Thursday, September 13, 2001 4:30 PM Subject: Re: FD_LOCK, pthreads and drivers > * 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?014001c13cb0$36eb5e70$4a10a8c0>