Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751463AbbHAHMv (ORCPT ); Sat, 1 Aug 2015 03:12:51 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:35600 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbbHAHMu convert rfc822-to-8bit (ORCPT ); Sat, 1 Aug 2015 03:12:50 -0400 Content-Type: text/plain; charset=gb2312 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Subject: Re: [PATCH v2] kthread: Export kthread functions From: yalin wang In-Reply-To: Date: Sat, 1 Aug 2015 15:12:42 +0800 Cc: Neil Horman , Andrew Morton , David Kershner , tj@kernel.org, laijs@cn.fujitsu.com, nacc@linux.vnet.ibm.com, mingo@redhat.com, open list , jes.sorensen@redhat.com, sparmaintainer@unisys.com Content-Transfer-Encoding: 8BIT Message-Id: <6440C9D8-37D8-4E30-89D7-04CB96BC8114@gmail.com> References: <1437777920-31156-1-git-send-email-david.kershner@unisys.com> <1438099141-8614-1-git-send-email-david.kershner@unisys.com> <20150728142748.a756d7540ad5cdaf4c9efc9e@linux-foundation.org> <20150730120223.GA27430@hmsreliant.think-freely.org> To: Thomas Gleixner X-Mailer: Apple Mail (2.2102) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2065 Lines: 64 > ?? 2015??7??31?գ?22:14??Thomas Gleixner д???? > > > On Fri, 31 Jul 2015, Thomas Gleixner wrote: > >> On Fri, 31 Jul 2015, yalin wang wrote: >>> it is optimised to 2 instructions , >>> >>> this is my patch, hope can be merged : >> >> We are not exposing the internals of kthread management. Period. > > And your 'optimization' is completely bogus: > > Before your modification: > > size kernel/built-in.o > > text data bss dec hex filename > 1091514 141498 341928 1574940 18081c ../build/kernel/built-in.o > > After: > > text data bss dec hex filename > 1091664 141498 341928 1575090 1808b2 ../build/kernel/built-in.o > > That's an increase of text size by 150 byte. Interesting optimization. > > Thanks, > > tglx > > strange, this is my test result: size built-in.o* text data bss dec hex filename 743937 50786 56008 850731 cfb2b built-in.o // with the patch 744069 50786 56008 850863 cfbaf built-in.o_old // with out the patch you can see text size is reduced. in addition, because we don??t use EXPORT_SYMBOLS() for inline function, some data can also be removed, [27] __ksymtab_strings PROGBITS 0000000000000000 000a7fe0 0000000000003907 0000000000000000 A 0 0 1 0x3907 [27] __ksymtab_strings PROGBITS 0000000000000000 000a8020 000000000000392f 0000000000000000 A 0 0 1 0x392f you can see after apply the patch, this string section is also reduced, but size command output seems not calculate these special section, there are lots of special sections in linux kernel image, i think size command is not suitable to calculate kernel image, maybe it just calculate formal section which name like .data .text etc.. Thanks-- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/