Date: Thu, 27 Mar 2008 08:41:33 +0000 From: Doug Rabson <dfr@rabson.org> To: d@delphij.net Cc: cvs-src@FreeBSD.ORG, Doug Rabson <dfr@FreeBSD.ORG>, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/gen lockf.c src/lib/libc/sys Symbol.map fcntl.2 src/sys/compat/freebsd32 syscalls.master src/sys/compat/linux linux_file.c src/sys/compat/svr4 svr4_fcntl.c src/sys/conf NOTES files options ... Message-ID: <E5B9EACE-05BC-4F8E-A9D9-B9D7B4F83FA8@rabson.org> In-Reply-To: <47EB1AD7.2080609@delphij.net> References: <200803261523.m2QFND30047541@repoman.freebsd.org> <47EB1AD7.2080609@delphij.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail-119-666826560 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 27 Mar 2008, at 03:56, Xin LI wrote: > Great work! I have not dig into the code yet but just curious - > will it be feasible to have the userland RPC client to share some > code to make it MTSAFE? I took the userland RPC code as a starting point but I have not tried to keep them compatible. The main issue for an MTSAFE RPC client is dealing with replies. The existing locking in the userland RPC code copes with sending the request messages safely but would have problems handling the replies if two threads were trying to read from the socket. It would be possible to take a similar approach to fixing this in userland. Basically you would build a list of pending requests and arrange for only one thread to read replies at any given time. That thread would examine each reply message and match it to a pending request by examining the XID field. The code is likely to be a bit different from the kernel version but the concept should be similar. --Apple-Mail-119-666826560--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E5B9EACE-05BC-4F8E-A9D9-B9D7B4F83FA8>