From owner-freebsd-questions@FreeBSD.ORG Thu Apr 13 16:39:00 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B38D16A400 for ; Thu, 13 Apr 2006 16:39:00 +0000 (UTC) (envelope-from wojtek@tensor.3miasto.net) Received: from chylonia.3miasto.net (chylonia.3miasto.net [213.192.74.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id E6AF943D73 for ; Thu, 13 Apr 2006 16:38:54 +0000 (GMT) (envelope-from wojtek@tensor.3miasto.net) Received: from chylonia.3miasto.net (localhost [127.0.0.1]) by chylonia.3miasto.net (8.13.4/8.13.4) with ESMTP id k3DGcm3M007645 for ; Thu, 13 Apr 2006 18:38:48 +0200 (CEST) (envelope-from wojtek@tensor.3miasto.net) Received: from localhost (wojtek@localhost) by chylonia.3miasto.net (8.13.4/8.13.4/Submit) with ESMTP id k3DGcmMO007642 for ; Thu, 13 Apr 2006 18:38:48 +0200 (CEST) (envelope-from wojtek@tensor.3miasto.net) X-Authentication-Warning: chylonia.3miasto.net: wojtek owned process doing -bs Date: Thu, 13 Apr 2006 18:38:48 +0200 (CEST) From: Wojciech Puchar X-X-Sender: wojtek@chylonia.3miasto.net To: questions@freebsd.org In-Reply-To: <200604131124.17513.josh@tcbug.org> Message-ID: <20060413183320.C7171@chylonia.3miasto.net> References: <200604131055.19504.josh@tcbug.org> <20060413181037.E95399@chylonia.3miasto.net> <200604131124.17513.josh@tcbug.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: MMAP&multiprocessor machine question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2006 16:39:00 -0000 assume i have my program, that accesses data using mmap interface only, is run many times on same machine. if it's uniprocessor machine, it's clear - all processes will see the data coherrent. what in case of more than one processor. will one processor keep in cache data that was already modified by other? is there any system call to FORCE synchronization when it's needed on given page? on my dual pentium II machine it looks like data being always coherent, but how it will be on other architectures/models? for example MIPS processors has software managed caches - will my program work wrong on such hardware? for now - it's ok because it works, but i won't like to be surprised say 5 years after because my program breaks important data on some new machine it may run at. it's multiuser database program (or will be, as it's in beginning phase) so such behaviour is inacceptable.