From owner-p4-projects Wed Mar 20 8: 0:33 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2F66C37B404; Wed, 20 Mar 2002 08:00:23 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5DC6037B41C for ; Wed, 20 Mar 2002 08:00:18 -0800 (PST) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2KG0HA89125 for perforce@freebsd.org; Wed, 20 Mar 2002 08:00:17 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 20 Mar 2002 08:00:17 -0800 (PST) Message-Id: <200203201600.g2KG0HA89125@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 8060 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=8060 Change 8060 by rwatson@rwatson_tislabs on 2002/03/20 07:59:18 At some point, the "Process Credentials" section became named "Credentials". Re-alphabetize. Affected files ... ... //depot/projects/smpng/sys/design/article.sgml#20 edit Differences ... ==== //depot/projects/smpng/sys/design/article.sgml#20 (text+ko) ==== @@ -23,7 +23,7 @@ - $SMPng: //depot/projects/smpng/sys/design/article.sgml#19 $ + $SMPng: //depot/projects/smpng/sys/design/article.sgml#20 $ 2002 @@ -462,6 +462,39 @@ Specific Locking Strategies + Credentials + + struct ucred is the system + internal credential structure, and is generally used as the + basis for process-driven access control. BSD-derived systems + use a "copy-on-write" model for credential data: multiple + references may exist for a credential structure, and when a + change needs to be made, the structure is duplicated, + modified, and then the reference replaced. Due to wide-spread + caching of the credential to implement access control on open, + this results in substantial memory savings. With a move to + fine-grained SMP, this model also saves substantially on + locking operations by requiring that modification only occur + on an unshared credential, avoiding the need for explicit + synchronization when consuming a known-shared + credential. + + Credential structures with a single reference are + considered mutable; shared credential structures must not be + modified or a race condition is risked. A mutex, + cr_mtxp protects the reference + count of the struct ucred so as to + maintain consistency. Any use of the structure requires a + valid reference for the duration of the use, or the structure + may be released out from under the illegitimate + consumer. + + The struct ucred mutex is a leaf + mutex, and for performance reasons, is implemented via a mutex + pool. + + + File Descriptors and File Descriptor Tables ... @@ -576,39 +609,6 @@ since these locks are most likely not going to be used outside of kern/subr_taskqueue.c. - - - Credentials - - struct ucred is the system - internal credential structure, and is generally used as the - basis for process-driven access control. BSD-derived systems - use a "copy-on-write" model for credential data: multiple - references may exist for a credential structure, and when a - change needs to be made, the structure is duplicated, - modified, and then the reference replaced. Due to wide-spread - caching of the credential to implement access control on open, - this results in substantial memory savings. With a move to - fine-grained SMP, this model also saves substantially on - locking operations by requiring that modification only occur - on an unshared credential, avoiding the need for explicit - synchronization when consuming a known-shared - credential. - - Credential structures with a single reference are - considered mutable; shared credential structures must not be - modified or a race condition is risked. A mutex, - cr_mtxp protects the reference - count of the struct ucred so as to - maintain consistency. Any use of the structure requires a - valid reference for the duration of the use, or the structure - may be released out from under the illegitimate - consumer. - - The struct ucred mutex is a leaf - mutex, and for performance reasons, is implemented via a mutex - pool. - To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message