Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752942AbdCOM17 (ORCPT ); Wed, 15 Mar 2017 08:27:59 -0400 Received: from merlin.infradead.org ([205.233.59.134]:45978 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751168AbdCOM1h (ORCPT ); Wed, 15 Mar 2017 08:27:37 -0400 Date: Wed, 15 Mar 2017 13:27:31 +0100 From: Peter Zijlstra To: Greg KH Cc: Andi Kleen , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 4/7] kref: Remove WARN_ON for NULL release functions Message-ID: <20170315122731.GR3093@worktop> References: <20170315021431.13107-1-andi@firstfloor.org> <20170315021431.13107-5-andi@firstfloor.org> <20170315024656.GA11886@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170315024656.GA11886@kroah.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 821 Lines: 18 On Wed, Mar 15, 2017 at 10:46:56AM +0800, Greg KH wrote: > On Tue, Mar 14, 2017 at 07:14:28PM -0700, Andi Kleen wrote: > > From: Andi Kleen > > > > The kref functions check for NULL release functions. > > This WARN_ON seems rather pointless. We will eventually release and > > then just crash nicely. It is also somewhat expensive because > > these functions are inlined in a lot of places. > > Removing the WARN_ONs saves around 2.3k in this kernel > > (likely more in others with more drivers) > > > > text data bss dec hex filename > > 9083992 5367600 11116544 25568136 1862388 vmlinux-before-load-avg > > 9070166 5367600 11116544 25554310 185ed86 vmlinux-load-avg > > WARN_ON() is heavy, didn't realize that. I actually have patches fixing that.