Date: Fri, 23 Feb 2007 06:05:26 +0800 From: LI Xin <delphij@delphij.net> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-arch@freebsd.org Subject: Re: Patch for review: resolve a race condition in [sg]etpriority() Message-ID: <45DE13A6.4010509@delphij.net> In-Reply-To: <200702221639.12751.jhb@freebsd.org> References: <45CC0EB9.7030400@delphij.net> <200702090837.04495.jhb@freebsd.org> <45DDD816.80303@delphij.net> <200702221639.12751.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 John Baldwin wrote: > On Thursday 22 February 2007 12:51, LI Xin wrote: >> Hi, John, >> >> John Baldwin wrote: >>> My only reason for favoring the wakeup for complete initialization is that >>> while this patch may solve the getprio/setprio race, it doesn't solve all >>> PRS_NEW-related races, which the sleep/wakeup proposal did. >> Today I have some time and tried your approach for a second time. It >> looks like that we can not simply sleep with allproc_lock held. The >> attached patchset implements the proof-of-concept idea, please let me >> know if you think this one is better. > > Ok. It would actually be really nice if we could not put the process onto > the allproc list until it was really fully created. Is the only reason we put > it on the list to prevent duplicate pid allocation? For allproc insertion, I think the insert operation itself stands for avoiding duplication only, but the lock have more side effects. Cheers, - -- Xin LI <delphij@delphij.net> http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF3hOmOfuToMruuMARCmZPAJ9bfQjkwxZHJCH+mrPIytQcnumMXACeLIbX ETesrVoocE3srTogqYBYiyU= =oX7K -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45DE13A6.4010509>