From owner-freebsd-arch@FreeBSD.ORG Mon May 19 21:28:38 2008 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBAF21065675 for ; Mon, 19 May 2008 21:28:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id A362C8FC16 for ; Mon, 19 May 2008 21:28:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from server.baldwin.cx (unknown [208.65.91.234]) by elvis.mu.org (Postfix) with ESMTP id 26E8B1A4D82 for ; Mon, 19 May 2008 14:28:38 -0700 (PDT) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m4JJdmRO040673; Mon, 19 May 2008 15:39:49 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Kostik Belousov Date: Mon, 19 May 2008 12:09:34 -0400 User-Agent: KMail/1.9.7 References: <20080504171002.GN18958@deviant.kiev.zoral.com.ua> <200805191015.35212.jhb@freebsd.org> <20080519153811.GF18958@deviant.kiev.zoral.com.ua> In-Reply-To: <20080519153811.GF18958@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805191209.34522.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 19 May 2008 15:39:49 -0400 (EDT) X-Virus-Scanned: ClamAV 0.91.2/7171/Mon May 19 14:21:55 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.1 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00, DATE_IN_PAST_03_06 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-arch@FreeBSD.org Subject: Re: Per-open file private data for the cdevs 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: Mon, 19 May 2008 21:28:38 -0000 On Monday 19 May 2008 11:38:11 am Kostik Belousov wrote: > On Mon, May 19, 2008 at 10:15:34AM -0400, John Baldwin wrote: > > On Thursday 15 May 2008 08:30:55 am Kostik Belousov wrote: > > > On Thu, May 15, 2008 at 07:30:07AM -0400, John Baldwin wrote: > > > > On Wednesday 14 May 2008 05:32:23 am Kostik Belousov wrote: > > > > > So, I cannot implement overlay of the cdevpriv over the seqaccess data > > > > > without some additional flag. On the other hand, use of 2 bytes for the > > > > > f_type is overkill when the range of the types is [1,8]. I divided it > > > > > to two one-byte fields, and new field is used for filetype-specific > > > > > flags. > > > > > > > > > > http://people.freebsd.org/~kib/misc/fdpriv.4.patch > > > > > shall give the same size of the struct file while not causing > > > > > unconditional acquire of the cdevpriv_mtx on the last file close. > > > > > > > > > > Jeff, do you agree with the proposed vivisection of the f_type ? I will > > > > > ask Peter to retest the patch then. > > > > > > > > I would rather add the new pointer to struct file and avoid breaking the > > > > ABI of fstat. That is, I would like this patch to be MFCable, but you > > > > can't MFC this w/o breaking the ABI of struct file since fstat(1) will be > > > > reading the full short to get the DTYPE. > > > > > > Oh, I thought that fstat uses struct xfile, at least for live systems. > > > > > > I considered to introduce new f_type value for devfs files; the > > > DTYPE_VNODE is not a complete truth due to custom f_ops. But DTYPE_VNODE > > > is special-cased in enough locations to make this much less preferrable > > > then another pointer. > > > > fstat always uses libkvm and direct access unfortunately. Also, I greatly > > care about fstat on crash dumps as well. :) > > So, what is the conclusion ? Does anybody have any further objections > against committing > http://people.freebsd.org/~kib/misc/fdpriv.3.patch > > I plan to do it this week. I think the current patch is good. -- John Baldwin