From owner-svn-src-all@freebsd.org Thu Sep 20 15:13:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 792E1109FBB6; Thu, 20 Sep 2018 15:13:33 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFE2171424; Thu, 20 Sep 2018 15:13:32 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from hammy.vangyzen.net (unknown [70.97.188.230]) by smtp.vangyzen.net (Postfix) with ESMTPSA id E4C1F564FA; Thu, 20 Sep 2018 10:13:25 -0500 (CDT) Subject: Re: svn commit: r338829 - head/sys/kern To: Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201809201332.w8KDWeX4014010@repo.freebsd.org> From: Eric van Gyzen Message-ID: <67e2771b-a680-221f-2451-9906d91f58d3@vangyzen.net> Date: Thu, 20 Sep 2018 10:13:24 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <201809201332.w8KDWeX4014010@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 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: Thu, 20 Sep 2018 15:13:33 -0000 On 9/20/18 8:32 AM, Mateusz Guzik wrote: > fd: prevent inlining of _fdrop thorough kern_descrip.c > > fdrop is used in several places in the file and almost never has to call > _fdrop. Thus inlining it is a pure waste of space. > > -int > +int __noinline > _fdrop(struct file *fp, struct thread *td) I wonder if some compilers have an attribute for "cold" versus "hot" that would indicate that the function is called seldom versus often. It could influence not only inlining, but also prediction of branches that lead to an unconditional call to it. Eric