From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 18 00:09:29 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D11F13EE for ; Thu, 18 Oct 2012 00:09:29 +0000 (UTC) (envelope-from tris_vern@hotmail.com) Received: from snt0-omc2-s14.snt0.hotmail.com (snt0-omc2-s14.snt0.hotmail.com [65.55.90.89]) by mx1.freebsd.org (Postfix) with ESMTP id 9EFCA8FC08 for ; Thu, 18 Oct 2012 00:09:29 +0000 (UTC) Received: from SNT124-W20 ([65.55.90.73]) by snt0-omc2-s14.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 17 Oct 2012 17:08:23 -0700 Message-ID: X-Originating-IP: [165.228.7.150] From: Tristan Verniquet To: Subject: syncing large mmaped files Date: Thu, 18 Oct 2012 10:08:22 +1000 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 18 Oct 2012 00:08:23.0629 (UTC) FILETIME=[B0606FD0:01CDACC4] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 00:09:29 -0000 I want to work with large (1-10G) files in memory but eventually sync them = back out to disk. The problem is that the sync process appears to lock the = file in kernel for the duration of the sync=2C which can run into minutes. = This prevents other processes from reading from the file (unless they alrea= dy have it mapped) for this whole time. Is there any way to prevent this? I= think I read in a post somewhere about openbsd implementing partial-writes= when it hits a file with lots of dirty pages in order to prevent this. Is = there anything available for FreeBSD or is there another way around it? Sorry if this is the wrong mailing list. =