From owner-p4-projects Wed Mar 20 7:40:51 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7E22937B404; Wed, 20 Mar 2002 07:40:43 -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 3EA1037B405 for ; Wed, 20 Mar 2002 07:40:42 -0800 (PST) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2KFegE85239 for perforce@freebsd.org; Wed, 20 Mar 2002 07:40:42 -0800 (PST) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 20 Mar 2002 07:40:42 -0800 (PST) Message-Id: <200203201540.g2KFegE85239@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 8054 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=8054 Change 8054 by rwatson@rwatson_tislabs on 2002/03/20 07:40:05 Replace my first pass at taskqueue description with a detailed one provided by arr. Affected files ... ... //depot/projects/smpng/sys/design/article.sgml#17 edit Differences ... ==== //depot/projects/smpng/sys/design/article.sgml#17 (text+ko) ==== @@ -23,7 +23,7 @@ - $SMPng: //depot/projects/smpng/sys/design/article.sgml#16 $ + $SMPng: //depot/projects/smpng/sys/design/article.sgml#17 $ 2002 @@ -546,14 +546,18 @@ Taskqueue - The taskqueue's locking strategy is simple. There is a mutex, - taskqueue_queues_mutex, that covers the - taskqueue_queues TAILQ. Also there is mutex in - the struct taskqueue data structure, which - is used to protect the elements of the structure. - - - Need to add mutex name, talk about shared vs. exclusive - access and use of the mutex. Is it a leaf mutex? + The taskqueue's interface has two basic locks associated + with it in order to protect the related shared data. The + taskqueue_queues_mutex is meant to serve as a + lock to protect the taskqueue_queues TAILQ. + The other mutex lock associated with this system is the one in the + struct taskqueue data structure. The + use of the synchronization primitive here is to protect the + integrity of the data in the struct + taskqueue. It should be noted that there are no + separate macros to assist the user in locking down his/her own work + since these locks are most likely not going to be used outside of + subr_taskqueue.c. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message