From owner-svn-src-head@FreeBSD.ORG Tue Jul 31 07:22:26 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4D5C1065670; Tue, 31 Jul 2012 07:22:26 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id F29728FC0A; Tue, 31 Jul 2012 07:22:25 +0000 (UTC) Received: by qabg1 with SMTP id g1so1619943qab.13 for ; Tue, 31 Jul 2012 00:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=xfSLwXuWwB/wmUO8l4eap/Er3UvpIfXjLgvRlw+rtHQ=; b=Hh7VhvwysxMaqW1Ww+j7UMXhQIkVk0XUGecquqybugRNbFiSeyWqz63E4n6UwjLnEL WKIOVgg6HNKLydldLFPwZcbIrlc1Jjc60jXVRz/2eWU/TNMBaHN0nNjLX28WvLf/PzyU i+Wlp5jzDjdesXnkQWXm0BEeZyuQ0k7aZW55O3plV/3/ms2ZF+3gAySPwyTyMhvVEgM2 R1jAExqwpMMS2sBmlNSkxqNFQ7RWfTozb37+WjoE7rBRpgo4mBGgJkFy66L1H/PTkr2s AxI2xM/0Y1qSJXBUud2R8iadNn3ixoW6zU4f0Fddm6GDpd65EeW08DGABuoKT9aww1Zk T1Hg== MIME-Version: 1.0 Received: by 10.224.59.199 with SMTP id m7mr10765382qah.13.1343719345263; Tue, 31 Jul 2012 00:22:25 -0700 (PDT) Sender: giovanni.trematerra@gmail.com Received: by 10.229.59.169 with HTTP; Tue, 31 Jul 2012 00:22:25 -0700 (PDT) In-Reply-To: <201207310548.q6V5mZHf091624@svn.freebsd.org> References: <201207310548.q6V5mZHf091624@svn.freebsd.org> Date: Tue, 31 Jul 2012 09:22:25 +0200 X-Google-Sender-Auth: zgPcggJt6w-UNVm59UL4w7vWixo Message-ID: From: Giovanni Trematerra To: David Xu Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov , bde@freebsd.org Subject: Re: svn commit: r238936 - in head/sys: fs/fifofs kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2012 07:22:26 -0000 On Tue, Jul 31, 2012 at 7:48 AM, David Xu wrote: > Author: davidxu > Date: Tue Jul 31 05:48:35 2012 > New Revision: 238936 > URL: http://svn.freebsd.org/changeset/base/238936 > > Log: > I am comparing current pipe code with the one in 8.3-STABLE r236165, > I found 8.3 is a history BSD version using socket to implement FIFO > pipe, it uses per-file seqcount to compare with writer generation > stored in per-pipe object. The concept is after all writers are gone, > the pipe enters next generation, all old readers have not closed the > pipe should get the indication that the pipe is disconnected, result > is they should get EPIPE, SIGPIPE or get POLLHUP in poll(). > But newcomer should not know that previous writters were gone, it > should treat it as a fresh session. > I am trying to bring back FIFO pipe to history behavior. It is still > unclear that if single EOF flag can represent SBS_CANTSENDMORE and > SBS_CANTRCVMORE which socket-based version is using, but I have run > the poll regression test in tool directory, output is same as the one > on 8.3-STABLE now. > I think the output "not ok 18 FIFO state 6b: poll result 0 expected 1. > expected POLLHUP; got 0" might be bogus, because newcomer should not > know that old writers were gone. I got the same behavior on Linux. > Our implementation always return POLLIN for disconnected pipe even it > should return POLLHUP, but I think it is not wise to remove POLLIN for > compatible reason, this is our history behavior. > I'm sorry but I'm failing to understand the reason for this change. Can you point me out a test that confirm that the change is needed. The only thing I see is an increase in the memory footprint for the pipes. There was a lot of discussions on this topic on -arch mailing list http://lists.freebsd.org/pipermail/freebsd-arch/2012-January/012131.html http://lists.freebsd.org/pipermail/freebsd-arch/2012-February/012314.html Thank you -- Gianni