From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 18 07:55:55 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 50A01930 for ; Thu, 18 Oct 2012 07:55:55 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by mx1.freebsd.org (Postfix) with ESMTP id CED778FC0A for ; Thu, 18 Oct 2012 07:55:54 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id hm2so1503703wib.1 for ; Thu, 18 Oct 2012 00:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=nvTwhd1fvO7rapkIRWslItyX6YLp02h2Recf23Z4aHg=; b=u7vsaNSI9XVPWpzgGuAj5tU7Ve5nAOkOQ6v5Wp2TqwEv6t5bKLWouKWvyWFpY6+dmr LIev+PsUqc+EvDam7fVG2xhWZHcORPkMq0wB/+ASGVFdkYuoCTd63ddRgfzBJ4YtBHlU GKHxzKbk2g9ng6HxscabaBImRGGJrqq6voXQmSNaDasFJnyRh6xikGt0PGS8znOvCzK5 3xYpoR4dBid5pj1BM10P8u3s8mFfJB2oNnAXTHnYstJ78aYvkjbnzCRtDYu3bG6dnWfL rBRVhCGcUulT/6TN8JbyGu+TbZmlIg1t+6smnW8ysXgPY9CAsHDOG3QFm6DGXTkorHYD 97cQ== Received: by 10.216.217.194 with SMTP id i44mr12368145wep.60.1350546947720; Thu, 18 Oct 2012 00:55:47 -0700 (PDT) Received: from ndenevsa.sf.moneybookers.net (g1.moneybookers.com. [217.18.249.148]) by mx.google.com with ESMTPS id j8sm28361581wiy.9.2012.10.18.00.55.45 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Oct 2012 00:55:46 -0700 (PDT) Subject: Re: syncing large mmaped files Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Content-Type: text/plain; charset=us-ascii From: Nikolay Denev In-Reply-To: Date: Thu, 18 Oct 2012 10:55:46 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Tristan Verniquet X-Mailer: Apple Mail (2.1498) Cc: freebsd-hackers@freebsd.org 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 07:55:55 -0000 On Oct 18, 2012, at 3:08 AM, Tristan Verniquet = wrote: >=20 > 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, which can run into = minutes. This prevents other processes from reading from the file = (unless they already 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? >=20 > Sorry if this is the wrong mailing list. > =20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org" Isn't msync(2) what you are looking for?=