public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Alexander van Heukelum <heukelum@mailshack.com>
Cc: Andreas Schwab <schwab@suse.de>, Mike Travis <travis@sgi.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Paul Jackson <pj@sgi.com>, Thomas Gleixner <tglx@linutronix.de>,
	Matthew Wilcox <matthew@wil.cx>,
	ARCH <linux-arch@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Alexander van Heukelum <heukelum@fastmail.fm>
Subject: Re: [PATCHv3] Make for_each_cpu_mask a bit smaller
Date: Tue, 13 May 2008 14:02:42 +0200	[thread overview]
Message-ID: <20080513120242.GD32022@elte.hu> (raw)
In-Reply-To: <20080513092821.GA20416@mailshack.com>


* Alexander van Heukelum <heukelum@mailshack.com> wrote:

> The for_each_cpu_mask loop is used quite often in the kernel. It makes 
> use of two functions: first_cpu and next_cpu. This patch changes 
> for_each_cpu_mask to use only the latter. Because next_cpu finds the 
> next eligible cpu _after_ the given one, the iteration variable has to 
> be initialized to -1 and next_cpu has to be called with this value 
> before the first iteration. An x86_64 defconfig kernel (from 
> sched/latest) is about 2500 bytes smaller with this patch applied:
> 
>    text	   data	    bss	    dec	    hex	filename
> 6222517	 917952	 749932	7890401	 7865e1	vmlinux.orig
> 6219922	 917952	 749932	7887806	 785bbe	vmlinux
> 
> The same size reduction is seen for defconfig+MAXSMP
> 
>    text	   data	    bss	    dec	    hex	filename
> 6241772	2563968	1492716	10298456	 9d2458	vmlinux.orig
> 6239211	2563968	1492716	10295895	 9d1a57	vmlinux

applied for testing, thanks Alexander.

	Ingo

  reply	other threads:[~2008-05-13 12:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-11 13:50 [PATCH] Make for_each_cpu_mask a bit smaller Alexander van Heukelum
2008-05-11 13:50 ` Alexander van Heukelum
2008-05-11 13:57 ` Paul Jackson
2008-05-11 14:14 ` Paul Jackson
2008-05-11 16:06   ` [RFC/PATCH] Make for_each_node_mask out-of-line Alexander van Heukelum
2008-05-11 21:01     ` Paul Jackson
2008-05-12 12:04       ` Alexander van Heukelum
2008-05-12 16:45         ` Mike Travis
2008-05-12 19:00           ` [PATCHv2] Make for_each_cpu_mask a bit smaller Alexander van Heukelum
2008-05-12 21:45             ` Andreas Schwab
2008-05-13  9:28               ` [PATCHv3] " Alexander van Heukelum
2008-05-13 12:02                 ` Ingo Molnar [this message]
2008-05-11 15:24 ` [PATCH] " Matthew Wilcox
2008-05-11 16:19   ` Alexander van Heukelum
2008-05-11 16:19     ` Alexander van Heukelum
2008-05-11 22:01     ` Matthew Wilcox
2008-05-12 11:04       ` Alexander van Heukelum
2008-05-12 11:04         ` Alexander van Heukelum
2008-05-12 11:56         ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080513120242.GD32022@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=heukelum@fastmail.fm \
    --cc=heukelum@mailshack.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=pj@sgi.com \
    --cc=schwab@suse.de \
    --cc=tglx@linutronix.de \
    --cc=travis@sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox