From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261464AbUKSQ1p (ORCPT ); Fri, 19 Nov 2004 11:27:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261486AbUKSQ1l (ORCPT ); Fri, 19 Nov 2004 11:27:41 -0500 Received: from mx1.redhat.com ([66.187.233.31]:53431 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S261482AbUKSQ1M (ORCPT ); Fri, 19 Nov 2004 11:27:12 -0500 From: David Howells In-Reply-To: <20041119052936.GE8040@waste.org> References: <20041119052936.GE8040@waste.org> <20040401020550.GG3150@beast> <200411081434.iA8EYKn7023613@warthog.cambridge.redhat.com> To: Matt Mackall Cc: torvalds@osdl.org, akpm@osdl.org, davidm@snapgear.com, linux-kernel@vger.kernel.org, uclinux-dev@uclinux.org Subject: Re: [PATCH 17/20] FRV: Better mmap support in uClinux User-Agent: EMH/1.14.1 SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Date: Fri, 19 Nov 2004 16:26:43 +0000 Message-ID: <13104.1100881603@redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > > (3) Files (and blockdevs) cannot be mapped shared since it is not > > really possible to honour this by writing any changes back to the > > backing device. > > [way behind on email] > > I think this could be done at msync, munmap and exit time? You end up > flushing the entire mapping, but it's still correct (and POSIX > compliant). Don't forget write() too. If someone does a write, that would have to be written over the mapping too. Obviously this is not impossible. > And, if you wanted to be really clever, you could store a hash of each > page to detect changes and avoid the extra I/O. It'd probably have to be something like an md5 sum. Okay, technically, we could probably emulate it, but is it worth it? I think it's something to bear in mind for another time. More to the point, perhaps, is making shared memory stuff work. David