From owner-freebsd-arch@FreeBSD.ORG Sun Apr 13 08:24:06 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2121106566B for ; Sun, 13 Apr 2008 08:24:06 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by mx1.freebsd.org (Postfix) with ESMTP id AC7478FC0C for ; Sun, 13 Apr 2008 08:24:06 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: by wa-out-1112.google.com with SMTP id k17so1331231waf.3 for ; Sun, 13 Apr 2008 01:24:06 -0700 (PDT) Received: by 10.114.150.1 with SMTP id x1mr5487401wad.144.1208075046190; Sun, 13 Apr 2008 01:24:06 -0700 (PDT) Received: from ?10.0.1.199? ( [24.94.72.120]) by mx.google.com with ESMTPS id m25sm8639046waf.46.2008.04.13.01.24.04 (version=SSLv3 cipher=OTHER); Sun, 13 Apr 2008 01:24:05 -0700 (PDT) Date: Sat, 12 Apr 2008 22:24:22 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Poul-Henning Kamp In-Reply-To: <18354.1208070351@critter.freebsd.dk> Message-ID: <20080412221654.S959@desktop> References: <18354.1208070351@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@freebsd.org Subject: Re: f_offset X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2008 08:24:06 -0000 On Sun, 13 Apr 2008, Poul-Henning Kamp wrote: > In message <20080412132457.W43186@desktop>, Jeff Roberson writes: > >> It's worth discussing what posix actually guarantees for f_offset as well >> as what other operating systems do. > > I think DWIM is quite easily defined here: concurrent access only > makes sense with pwrite[v](2)/pread[v](2). It may only make sense with p* but it happens without. If "DWIM" means "do what it means" posix is purposefully permissive in the requirements for f_offset because existing implementations were non-serializing. > > The non p-prefix versions should always be serialized, because there > is know way of knowing where they read/write if you don't. Well that's at odds with what the standard says and what others implement. I think there is a clear case for serializing writes. I don't see what advantage we get from serializing reads. The heavy cost of synchronization should be justified by actual need. Thanks, Jeff > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. >