From owner-cvs-all Tue Oct 15 17:20: 7 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35F2A37B409; Tue, 15 Oct 2002 17:20:06 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE44B43E3B; Tue, 15 Oct 2002 17:20:05 -0700 (PDT) (envelope-from mckusick@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9G0K2Mt085274; Tue, 15 Oct 2002 17:20:03 -0700 (PDT) (envelope-from mckusick@repoman.freebsd.org) Received: (from mckusick@localhost) by repoman.freebsd.org (8.12.6/8.12.3/Submit) id g9G0JSxq085250; Tue, 15 Oct 2002 17:19:28 -0700 (PDT) Message-Id: <200210160019.g9G0JSxq085250@repoman.freebsd.org> From: Kirk McKusick Date: Tue, 15 Oct 2002 17:19:25 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/ufs/ffs ffs_snapshot.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG mckusick 2002/10/15 17:19:25 PDT Modified files: sys/ufs/ffs ffs_snapshot.c Log: Change locking so that all snapshots on a particular filesystem share a common lock. This change avoids a deadlock between snapshots when separate requests cause them to deadlock checking each other for a need to copy blocks that are close enough together that they fall into the same indirect block. Although I had anticipated a slowdown from contention for the single lock, my filesystem benchmarks show no measurable change in throughput on a uniprocessor system with three active snapshots. I conjecture that this result is because every copy-on-write fault must check all the active snapshots, so the process was inherently serial already. This change removes the last of the deadlocks of which I am aware in snapshots. Sponsored by: DARPA & NAI Labs. Revision Changes Path 1.45 +91 -42 src/sys/ufs/ffs/ffs_snapshot.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message