From owner-svn-src-all@freebsd.org Fri Sep 30 17:58:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25BE0C036EF; Fri, 30 Sep 2016 17:58:18 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (thebighonker.lerctr.org [IPv6:2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "thebighonker.lerctr.org", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 017B696F; Fri, 30 Sep 2016 17:58:18 +0000 (UTC) (envelope-from ler@lerctr.org) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Message-ID:References:In-Reply-To:Subject:Cc:To:From:Date: Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=PgMeWG1Kk0CWm0piFOBe3sgQu/VnikItzdkYkOoxxHw=; b=YsNAcwcWkPQmo4cuFC9Ugb296E 3Dz9eJ8Ov6LXrzL4DtrZQMDAEXRJSrUNjcj6yq2Z44oJEztBixvZgDq/JdBeX2nERlmj2F0hw8ByL r2LVddT3E81mOG2LeMVXsonY6hgx1ttF4uVPXNGSOCJS0Tv3XgdxK+pAHv5/DZdSSXTI=; Received: from thebighonker.lerctr.org ([2001:470:1f0f:3ad:223:7dff:fe9e:6e8a]:36196 helo=webmail.lerctr.org) by thebighonker.lerctr.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bq24e-0005Jc-Nj; Fri, 30 Sep 2016 12:58:16 -0500 Received: from ool-2f1063cc.dyn.optonline.net ([47.16.99.204]) by webmail.lerctr.org with HTTP (HTTP/1.1 POST); Fri, 30 Sep 2016 12:58:16 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 30 Sep 2016 13:58:16 -0400 From: Larry Rosenman To: Mateusz Guzik Cc: Shawn Webb , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik , owner-svn-src-all@freebsd.org Subject: Re: svn commit: r306509 - in head/sys: fs/nandfs kern sys ufs/ffs In-Reply-To: <20160930175540.GD3714@dft-labs.eu> References: <201609301711.u8UHB35d046389@repo.freebsd.org> <20160930171845.GA62393@mutt-hardenedbsd> <20160930172845.GC3714@dft-labs.eu> <9eddf030ed57a527c2d23e32289df7cf@thebighonker.lerctr.org> <20160930175540.GD3714@dft-labs.eu> Message-ID: <08ad38dde4ccabe7cf9ee09571c71ca2@thebighonker.lerctr.org> X-Sender: ler@lerctr.org User-Agent: Roundcube Webmail/1.2.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2016 17:58:18 -0000 On 2016-09-30 13:55, Mateusz Guzik wrote: > On Fri, Sep 30, 2016 at 01:36:26PM -0400, Larry Rosenman wrote: >> On 2016-09-30 13:28, Mateusz Guzik wrote: >> >On Fri, Sep 30, 2016 at 01:18:45PM -0400, Shawn Webb wrote: >> >>On Fri, Sep 30, 2016 at 05:11:03PM +0000, Mateusz Guzik wrote: >> >>> Author: mjg >> >>> Date: Fri Sep 30 17:11:03 2016 >> >>> New Revision: 306509 >> >>> URL: https://svnweb.freebsd.org/changeset/base/306509 >> >>> >> >>> Log: >> >>> vfs: remove the __bo_vnode field from struct vnode >> >>> >> >>> The pointer can be obtained using __containerof instead. >> >>> >> >>> Reviewed by: kib >> >> >> >>Should __FreeBSD_Version be bumped? >> >> >> > >> >Unlikely. It can be in an odd case it turns out there is a module which >> >is using the field. >> >> Can someone do me a favor and make sure sysutils/lsof still >> compiles/works? >> >> I'm OOT at the moment, and have a test IPv6 patch on my 12 system. > > I just ran lsof and it worked fine at least for the basic case. > > Apparently it indeed still goes through kernel memory. Did anyone ask > the author what kind of interfaces would they want to NOT have to do > this? > > Also, it looks like it constains some kind of a loop to imitate > closefrom. > > On truss I see over 3.7 milion (yes, MILION) calls to close. Like this: > close(3773297) ERR#9 'Bad file > descriptor' > close(3773298) ERR#9 'Bad file > descriptor' > close(3773299) ERR#9 'Bad file > descriptor' > close(3773300) ERR#9 'Bad file > descriptor' > close(3773301) ERR#9 'Bad file > descriptor' > close(3773302) ERR#9 'Bad file > descriptor' > close(3773303) ERR#9 'Bad file > descriptor' > [snip] > > At least for freebsd this can be patched with the use of closefrom() on > all supported releases. > > Arguably this may be a side effect of limits set too high, perhaps > linux > sets them sigifnicanly lower and the problem is not that terrible. We've had this discussion before (re: interfaces). I thought the current versions of lsof only close the first 1k FD's. (what version of lsof is this? on 12-CURRENT?) -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 17716 Limpia Crk, Round Rock, TX 78664-7281